[Mlir-commits] [mlir] [mlir][linalg] set inbounds on `xfer_read/writes` for `assumeDynamicDimsMatchVecSizes ` (PR #160839)
Ege Beysel
llvmlistbot at llvm.org
Wed Oct 8 08:36:50 PDT 2025
================
@@ -524,6 +524,23 @@ VectorizationState::maskOperation(RewriterBase &rewriter, Operation *opToMask,
if (!mask) {
LDBG() << "No mask required";
+ if (assumeDynamicDimsMatchVecSizes) {
+ LDBG() << "Assuming dynamic dimensions match vector sizes!";
+ // Set inbounds to all-true.
+ llvm::TypeSwitch<Operation *>(opToMask)
+ .Case<vector::TransferReadOp, vector::TransferWriteOp>(
+ [&](auto xferOp) {
+ SmallVector<bool> inBoundsMap(xferOp.getInBounds().size(),
+ true);
----------------
egebeysel wrote:
Updated the logic to only set the attribute to true for dynamic dims, tested downstream with IREE that something else later infers that it's in fact "in-bounds" :) WDYT?
https://github.com/llvm/llvm-project/pull/160839
More information about the Mlir-commits
mailing list