[X86] Account for high uop/resource usage in BSF/BSR instructions
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 11 Apr 2022 10:20:04 +0000 (11:20 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 11 Apr 2022 10:20:09 +0000 (11:20 +0100)
commit058a33d3c9249e9475cf1e42b9721251e816cd47
tree8e6ea61661b846e76f949eb472eecee4ec64e5a5
parentb72fd1a84d33e19f9f7fa6b7fdcaea57dc51aee4
[X86] Account for high uop/resource usage in BSF/BSR instructions

znver1/2 models were incorrectly modelling these as single uop instructions, instead of the microcoded nightmares they really are.

Now matches AMD SoG, Agner and instlatx64 numbers.

Fixes #54811
llvm/lib/Target/X86/X86ScheduleZnver1.td
llvm/lib/Target/X86/X86ScheduleZnver2.td
llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s
llvm/test/tools/llvm-mca/X86/Znver2/resources-x86_64.s