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

--- Comment #5 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Presumably for -Os using tzcntw/lzcntw would be a good idea, but I wonder if
> it would be actually faster for -O2.

Note that 16-bit tzcnt/lzcnt still have a false dependency on their destination
(Intel fixed this for the 32-bit versions starting with Skylake). This becomes
a problem in loops, where it creates a cross-iteration dependency on the
destination register. Stick to the 32-bit versions if performance matters.

Reply via email to