[Bug tree-optimization/91540] missed value-replacement in phiopt

2021-06-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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.

[Bug tree-optimization/91540] missed value-replacement in phiopt

2021-06-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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

[Bug tree-optimization/91540] missed value-replacement in phiopt

2021-05-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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.

[Bug tree-optimization/91540] missed value-replacement in phiopt

2019-08-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540 Richard Biener changed: What|Removed |Added Keywords||missed-optimization