[Mlir-commits] [mlir] [mlir][vector] Improve shape_cast lowering (PR #140800)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue May 27 09:50:52 PDT 2025
================
@@ -157,41 +160,54 @@ class ShapeCastOpRewritePattern : public OpRewritePattern<vector::ShapeCastOp> {
LogicalResult matchAndRewrite(vector::ShapeCastOp op,
PatternRewriter &rewriter) const override {
Location loc = op.getLoc();
- auto sourceVectorType = op.getSourceVectorType();
- auto resultVectorType = op.getResultVectorType();
+ VectorType sourceType = op.getSourceVectorType();
+ VectorType resultType = op.getResultVectorType();
- if (sourceVectorType.isScalable() || resultVectorType.isScalable())
+ if (sourceType.isScalable() || resultType.isScalable())
return failure();
----------------
banach-space wrote:
Since you are refactoring a fair bit, would you mind replacing this (and other instances of `failure`) with `notifyMatchFailure`? Thanks!
https://github.com/llvm/llvm-project/pull/140800
More information about the Mlir-commits
mailing list