https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109638
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |FIXED
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109638
--- Comment #2 from Richard Biener ---
Hmm, but more generally
if (n != x)
n = 0;
return n != 0;
could be handled as well. Or
if (n != x)
n = 0;
return n;
->
return (n == x) * x;
-1 might be another special case that CPUs can
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109638
--- Comment #1 from Andrew Pinski ---
This should do it, I think:
(simplify
(cond (lt @1 integer_onep@2) integer_zerop @1)
(if (TYPE_UNSIGNED (type))
(convert (eq @1 @2