Skip to content

Commit 1217ab5

Browse files
committed
add more corner test
1 parent ec294c9 commit 1217ab5

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

mlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,26 @@ func.func @entry() {
108108

109109
// -----
110110

111-
func.func @non_inline_function() -> (i64, i64) {
111+
func.func @non_inline_function() -> (i64, i64, i64, i64, i64, i64) {
112112
%MIN_INT_MINUS_ONE = arith.constant -9223372036854775807 : i64
113113
%NEG_ONE = arith.constant -1 : i64
114-
return %MIN_INT_MINUS_ONE, %NEG_ONE : i64, i64
114+
%MIN_INT = arith.constant -9223372036854775808 : i64
115+
%ONE = arith.constant 1 : i64
116+
%MAX_INT = arith.constant 9223372036854775807 : i64
117+
return %MIN_INT_MINUS_ONE, %NEG_ONE, %MIN_INT, %ONE, %MAX_INT, %NEG_ONE : i64, i64, i64, i64, i64, i64
115118
}
116119

117120
func.func @main() {
118-
%0:2 = call @non_inline_function() : () -> (i64, i64)
121+
%0:6 = call @non_inline_function() : () -> (i64, i64, i64, i64, i64, i64)
119122
%1 = arith.floordivsi %0#0, %0#1 : i64
123+
%2 = arith.floordivsi %0#2, %0#3 : i64
124+
%3 = arith.floordivsi %0#4, %0#5 : i64
120125
vector.print %1 : i64
126+
vector.print %2 : i64
127+
vector.print %3 : i64
121128
return
122129
}
123130

124131
// SCHECK: 9223372036854775807
132+
// SCHECK: -9223372036854775808
133+
// SCHECK: -9223372036854775807

0 commit comments

Comments
 (0)