[mlir] [mlir][Vector] Tighten up application conditions in TransferReadAfter… (PR #143869)
Andrzej Warzyński
llvmlistbot at llvm.org
Thu Jun 12 06:52:13 PDT 2025
================
@@ -4668,12 +4668,15 @@ struct TransferReadAfterWriteToBroadcast
LogicalResult matchAndRewrite(TransferReadOp readOp,
PatternRewriter &rewriter) const override {
- if (readOp.hasOutOfBoundsDim() ||
- !llvm::isa<RankedTensorType>(readOp.getShapedType()))
- return failure();
auto defWrite = readOp.getBase().getDefiningOp<vector::TransferWriteOp>();
if (!defWrite)
return failure();
+ // Bail if we need an alias analysis.
+ if (!readOp.hasPureTensorSemantics() || !defWrite.hasPureTensorSemantics())
+ return failure();
+ // Bail if we need a bounds analysis.
+ if (readOp.hasOutOfBoundsDim() || defWrite.hasOutOfBoundsDim())
+ return failure();
----------------
banach-space wrote:
Looks like we are missing negative tests for these cases as well? And masking?
https://github.com/llvm/llvm-project/pull/143869
More information about the Mlir-commits
mailing list