https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95185
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #5) > > Something like: > Prefer ^ over == > ``` > (for cmp > (for cmpN > (for neeq > (simplify > (neeq:c (cmp @0 @1) @3 > (if (cmpN == inverseof(cmp, TREE_TYPE (type)) > (bit_xor (cmpN @0 @1) @3) > ) > ) > ))) > ``` Actually we can just do: ``` /* For CMP == b, prefer CMP` ^ b. */ (for neeq (ne eq) (for cmp (tcc_comparison) (simplify (neeq:c (cmp@0 @1 @2) @3) (bit_xor (bit_not! @0) @3) ) ) ) ``` Since we already have folding of (bit_not cmp) in another place.