[Bug tree-optimization/94787] Failure to detect single bit popcount pattern

2020-04-29 Thread wilco at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 Wilco changed: What|Removed |Added CC||wilco at gcc dot gnu.org --- Comment #3 from Wil

[Bug tree-optimization/94787] Failure to detect single bit popcount pattern

2020-04-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 Richard Biener changed: What|Removed |Added Last reconfirmed||2020-04-27 Status|UNCONFIRM

[Bug tree-optimization/94787] Failure to detect single bit popcount pattern

2020-04-27 Thread gabravier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 --- Comment #1 from Gabriel Ravier --- Inversely, I'd also suggest doing the opposite. That is, if there is no hardware popcount instruction, `__builtin_popcount(v) == 1` should be optimized to `v && !(v & (v - 1))`