[Mlir-commits] [mlir] [MemRef] Remove redundant elide-rc through load tests (PR #213033)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Aug 6 03:51:44 PDT 2026
================
@@ -742,56 +742,9 @@ func.func private @collapse_scalar(%src : memref<1x1x1xi64>) {
return
}
-// CHECK-LABEL: func.func private @expand_left_vector(
-// CHECK-SAME: %[[SRC:.*]]: memref<999xi64>) {
-func.func private @expand_left_vector(%src : memref<999xi64>) {
- // CHECK-DAG: %[[IDX_1:.*]] = arith.constant 0 : index
- // CHECK-DAG: %[[IDX_2:.*]] = arith.constant 13 : index
- %idx_1 = arith.constant 0 : index
- %idx_2 = arith.constant 13 : index
- // CHECK-NOT: memref.reinterpret_cast
- %reinterpret_cast = memref.reinterpret_cast %src
- to offset: [0], sizes: [1, 1, 999], strides: [999, 999, 1]
- : memref<999xi64> to memref<1x1x999xi64>
- // CHECK: %[[LOAD:.*]] = memref.load %[[SRC]][%[[IDX_2]]] : memref<999xi64>
- %0 = memref.load %reinterpret_cast[%idx_1, %idx_1, %idx_2] : memref<1x1x999xi64>
- return
-}
-
-// CHECK-LABEL: func.func private @expand_left_vector_dynamic_index(
-// CHECK-SAME: %[[I:.*]]: index
-// CHECK-SAME: %[[SRC:.*]]: memref<999xi64>) {
-func.func private @expand_left_vector_dynamic_index(%i : index,
- %src : memref<999xi64>) {
- // CHECK: %[[IDX:.*]] = arith.constant 0 : index
- %idx = arith.constant 0 : index
- // CHECK-NOT: memref.reinterpret_cast
- %reinterpret_cast = memref.reinterpret_cast %src
- to offset: [0], sizes: [1, 1, 999], strides: [999, 999, 1]
- : memref<999xi64> to memref<1x1x999xi64>
- // CHECK: %[[LOAD:.*]] = memref.load %[[SRC]][%[[I]]] : memref<999xi64>
- %0 = memref.load %reinterpret_cast[%idx, %idx, %i] : memref<1x1x999xi64>
- return
-}
-
-// CHECK-LABEL: func.func private @collapse_left_vector(
-// CHECK-SAME: %[[SRC:.*]]: memref<1x1x999xi64>) {
-func.func private @collapse_left_vector(%src : memref<1x1x999xi64>) {
- // CHECK-DAG: %[[IDX_1:.*]] = arith.constant 0 : index
- // CHECK-DAG: %[[IDX_2:.*]] = arith.constant 13 : index
- %idx = arith.constant 13 : index
- // CHECK-NOT: memref.reinterpret_cast
- %reinterpret_cast = memref.reinterpret_cast %src
- to offset: [0], sizes: [999], strides: [1]
- : memref<1x1x999xi64> to memref<999xi64>
- // CHECK: %[[LOAD:.*]] = memref.load %[[SRC]][%[[IDX_1]], %[[IDX_1]], %[[IDX_2]]] : memref<1x1x999xi64>
- %0 = memref.load %reinterpret_cast[%idx] : memref<999xi64>
- return
-}
-
-// CHECK-LABEL: func.func private @partial_expand_left_vector(
+// CHECK-LABEL: func.func private @expand_vector(
// CHECK-SAME: %[[SRC:.*]]: memref<1x999xf32>) {
-func.func private @partial_expand_left_vector(
+func.func private @expand_vector(
----------------
banach-space wrote:
[nit] There are no vectors here ;-) Instead, there's an "effectively 1D MemRef".
https://github.com/llvm/llvm-project/pull/213033
More information about the Mlir-commits
mailing list