https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110921
Hongtao.liu <crazylht at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- But there's difference between TZCNT and BSF The key difference between TZCNT and BSF instruction is that TZCNT provides operand size as output when source operand is zero while in the case of BSF instruction. Clang looks correct since it also handle zero case, ICC seems wrong, it just generates https://godbolt.org/z/WvrsTrjWr