[llvm] [X86][AVX10] Allow AVX10 use VBMI2 instructions (PR #73276)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 21:19:57 PST 2023


================
@@ -1970,20 +1970,24 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     }
 
     if (Subtarget.hasVBMI2()) {
-      for (auto VT : { MVT::v8i16, MVT::v4i32, MVT::v2i64,
-                       MVT::v16i16, MVT::v8i32, MVT::v4i64,
-                       MVT::v32i16, MVT::v16i32, MVT::v8i64 }) {
+      for (auto VT : {MVT::v32i16, MVT::v16i32, MVT::v8i64}) {
         setOperationAction(ISD::FSHL, VT, Custom);
         setOperationAction(ISD::FSHR, VT, Custom);
       }
 
       setOperationAction(ISD::ROTL, MVT::v32i16, Custom);
-      setOperationAction(ISD::ROTR, MVT::v8i16,  Custom);
-      setOperationAction(ISD::ROTR, MVT::v16i16, Custom);
       setOperationAction(ISD::ROTR, MVT::v32i16, Custom);
     }
   }// useAVX512Regs
 
+  if (Subtarget.hasVBMI2()) {
----------------
phoebewang wrote:

Thanks for the reminder!
I think `useSoftFloat` only matters when calling to `addRegisterClass`. We don't have any chance to lower the opcode with a legal type.
Anyway, I think adding `useSoftFloat` matches the conversions better, I'll add it in another patch.

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


More information about the llvm-commits mailing list