[Bug target/95532] Failure to optimize __builtin_ctz & 0x1F to __builtin_ctz on x86 with BMI

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 4 15:54:03 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95532

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Didn't you file the same for clz already?
The thing isthat at GIMPLE opts we include 32 in the range of possibly returned
values because it is a very common result for the 0 case and at RTL opts time
even know it will return 32 for 0, but the fact that it came up from a built
that was documented to have UB with zero value is lost there.


More information about the Gcc-bugs mailing list