[Mlir-commits] [mlir] [mlir][spirv] Add vector.interleave to spirv.VectorShuffle conversion (PR #93240)

Jakub Kuderski llvmlistbot at llvm.org
Thu May 23 18:14:13 PDT 2024


================
@@ -578,6 +578,42 @@ struct VectorShuffleOpConvert final
   }
 };
 
+struct VectorInterleaveOpConvert final
+    : public OpConversionPattern<vector::InterleaveOp> {
+  using OpConversionPattern::OpConversionPattern;
+
+  LogicalResult
+  matchAndRewrite(vector::InterleaveOp interleaveOp, OpAdaptor adaptor,
+                  ConversionPatternRewriter &rewriter) const override {
+    // Check the source vector type
+    auto sourceType = interleaveOp.getSourceVectorType();
----------------
kuhar wrote:

nit: don't use auto when the type is not obvious based on the RHS only
```suggestion
    VectorType sourceType = interleaveOp.getSourceVectorType();
```

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


More information about the Mlir-commits mailing list