[llvm] Perform bitreverse using AVX512 GFNI for i32 and i64. (PR #81764)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 01:28:54 PST 2024


================
@@ -1845,6 +1845,10 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     setOperationAction(ISD::UMULO, MVT::v64i8, Custom);
 
     setOperationAction(ISD::BITREVERSE, MVT::v64i8,  Custom);
+    if (Subtarget.hasGFNI())
+      for (auto VT : {MVT::i32, MVT::v4i32, MVT::v8i32, MVT::v16i32, MVT::i64,
+                      MVT::v2i64, MVT::v4i64, MVT::v8i64})
+        setOperationAction(ISD::BITREVERSE, VT, Custom);
----------------
phoebewang wrote:

Traditionally we need to change `hasVLX` for 128/256-bits vectors. I think we can loose the check now @RKSimon ?

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


More information about the llvm-commits mailing list