[PATCH] D130956: [X86][MC] Always emit `rep` prefix for `bsf`
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 01:32:25 PDT 2022
pengfei added inline comments.
================
Comment at: llvm/test/CodeGen/X86/peephole-na-phys-copy-folding.ll:376
%cmp = icmp sgt i32 %val, 0
%res = tail call i32 asm "bsfl $1,$0", "=r,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %val)
store i32 %res, ptr %mem, align 4
----------------
aaronpuchert wrote:
> Goes a bit too far I think. We can turn a generic builtin into `rep; bsf`, but if the inline assembly explicitly asks for `bsf` I think we should emit that.
You are right. So this is to check *no* REP prefix was generated. :)
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