https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
--- Comment #6 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #5)
> // (a | zero_one) != 0 -> a!=0 | zero_one
>
> (simplify
> (ne (bit_ior:c @1 zero_one_value_p@2) integer_zerop@3)
> (bit_ior (convert @1) (ne @2 @3)))
>
>
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
Andrew Pinski changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
--- Comment #4 from Andrew Pinski ---
The generic rule is:
original 3 expressions;
(((int)b) | i) == 0 -> (b == 0) & (i == 0) -> ~b & (i == 0)
(4 expressions; maybe 3 if b is a comparison and single use)
(((int)b) | i) != 0 -> (b != 0) | (i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
Andrew Pinski changed:
What|Removed |Added
Keywords||missed-optimization
Status|A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
--- Comment #2 from Andrew Pinski ---
For the trunk, they all come close (at least for aarch64):
f:
cmp w0, 0
csetw0, ne
orr w1, w0, w1
cmp w1, 0
csetw0, ne
ret
.size f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52345
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|