[Mlir-commits] [mlir] [mlir][vector] extend `createReadOrMaskedRead`/`createWriteOrMaskedWrite` with permutation map support (PR #202766)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jun 9 13:50:53 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 8178 tests passed
* 622 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Dialect/Affine/SuperVectorize/vectorize_1d.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir -affine-super-vectorize="virtual-vector-size=128 test-fastest-varying=0" -split-input-file | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir '-affine-super-vectorize=virtual-vector-size=128 test-fastest-varying=0' -split-input-file
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir:24:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %{{.*}} = ub.poison : f32
# |                ^
# | <stdin>:15:2: note: 'next' match was here
# |  %2 = ub.poison : f32
# |  ^
# | <stdin>:13:29: note: previous match ended here
# |  %1 = affine.apply #map(%c0)
# |                             ^
# | <stdin>:14:1: note: non-matching line after previous match is here
# |  %c0_2 = arith.constant 0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir:50:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[CST:.*]] = ub.poison : f32
# |                ^
# | <stdin>:33:2: note: 'next' match was here
# |  %0 = ub.poison : f32
# |  ^
# | <stdin>:31:39: note: previous match ended here
# |  affine.for %arg2 = 0 to %dim step 128 {
# |                                       ^
# | <stdin>:32:1: note: non-matching line after previous match is here
# |  %c0_2 = arith.constant 0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir:79:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[CST:.*]] = ub.poison : f32
# |                ^
# | <stdin>:56:2: note: 'next' match was here
# |  %2 = ub.poison : f32
# |  ^
# | <stdin>:54:39: note: previous match ended here
# |  %1 = affine.apply #map1(%arg3, %arg2)
# |                                       ^
# | <stdin>:55:1: note: non-matching line after previous match is here
# |  %c0_2 = arith.constant 0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir:283:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %{{.*}} = ub.poison : f32
# |                ^
# | <stdin>:212:2: note: 'next' match was here
# |  %0 = ub.poison : f32
# |  ^
# | <stdin>:210:34: note: previous match ended here
# |  affine.for %arg3 = 0 to %dim_0 {
# |                                  ^
# | <stdin>:211:1: note: non-matching line after previous match is here
# |  %c0_2 = arith.constant 0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir:461:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %{{.*}} = ub.poison : f32
# |                ^
# | <stdin>:342:2: note: 'next' match was here
# |  %2 = ub.poison : f32
# |  ^
# | <stdin>:340:29: note: previous match ended here
# |  %1 = affine.apply #map(%c0)
# |                             ^
# | <stdin>:341:1: note: non-matching line after previous match is here
# |  %c0_2 = arith.constant 0 : index
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |          10:  %dim_1 = memref.dim %arg1, %c2 : memref<?x?x?xf32> 
# |          11:  affine.for %arg2 = 0 to %dim step 128 { 
# |          12:  %0 = affine.apply #map(%c0) 
# |          13:  %1 = affine.apply #map(%c0) 
# |          14:  %c0_2 = arith.constant 0 : index 
# |          15:  %2 = ub.poison : f32 
# | next:24       !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |          16:  %3 = vector.transfer_read %arg0[%0, %1], %2 {in_bounds = [true], permutation_map = #map1} : memref<?x?xf32>, vector<128xf32> 
# |          17:  } 
# |          18:  return 
# |          19:  } 
# |          20: } 
# |           .
# |           .
# |           .
# |          28:  %dim = memref.dim %arg0, %c0 : memref<?x?xf32> 
# |          29:  %dim_0 = memref.dim %arg0, %c1 : memref<?x?xf32> 
# |          30:  %dim_1 = memref.dim %arg1, %c2 : memref<?x?x?xf32> 
# |          31:  affine.for %arg2 = 0 to %dim step 128 { 
# |          32:  %c0_2 = arith.constant 0 : index 
# |          33:  %0 = ub.poison : f32 
# | next:50       !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |          34:  %1 = vector.transfer_read %arg0[%c0, %arg2], %0 : memref<?x?xf32>, vector<128xf32> 
# |          35:  } 
# |          36:  return 
# |          37:  } 
# |          38: } 
# |           .
# |           .
# |           .
# |          51:  affine.for %arg2 = 0 to %dim step 128 { 
# |          52:  affine.for %arg3 = 0 to %dim_0 { 
# |          53:  %0 = affine.apply #map(%arg3, %arg2) 
# |          54:  %1 = affine.apply #map1(%arg3, %arg2) 
# |          55:  %c0_2 = arith.constant 0 : index 
# |          56:  %2 = ub.poison : f32 
# | next:79       !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |          57:  %3 = vector.transfer_read %arg0[%0, %1], %2 : memref<?x?xf32>, vector<128xf32> 
# |          58:  } 
# |          59:  } 
# |          60:  return 
# |          61:  } 
# |           .
# |           .
# |           .
# |         207:  %dim_0 = memref.dim %arg0, %c1 : memref<?x?xf32> 
# |         208:  %dim_1 = memref.dim %arg1, %c2 : memref<?x?x?xf32> 
# |         209:  affine.for %arg2 = 0 to %dim step 128 { 
# |         210:  affine.for %arg3 = 0 to %dim_0 { 
# |         211:  %c0_2 = arith.constant 0 : index 
# |         212:  %0 = ub.poison : f32 
# | next:283      !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         213:  %1 = vector.transfer_read %arg0[%arg3, %arg2], %0 : memref<?x?xf32>, vector<128xf32> 
# |         214:  } 
# |         215:  } 
# |         216:  return 
# |         217:  } 
# |           .
# |           .
# |           .
# |         337:  affine.for %arg2 = 0 to %dim { 
# |         338:  affine.for %arg3 = 0 to %dim step 128 { 
# |         339:  %0 = affine.apply #map(%c0) 
# |         340:  %1 = affine.apply #map(%c0) 
# |         341:  %c0_2 = arith.constant 0 : index 
# |         342:  %2 = ub.poison : f32 
# | next:461      !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         343:  %3 = vector.transfer_read %arg0[%0, %1], %2 {in_bounds = [true], permutation_map = #map1} : memref<?x?xf32>, vector<128xf32> 
# |         344:  } 
# |         345:  } 
# |         346:  return 
# |         347:  } 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>MLIR.Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir -affine-super-vectorize="virtual-vector-size=8 test-fastest-varying=0" -split-input-file | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir '-affine-super-vectorize=virtual-vector-size=8 test-fastest-varying=0' -split-input-file
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir:14:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[CST:.*]] = ub.poison : f32
# |                ^
# | <stdin>:11:2: note: 'next' match was here
# |  %2 = ub.poison : f32
# |  ^
# | <stdin>:9:32: note: previous match ended here
# |  %1 = affine.apply #map1(%arg4)
# |                                ^
# | <stdin>:10:1: note: non-matching line after previous match is here
# |  %c0 = arith.constant 0 : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir:44:45: error: undefined variable: $MAP_ID2
# | // CHECK-NEXT: %[[S0:.*]] = affine.apply #[[$MAP_ID2]](%[[ARG4]])
# |                                             ^
# | <stdin>:27:37: note: with "ARG4" equal to "arg4"
# |  affine.for %arg4 = 0 to 48 step 8 {
# |                                     ^
# | <stdin>:28:2: note: possible intended match here
# |  %0 = affine.apply #map(%arg4)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir:143:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: %[[CST:.*]] = ub.poison : f32
# |                ^
# | <stdin>:93:2: note: 'next' match was here
# |  %3 = ub.poison : f32
# |  ^
# | <stdin>:91:46: note: previous match ended here
# |  %2 = affine.apply #map2(%arg3, %arg4, %arg2)
# |                                              ^
# | <stdin>:92:1: note: non-matching line after previous match is here
# |  %c0 = arith.constant 0 : index
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Affine/SuperVectorize/vectorize_affine_apply.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |            6:  affine.for %arg3 = 0 to 24 { 
# |            7:  affine.for %arg4 = 0 to 48 step 8 { 
# |            8:  %0 = affine.apply #map(%arg3) 
# |            9:  %1 = affine.apply #map1(%arg4) 
# |           10:  %c0 = arith.constant 0 : index 
# |           11:  %2 = ub.poison : f32 
# | next:14        !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |           12:  %3 = vector.transfer_read %arg0[%arg2, %0, %1], %2 {in_bounds = [true]} : memref<8x12x16xf32>, vector<8xf32> 
# |           13:  vector.transfer_write %3, %arg1[%arg2, %arg3, %arg4] {in_bounds = [true]} : vector<8xf32>, memref<8x24x48xf32> 
# |           14:  } 
# |           15:  } 
# |           16:  } 
# |            .
# |            .
# |            .
# |           22: #map = affine_map<(d0) -> (d0 mod 16 + 1)> 
# |           23: module { 
# |           24:  func.func @vec_affine_apply_2(%arg0: memref<8x12x16xf32>, %arg1: memref<8x24x48xf32>) { 
# |           25:  affine.for %arg2 = 0 to 8 { 
# |           26:  affine.for %arg3 = 0 to 12 { 
# |           27:  affine.for %arg4 = 0 to 48 step 8 { 
# | next:44'0                                         X error: match failed for invalid pattern
# | next:44'1                                           undefined variable: $MAP_ID2
# | next:44'2                                           with "ARG4" equal to "arg4"
# |           28:  %0 = affine.apply #map(%arg4) 
# | next:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:44'3      ?                              possible intended match
# |           29:  %c0 = arith.constant 0 : index 
# | next:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           30:  %1 = ub.poison : f32 
# | next:44'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           31:  %2 = vector.transfer_read %arg0[%arg2, %arg3, %0], %1 {in_bounds = [true]} : memref<8x12x16xf32>, vector<8xf32> 
# | next:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           32:  vector.transfer_write %2, %arg1[%arg2, %arg3, %arg4] {in_bounds = [true]} : vector<8xf32>, memref<8x24x48xf32> 
# | next:44'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           33:  } 
# | next:44'0     ~~~
# |            .
# |            .
# |            .
# |           88:  affine.for %arg5 = 0 to 48 step 8 { 
# |           89:  %0 = affine.apply #map(%arg3, %arg4, %arg2) 
# |           90:  %1 = affine.apply #map1(%arg3, %arg4, %arg2) 
# |           91:  %2 = affine.apply #map2(%arg3, %arg4, %arg2) 
# |           92:  %c0 = arith.constant 0 : index 
# |           93:  %3 = ub.poison : f32 
# | next:143       !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |           94:  %4 = vector.transfer_read %arg0[%0, %1, %2], %3 {in_bounds = [true], permutation_map = #map3} : memref<8x12x16xf32>, vector<8xf32> 
# |           95:  vector.transfer_write %4, %arg1[%arg3, %arg4, %arg5] {in_bounds = [true]} : vector<8xf32>, memref<8x24x48xf32> 
# |           96:  } 
# |           97:  } 
# |           98:  } 
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/202766


More information about the Mlir-commits mailing list