https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109829

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Or does match.pd try to invert all the COND_EXPR conditions and swap the
> operands?

match does not try but phiopt does in gimple_simplify_phiopt .

Or even something like this would work better. 
(for neeq (ne eq)
 (simplify
  (cond (neeq (SIGNBIT @0) zero_p@1) (neg @0) @0)
   (if (neqeq == NE_EXPR)
    (abs @0)
    (neg (abs @0))
   )
  )
 )
)

I need to double check if == 1 will show up here though.

Reply via email to