[Bug target/113764] [X86] Generates lzcnt when bsr is sufficient

2024-02-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113764 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug target/113764] [X86] Generates lzcnt when bsr is sufficient

2024-02-09 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113764 --- Comment #2 from Roger Sayle --- Investigating further, the thinking behind GCC's current behaviour can be found in Agner Fog's instruction tables; on many architectures BSR is much slower than LZCNT. Legacy AMD: BSR=4 cycles, LZCNT=2

[Bug target/113764] [X86] Generates lzcnt when bsr is sufficient

2024-02-07 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113764 Roger Sayle changed: What|Removed |Added CC||roger at nextmovesoftware dot com