[llvm] [x86] Add lowering for `@llvm.experimental.vector.compress` (PR #104904)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 31 05:08:01 PDT 2024


================
@@ -2125,6 +2125,35 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
       for (auto VT : { MVT::v4i32, MVT::v8i32, MVT::v2i64, MVT::v4i64 })
         setOperationAction(ISD::CTPOP, VT, Legal);
     }
+
+    // We can try to convert vectors to different sizes to leverage legal
+    // `vpcompress` cases. So we mark these supported vector sizes as Custom and
+    // then specialize to Legal below.
+    for (MVT VT : {MVT::v8i32, MVT::v8f32, MVT::v4i32, MVT::v4f32, MVT::v4i64,
+                   MVT::v4f64, MVT::v2i64, MVT::v2f64, MVT::v16i8, MVT::v8i16,
+                   MVT::v16i16, MVT::v8i8})
----------------
RKSimon wrote:

Why is MVT::v8i8 here? Its not a legal type

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


More information about the llvm-commits mailing list