Skip to content

Commit 41f3602

Browse files
committed
[mlir][arith] Fix constant naming in integration tests. NFC.
Suggested by @antiagainst in D134321.
1 parent 7d29933 commit 41f3602

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func.func @check_addi(%lhs : i16, %rhs : i16) -> () {
2929
func.func @entry() {
3030
%cst0 = arith.constant 0 : i16
3131
%cst1 = arith.constant 1 : i16
32-
%cst_1 = arith.constant -1 : i16
33-
%cst_3 = arith.constant -3 : i16
32+
%cst_n1 = arith.constant -1 : i16
33+
%cst_n3 = arith.constant -3 : i16
3434

3535
%cst13 = arith.constant 13 : i16
3636
%cst37 = arith.constant 37 : i16
@@ -47,11 +47,11 @@ func.func @entry() {
4747
// CHECK-NEXT: 2
4848
func.call @check_addi(%cst1, %cst1) : (i16, i16) -> ()
4949
// CHECK-NEXT: 0
50-
func.call @check_addi(%cst1, %cst_1) : (i16, i16) -> ()
50+
func.call @check_addi(%cst1, %cst_n1) : (i16, i16) -> ()
5151
// CHECK-NEXT: -2
52-
func.call @check_addi(%cst_1, %cst_1) : (i16, i16) -> ()
52+
func.call @check_addi(%cst_n1, %cst_n1) : (i16, i16) -> ()
5353
// CHECK-NEXT: -2
54-
func.call @check_addi(%cst1, %cst_3) : (i16, i16) -> ()
54+
func.call @check_addi(%cst1, %cst_n3) : (i16, i16) -> ()
5555

5656
// CHECK-NEXT: 26
5757
func.call @check_addi(%cst13, %cst13) : (i16, i16) -> ()
@@ -61,13 +61,13 @@ func.func @entry() {
6161
func.call @check_addi(%cst37, %cst42) : (i16, i16) -> ()
6262

6363
// CHECK-NEXT: 255
64-
func.call @check_addi(%cst_1, %cst256) : (i16, i16) -> ()
64+
func.call @check_addi(%cst_n1, %cst256) : (i16, i16) -> ()
6565
// CHECK-NEXT: 269
6666
func.call @check_addi(%cst256, %cst13) : (i16, i16) -> ()
6767
// CHECK-NEXT: 293
6868
func.call @check_addi(%cst256, %cst37) : (i16, i16) -> ()
6969
// CHECK-NEXT: 253
70-
func.call @check_addi(%cst256, %cst_3) : (i16, i16) -> ()
70+
func.call @check_addi(%cst256, %cst_n3) : (i16, i16) -> ()
7171

7272
// CHECK-NEXT: -32756
7373
func.call @check_addi(%cst13, %cst_i16_max) : (i16, i16) -> ()

mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ func.func @emulate_constant(%first : i16) {
2121

2222
%cst0 = arith.constant 0 : i16
2323
%cst1 = arith.constant 1 : i16
24-
%cst_1 = arith.constant -1 : i16
25-
%cst_3 = arith.constant -3 : i16
24+
%cst_n1 = arith.constant -1 : i16
25+
%cst_n3 = arith.constant -3 : i16
2626

2727
%cst13 = arith.constant 13 : i16
2828
%cst256 = arith.constant 256 : i16
@@ -36,9 +36,9 @@ func.func @emulate_constant(%first : i16) {
3636
vector.print %cst1 : i16
3737

3838
// EMULATED-NEXT: ( -1, -1 )
39-
vector.print %cst_1 : i16
39+
vector.print %cst_n1 : i16
4040
// EMULATED-NEXT: ( -3, -1 )
41-
vector.print %cst_3 : i16
41+
vector.print %cst_n3 : i16
4242

4343
// EMULATED-NEXT: ( 13, 0 )
4444
vector.print %cst13 : i16

mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func.func @check_muli(%lhs : i16, %rhs : i16) -> () {
2929
func.func @entry() {
3030
%cst0 = arith.constant 0 : i16
3131
%cst1 = arith.constant 1 : i16
32-
%cst_1 = arith.constant -1 : i16
33-
%cst_3 = arith.constant -3 : i16
32+
%cst_n1 = arith.constant -1 : i16
33+
%cst_n3 = arith.constant -3 : i16
3434

3535
%cst13 = arith.constant 13 : i16
3636
%cst37 = arith.constant 37 : i16
@@ -47,11 +47,11 @@ func.func @entry() {
4747
// CHECK-NEXT: 1
4848
func.call @check_muli(%cst1, %cst1) : (i16, i16) -> ()
4949
// CHECK-NEXT: -1
50-
func.call @check_muli(%cst1, %cst_1) : (i16, i16) -> ()
50+
func.call @check_muli(%cst1, %cst_n1) : (i16, i16) -> ()
5151
// CHECK-NEXT: 1
52-
func.call @check_muli(%cst_1, %cst_1) : (i16, i16) -> ()
52+
func.call @check_muli(%cst_n1, %cst_n1) : (i16, i16) -> ()
5353
// CHECK-NEXT: -3
54-
func.call @check_muli(%cst1, %cst_3) : (i16, i16) -> ()
54+
func.call @check_muli(%cst1, %cst_n3) : (i16, i16) -> ()
5555

5656
// CHECK-NEXT: 169
5757
func.call @check_muli(%cst13, %cst13) : (i16, i16) -> ()
@@ -61,13 +61,13 @@ func.func @entry() {
6161
func.call @check_muli(%cst37, %cst42) : (i16, i16) -> ()
6262

6363
// CHECK-NEXT: -256
64-
func.call @check_muli(%cst_1, %cst256) : (i16, i16) -> ()
64+
func.call @check_muli(%cst_n1, %cst256) : (i16, i16) -> ()
6565
// CHECK-NEXT: 3328
6666
func.call @check_muli(%cst256, %cst13) : (i16, i16) -> ()
6767
// CHECK-NEXT: 9472
6868
func.call @check_muli(%cst256, %cst37) : (i16, i16) -> ()
6969
// CHECK-NEXT: -768
70-
func.call @check_muli(%cst256, %cst_3) : (i16, i16) -> ()
70+
func.call @check_muli(%cst256, %cst_n3) : (i16, i16) -> ()
7171

7272
// CHECK-NEXT: 32755
7373
func.call @check_muli(%cst13, %cst_i16_max) : (i16, i16) -> ()

mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ func.func @entry() {
3535
%cst9 = arith.constant 9 : i16
3636
%cst15 = arith.constant 15 : i16
3737

38-
%cst_1 = arith.constant -1 : i16
39-
%cst_3 = arith.constant -3 : i16
38+
%cst_n1 = arith.constant -1 : i16
4039

4140
%cst1337 = arith.constant 1337 : i16
4241

@@ -52,8 +51,8 @@ func.func @entry() {
5251
func.call @check_shrui(%cst0, %cst1) : (i16, i16) -> ()
5352
func.call @check_shrui(%cst1, %cst1) : (i16, i16) -> ()
5453
func.call @check_shrui(%cst1, %cst0) : (i16, i16) -> ()
55-
func.call @check_shrui(%cst_1, %cst1) : (i16, i16) -> ()
56-
func.call @check_shrui(%cst_1, %cst15) : (i16, i16) -> ()
54+
func.call @check_shrui(%cst_n1, %cst1) : (i16, i16) -> ()
55+
func.call @check_shrui(%cst_n1, %cst15) : (i16, i16) -> ()
5756

5857
// CHECK-NEXT: 1337
5958
// CHECK-NEXT: 334

0 commit comments

Comments
 (0)