https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540
--- Comment #5 from Andrew Pinski ---
In summary, clang is trying to produce xor always for similar value reductions
(or still branches) while GCC produce plus and minus; though producing xor or
ior might lead to better code in general.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540
--- Comment #4 from Andrew Pinski ---
On the trunk we get:
_5 = cond1_2(D) & cond2_3(D);
_6 = (int) _5;
_7 = 43 - _6;
If we replace the minus with xor, we would get what clang gives.
I think we do this with or though.
I looked into a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540
--- Comment #3 from Andrew Pinski ---
Currently on the trunk we get:
andl%edi, %esi
movl$43, %eax
movzbl %sil, %esi
subl%esi, %eax
Which is close.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization