https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78037
--- Comment #17 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Jakub Jelinek from comment #13) > The problem is that on x86 clz/ctz is sometimes undefined and sometimes > defined at zero, it depends on which instruction is used and which CPU too. > If we emit bsf/bsr etc., it is undefined, if we emit tzcnt/lzcnt aka > rep;bsf/rep;bsr, it is undefined if it is run on CPUs without BMI and > defined on CPUs with BMI. Please note that alhough we emit tzcnt (aka rep bsf) also for TARGET_GENERIC, we claim CTZ_DEFINED_VALUE_AT_ZERO only for TARGET_BMI.