[Mlir-commits] [mlir] [mlir][Vector] Update patterns for flattening vector.xfer Ops (1/N) (PR #73522)
Han-Chung Wang
llvmlistbot at llvm.org
Thu Nov 30 13:36:48 PST 2023
================
@@ -54,11 +121,8 @@ func.func @transfer_read_0d(%arg : memref<i8>) -> vector<i8> {
return %0 : vector<i8>
}
-// CHECK-LABEL: func @transfer_read_0d
-// CHECK-SAME: %[[ARG:.+]]: memref<i8>
-// CHECK: %[[CST:.+]] = arith.constant 0 : i8
-// CHECK: %[[READ:.+]] = vector.transfer_read %[[ARG]][], %[[CST]] : memref<i8>
-// CHECK: return %[[READ]]
+// CHECK-NOT: memref.collapse_shape
----------------
hanhanW wrote:
I could be wrong on the purpose of these tests. They look like negative tests, and we want to test all the patterns (in `test-vector-transfer-flatten-patterns`) are not run on them. In this context, we check if the vector.transfer_read/write ops are not modified (like `transfer_read_flattenable_negative` and `transfer_read_flattenable_negative2`).
Checking if there are `memref.collapse_shape` or `vector.shape_cast` ops seems to carry unnecessary information (e.g., implementation details) to the test.
It's better to me if we can keep `CHECK-LABEL: func @...` at least. It ensures that the `CHECK` and `CHECK-NOT` are corresponding to the body of the function.
https://github.com/llvm/llvm-project/pull/73522
More information about the Mlir-commits
mailing list