[Mlir-commits] [mlir] [mlir][vector] Check the indices when inferring in_bounds from a permutation map (PR #221268)
Hung-Kuan Tseng
llvmlistbot at llvm.org
Sun Nov 1 05:32:22 PST 2026
================
@@ -43,7 +43,7 @@ func.func @vec_affine_apply_2(%arg0: memref<8x12x16xf32>, %arg1: memref<8x24x48x
// CHECK-NEXT: affine.for %[[ARG4:.*]] = 0 to 48 step 8 {
// CHECK-NEXT: %[[S0:.*]] = affine.apply #[[$MAP_ID2]](%[[ARG4]])
// CHECK-NEXT: %[[CST:.*]] = ub.poison : f32
-// CHECK-NEXT: %[[S1:.*]] = vector.transfer_read %[[ARG0]][%[[ARG2]], %[[ARG3]], %[[S0]]], %[[CST]] {in_bounds = [true]} : memref<8x12x16xf32>, vector<8xf32>
+// CHECK-NEXT: %[[S1:.*]] = vector.transfer_read %[[ARG0]][%[[ARG2]], %[[ARG3]], %[[S0]]], %[[CST]] : memref<8x12x16xf32>, vector<8xf32>
----------------
Tim096 wrote:
Yes, it was wrong before. The index is `d0 mod 16 + 1` on a dim of 16 with vectors of 8. With `d0 = 8` the index is 9, so the read covers elements 9 to 16, and 16 is past the end. The write keeps `in_bounds` since its index steps by 8 from 0 on a dim of 48.
https://github.com/llvm/llvm-project/pull/221268
More information about the Mlir-commits
mailing list