[PATCH] D130956: [X86][MC] Always emit `rep` prefix for `bsf`
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 14:57:31 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/test/CodeGen/X86/dagcombine-select.ll:310
; NOBMI-NEXT: movq $-1, %rax
; NOBMI-NEXT: cmovneq %rcx, %rax
; NOBMI-NEXT: addq $6, %rax
----------------
This is incorrect. If the instruction is detected as tzcnt, the cmov would need to be cmovaeq not cmovneq. Since we can't know at compile time which CPU we'll be running on. We can't do this transform if the flags are used.
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