[Mlir-commits] [mlir] [mlir][vector] Use notifyMatchFailure instead of assert in VectorLinearize (PR #93590)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue May 28 12:58:17 PDT 2024
================
@@ -265,10 +266,11 @@ struct LinearizeVectorShuffle final
matchAndRewrite(vector::ShuffleOp shuffleOp, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
Type dstType = getTypeConverter()->convertType(shuffleOp.getType());
- assert(!(shuffleOp.getV1VectorType().isScalable() ||
- shuffleOp.getV2VectorType().isScalable() ||
- cast<VectorType>(dstType).isScalable()) &&
- "scalable vectors are not supported.");
+ if (shuffleOp.getV1VectorType().isScalable() ||
----------------
banach-space wrote:
`vector.shuffle` does not support scalable vectors, so keeping an assert should be fine for this one:
* https://mlir.llvm.org/docs/Dialects/Vector/#vectorshuffle-vectorshuffleop
A comment explaining the rationale for using `assert` rather than `notifyMatchFailure` would be welcome :)
https://github.com/llvm/llvm-project/pull/93590
More information about the Mlir-commits
mailing list