https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128904
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is decided in ifcvt_can_hoist and CLZ/CTZ isn't gimple_could_trap_p nor
stmt_could_throw_p. The builtin (or one arg IFNs) have UB, so in theory they
can do anything, in practice most likely just return a random value. So,
either make them inappropriate to be moved as well, or rewrite during the
hoisting to be IFN and use some random return value (if backend has some value
it likes, maybe to that, otherwise
choose something (e.g. 0). Or ask global ranges if zero is possible before
doing that.