[PATCH] D132520: [X86] Promote i8/i16 CTTZ (BSF) instructions and remove speculation branch

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 21:53:45 PDT 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5824
+bool X86TargetLowering::isCheapToSpeculateCttz(Type *Ty) const {
+  // Speculate cttz only if we can directly use TZCNT or can Promote to i32.
+  return Subtarget.hasBMI() ||
----------------
promote


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132520/new/

https://reviews.llvm.org/D132520



More information about the llvm-commits mailing list