[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 01:05:49 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:987
+    // recognize as TZCNT, which has better performance than BSF.
+    if (X86::isBSF(OutMI.getOpcode()))
+      OutMI.setFlags(X86::IP_HAS_REPEAT);
----------------
skan wrote:
> Do we need to check any target feature here?
I don’t think so.

Probably should skip for minsize though?


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