https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98961
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- Please note that LZCNT insn has it own set of problems (e.g. TARGET_AVOID_FALSE_DEP_FOR_BMI), so I'm not convinced that even: int z (int i) { return i == 0; } benefits from using LZCNT: 0: 31 c0 xor %eax,%eax 2: f3 0f bd c7 lzcnt %edi,%eax 6: c1 e8 05 shr $0x5,%eax 9: c3 retq vs: 0: 31 c0 xor %eax,%eax 2: 85 ff test %edi,%edi 4: 0f 94 c0 sete %al 7: c3 retq