[PATCH] D130956: [X86][MC] Always emit `rep` prefix for `bsf`
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 02:34:18 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/test/CodeGen/X86/clz.ll:49
; X86: # %bb.0:
-; X86-NEXT: bsfw {{[0-9]+}}(%esp), %ax
+; X86-NEXT: rep bsfw {{[0-9]+}}(%esp), %ax
; X86-NEXT: retl
----------------
pengfei wrote:
> craig.topper wrote:
> > We need to promote bsrw to bsrl. tzcntl is faster than tzcntw. tzcntw has a false dependency to preserve the upper 48 bits of the result register in Intel CPUs. But separate patch please.
> Can we allow to always do that? The result is not equal for tzcnt if we care the src is 0: https://godbolt.org/z/enahabbM7
I meant in SelectionDAG.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130956/new/
https://reviews.llvm.org/D130956
More information about the llvm-commits
mailing list