[Mlir-commits] [llvm] [mlir] [mlir][spirv] Add vector.interleave to spirv.VectorShuffle conversion (PR #93240)
Jakub Kuderski
llvmlistbot at llvm.org
Mon May 27 08:03:00 PDT 2024
================
@@ -578,6 +577,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
+ VectorType sourceType = interleaveOp.getSourceVectorType();
+ if (sourceType.getRank() != 1 || sourceType.isScalable()) {
+ return rewriter.notifyMatchFailure(interleaveOp,
+ "unsupported source vector type");
+ }
----------------
kuhar wrote:
We don't need this -- we can rely on the type converter in these conversion patterns
https://github.com/llvm/llvm-project/pull/93240
More information about the Mlir-commits
mailing list