[llvm] [X86] Use BMM for bitreverse without GFNI (PR #209223)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 02:23:02 PDT 2026


================
@@ -1364,7 +1364,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     setOperationAction(ISD::STRICT_FDIV,        MVT::v2f64, Legal);
   }
 
-  if (!Subtarget.useSoftFloat() && Subtarget.hasGFNI()) {
+  if (!Subtarget.useSoftFloat() &&
+      (Subtarget.hasGFNI() || Subtarget.hasBMM())) {
----------------
RKSimon wrote:

this is incorrect as its affecting the entire GFNI block below - better to duplicate the setOperationAction(ISD::BITREVERSE lines further down in the existing Subtarget.hasBMM() block.

https://github.com/llvm/llvm-project/pull/209223


More information about the llvm-commits mailing list