https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120294
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |---
CC| |amonakov at gcc dot gnu.org
--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Come on folks, that is not what the bug is about. Icelake doesn't have that
errata.
For reference, GCC emits:
f0_fast:
tzcnt eax, edi
test edi, edi
shrx eax, edi, eax
cmove eax, edi
ret
f0_slow:
tzcnt eax, edi
xor edx, edx
test edi, edi
shrx eax, edi, eax
cmove eax, edx
ret
As you can see, there's no dep-breaking xor before the tzcnt. And LLVM:
f0_fast:
tzcnt eax, edi
cmovb eax, edi
shrx eax, edi, eax
ret
f0_slow:
tzcnt eax, edi
shrx eax, edi, eax
cmovb eax, edi
ret