[Bug c/89670] __builtin_ctz(_mm256_movemask_epi8(foo)) assumed to be <31 ?

joern at purestorage dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 11 22:21:00 GMT 2019


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

--- Comment #11 from Jörn Engel <joern at purestorage dot com> ---
I stand corrected.  Thank you very much!

Out of curiosity, if the only non-broken way to call __builtin_ctz(foo) is via
"foo ? __builtin_ctz(foo) : 32", why isn't the conditional moved into
__builtin_ctz()?  Is there some hidden advantage from callers having to add the
conditional or getting surprised by undefined behaviour?


More information about the Gcc-bugs mailing list