[Mlir-commits] [mlir] [mlir][vector] Use notifyMatchFailure instead of assert in VectorLinearize (PR #93590)
Chao Chen
llvmlistbot at llvm.org
Fri Jun 7 08:50:31 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.");
----------------
chencha3 wrote:
Is it ok to change this assert to `notifyMatchFailure` too?
https://github.com/llvm/llvm-project/pull/93590
More information about the Mlir-commits
mailing list