[Bug target/94892] (x >> 31) + 1 not getting narrowed to compare

2020-08-09 Thread gabravier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94892 --- Comment #4 from Gabriel Ravier --- Harald, for the specific code you wrote, I now see this from GCC : f(int): test edi, edi js .L2 jmp f1() .L2: jmp f2() So for that specific code, GCC has improved, though for the original test

[Bug target/94892] (x >> 31) + 1 not getting narrowed to compare

2020-05-01 Thread harald at gigawatt dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94892 Harald van Dijk changed: What|Removed |Added CC||harald at gigawatt dot nl --- Comment

[Bug target/94892] (x >> 31) + 1 not getting narrowed to compare

2020-04-30 Thread gabravier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94892 --- Comment #2 from Gabriel Ravier --- In that case, then, GCC is generating sub-optimal code for `(x >> 31) + 1` alone since it optimises that to the same thing as LLVM

[Bug target/94892] (x >> 31) + 1 not getting narrowed to compare

2020-04-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94892 Andrew Pinski changed: What|Removed |Added Component|tree-optimization |target --- Comment #1 from Andrew