[Bug tree-optimization/95404] Failure to optimize compare to power of 2 and bitwise and to more direct bitwise and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95404 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2021-08-07 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- What is interesting is clang does not even do it for: int f2(int x) { int t = 0; if ((unsigned)x > 15) t= false; else t = ~x; return t&1; } But once you change int to bool, it does . We might be able to do it for both.
[Bug tree-optimization/95404] Failure to optimize compare to power of 2 and bitwise and to more direct bitwise and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95404 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement