Skip to content

Commit 7071c47

Browse files
authored
add test
1 parent 71bd6a1 commit 7071c47

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mlir/test/Dialect/Mesh/simplifications.mlir

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,15 @@ func.func @all_reduce_arith_minsi_endomorphism(
165165
// CHECK: return %[[ALL_REDUCE_RES]]
166166
return %2 : tensor<5xi32>
167167
}
168+
169+
// Ensure this case without endomorphism op not crash.
170+
// CHECK-LABEL: func.func @no_endomorphism_op
171+
func.func @no_endomorphism_op(%arg0: tensor<2xi64>) -> i64 {
172+
%c0 = arith.constant 0 : index
173+
%c1_i64 = arith.constant 1 : i64
174+
// CHECK: tensor.extract
175+
%extracted = tensor.extract %arg0[%c0] : tensor<2xi64>
176+
// CHECK: arith.maxsi
177+
%0 = arith.maxsi %extracted, %c1_i64 : i64
178+
return %0 : i64
179+
}

0 commit comments

Comments
 (0)