[Mlir-commits] [mlir] [mlir][Vector] Fix an assertion on failing cast in vector-transfer-flatten-patterns (PR #86030)

Balaji V. Iyer. llvmlistbot at llvm.org
Mon Mar 25 13:08:17 PDT 2024


================
@@ -93,13 +93,16 @@ func.func @test_index_no_linearize(%arg0: vector<2x2xindex>, %arg1: vector<2x2xi
 
 // -----
 
-// This test exists to make sure it doesn't hit an assert and compiles through.
-func.func @simple_mul(%arg0: tensor<4xf32>, %arg1: tensor<4xf32>) -> (tensor<4xf32>, tensor<4xf32>) {
+// CHECK-LABEL: func.func @nonvec_result
+// CHECK128-LABEL: func.func @nonvec_result
+// CHECK0-LABEL: func.func @nonvec_result
+// CHECK-SAME: (%[[ARG0:.*]]: tensor<4xf32>, %[[ARG1:.*]]: tensor<4xf32>)
+// CHECK128-SAME: (%[[ARG0:.*]]: tensor<4xf32>, %[[ARG1:.*]]: tensor<4xf32>)
+// CHECK0-SAME: (%[[ARG0:.*]]: tensor<4xf32>, %[[ARG1:.*]]: tensor<4xf32>)
+func.func @nonvec_result(%arg0: tensor<4xf32>, %arg1: tensor<4xf32>) -> (tensor<4xf32>, tensor<4xf32>) {
+    // CHECK: %[[MULF:.*]] = arith.mulf %[[ARG0]], %[[ARG1]]
+    // CHECK128: %[[MULF:.*]] = arith.mulf %[[ARG0]], %[[ARG1]]
+    // CHECK0: %[[MULF:.*]] = arith.mulf %[[ARG0]], %[[ARG1]]
----------------
bviyer wrote:

I made the test a 2D tensor (2x2xf32) and added a check for a 2d multiplication.

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


More information about the Mlir-commits mailing list