[Mlir-commits] [mlir] [mlir][vector] Use notifyMatchFailure instead of assert in VectorLinearize (PR #93590)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Sun Jun 9 11:02:40 PDT 2024
================
@@ -151,10 +151,12 @@ struct LinearizeVectorExtractStridedSlice final
LogicalResult
matchAndRewrite(vector::ExtractStridedSliceOp extractOp, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
- Type dstType = getTypeConverter()->convertType(extractOp.getType());
- assert(!(extractOp.getVector().getType().isScalable() ||
- cast<VectorType>(dstType).isScalable()) &&
- "scalable vectors are not supported.");
+ VectorType dstType =
+ getTypeConverter()->convertType<VectorType>(extractOp.getType());
+ assert(dstType && "vector type destination expected.");
----------------
banach-space wrote:
Keeping the `assert` makes sense to me.
https://github.com/llvm/llvm-project/pull/93590
More information about the Mlir-commits
mailing list