Skip to content

Commit a64e6f4

Browse files
authored
[MLIR][Vector] Test to accompany bug fix (#154434)
Bug introduced in #93664 The bug was fixed in #152957 But there was no test. This PR adds a test that hits the assertion failure if the fix is reverted (if I change dyn_cast to cast).
1 parent de7bac6 commit a64e6f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mlir/test/Dialect/Vector/transform-vector.mlir

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ func.func @arith_to_outerproduct_trans_rhs_f32(%lhs: vector<16xf32>, %rhs: vecto
121121
return %mul: vector<8x16xf32>
122122
}
123123

124+
// See https://github.com/llvm/llvm-project/pull/152957
125+
// CHECK-LABEL: func.func @negative_non_vector_type
126+
func.func @negative_non_vector_type(%lhs: f32, %rhs: f32) -> f32 {
127+
%mul = arith.mulf %lhs, %rhs : f32
128+
return %mul: f32
129+
}
130+
124131
module attributes {transform.with_named_sequence} {
125132
transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
126133
%func = transform.structured.match ops{["func.func"]} in %module_op : (!transform.any_op) -> !transform.any_op

0 commit comments

Comments
 (0)