[Mlir-commits] [mlir] [mlir][linalg] Hoist masked vector transfer pairs (PR #221481)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Sep 16 05:56:31 PDT 2026
================
@@ -217,9 +217,14 @@ void mlir::linalg::hoistRedundantVectorTransfers(Operation *root,
LLVM_DEBUG(DBGS() << "Candidate for hoisting: "
<< *transferRead.getOperation() << "\n");
- auto loop = dyn_cast<LoopLikeOpInterface>(transferRead->getParentOp());
- LLVM_DEBUG(DBGS() << "Parent op: " << *transferRead->getParentOp()
- << "\n");
+ // A masked transfer is hoisted as its enclosing `vector.mask` op; that op
+ // is the unit whose parent must be the loop.
----------------
banach-space wrote:
"unit" sounds a bit abstract. In other [places](https://github.com/llvm/llvm-project/blob/0c62d834abff9b180def1b32d3cf9c225d504994/mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h?plain=1#L232-L237) we'd refer to this as `readOrMaskedRead` to capture the fact that xfer_read could be wrapped in `vector.mask`.
https://github.com/llvm/llvm-project/pull/221481
More information about the Mlir-commits
mailing list