@@ -32,23 +32,23 @@ func.func @entry() {
32
32
func.call @check_subi (%lhs1 , %rhs1 ) : (i32 , i32 ) -> ()
33
33
// CHECK-NEXT: 1
34
34
func.call @check_subi (%rhs1 , %lhs1 ) : (i32 , i32 ) -> ()
35
-
35
+
36
36
%lhs2 = arith.constant 1 : i32
37
37
%rhs2 = arith.constant -2 : i32
38
38
39
39
// CHECK-NEXT: 3
40
40
func.call @check_subi (%lhs2 , %rhs2 ) : (i32 , i32 ) -> ()
41
41
// CHECK-NEXT: -3
42
42
func.call @check_subi (%rhs2 , %lhs2 ) : (i32 , i32 ) -> ()
43
-
43
+
44
44
%lhs3 = arith.constant -1 : i32
45
45
%rhs3 = arith.constant -2 : i32
46
46
47
47
// CHECK-NEXT: 1
48
48
func.call @check_subi (%lhs3 , %rhs3 ) : (i32 , i32 ) -> ()
49
49
// CHECK-NEXT: -1
50
50
func.call @check_subi (%rhs3 , %lhs3 ) : (i32 , i32 ) -> ()
51
-
51
+
52
52
// Overflow from the upper/lower part.
53
53
%lhs4 = arith.constant 131074 : i32
54
54
%rhs4 = arith.constant 3 : i32
@@ -59,15 +59,15 @@ func.func @entry() {
59
59
func.call @check_subi (%rhs4 , %lhs4 ) : (i32 , i32 ) -> ()
60
60
61
61
// Overflow in both parts.
62
- %lhs5 = arith.constant 16385027 : i32
62
+ %lhs5 = arith.constant 16385027 : i32
63
63
%rhs5 = arith.constant 16450564 : i32
64
64
65
65
// CHECK-NEXT: -65537
66
66
func.call @check_subi (%lhs5 , %rhs5 ) : (i32 , i32 ) -> ()
67
67
// CHECK-NEXT: 65537
68
68
func.call @check_subi (%rhs5 , %lhs5 ) : (i32 , i32 ) -> ()
69
69
70
- %lhs6 = arith.constant 65536 : i32
70
+ %lhs6 = arith.constant 65536 : i32
71
71
%rhs6 = arith.constant 1 : i32
72
72
73
73
// CHECK-NEXT: 65535
@@ -76,7 +76,7 @@ func.func @entry() {
76
76
func.call @check_subi (%rhs6 , %lhs6 ) : (i32 , i32 ) -> ()
77
77
78
78
// Max/Min (un)signed integers.
79
- %sintmax = arith.constant 2147483647 : i32
79
+ %sintmax = arith.constant 2147483647 : i32
80
80
%sintmin = arith.constant -2147483648 : i32
81
81
%uintmax = arith.constant -1 : i32
82
82
%uintmin = arith.constant 0 : i32
@@ -98,7 +98,6 @@ func.func @entry() {
98
98
func.call @check_subi (%uintmin , %cst1 ) : (i32 , i32 ) -> ()
99
99
// CHECK-NEXT: 1
100
100
func.call @check_subi (%uintmin , %uintmax ) : (i32 , i32 ) -> ()
101
-
102
101
103
102
return
104
103
}
0 commit comments