[Mlir-commits] [mlir] [mlir][vector] Prevent incorrect vector.transfer_{read|write} hoisting (PR #66930)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Sep 29 01:29:39 PDT 2023
================
@@ -152,6 +152,14 @@ void mlir::linalg::hoistRedundantVectorTransfers(func::FuncOp func) {
transferRead.getPermutationMap() != transferWrite.getPermutationMap())
return WalkResult::advance();
+ // When the source of transfer_read aliases, the following dominance
+ // analysis might not be sufficient.
+ // TODO: There might be other, similar cases missing here (i.e. other
+ // Memref Ops).
+ auto source = transferRead.getSource();
+ if (source.getDefiningOp<memref::CollapseShapeOp>())
----------------
banach-space wrote:
Makes sense, thanks a ton for the pointers!
Patch updated. Hopefully I haven't missed/misunderstood anything.
https://github.com/llvm/llvm-project/pull/66930
More information about the Mlir-commits
mailing list