From 41f3602dfa5fff7bdd416cb2d4625bd7afdf63c0 Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Tue, 20 Sep 2022 19:00:32 -0400 Subject: [PATCH] [mlir][arith] Fix constant naming in integration tests. NFC. Suggested by @antiagainst in D134321. --- .../Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir | 14 +++++++------- .../CPU/test-wide-int-emulation-constants-i16.mlir | 8 ++++---- .../Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir | 14 +++++++------- .../Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir | 7 +++---- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir index 96a5469..fcf70e5 100644 --- a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir +++ b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir @@ -29,8 +29,8 @@ func.func @check_addi(%lhs : i16, %rhs : i16) -> () { func.func @entry() { %cst0 = arith.constant 0 : i16 %cst1 = arith.constant 1 : i16 - %cst_1 = arith.constant -1 : i16 - %cst_3 = arith.constant -3 : i16 + %cst_n1 = arith.constant -1 : i16 + %cst_n3 = arith.constant -3 : i16 %cst13 = arith.constant 13 : i16 %cst37 = arith.constant 37 : i16 @@ -47,11 +47,11 @@ func.func @entry() { // CHECK-NEXT: 2 func.call @check_addi(%cst1, %cst1) : (i16, i16) -> () // CHECK-NEXT: 0 - func.call @check_addi(%cst1, %cst_1) : (i16, i16) -> () + func.call @check_addi(%cst1, %cst_n1) : (i16, i16) -> () // CHECK-NEXT: -2 - func.call @check_addi(%cst_1, %cst_1) : (i16, i16) -> () + func.call @check_addi(%cst_n1, %cst_n1) : (i16, i16) -> () // CHECK-NEXT: -2 - func.call @check_addi(%cst1, %cst_3) : (i16, i16) -> () + func.call @check_addi(%cst1, %cst_n3) : (i16, i16) -> () // CHECK-NEXT: 26 func.call @check_addi(%cst13, %cst13) : (i16, i16) -> () @@ -61,13 +61,13 @@ func.func @entry() { func.call @check_addi(%cst37, %cst42) : (i16, i16) -> () // CHECK-NEXT: 255 - func.call @check_addi(%cst_1, %cst256) : (i16, i16) -> () + func.call @check_addi(%cst_n1, %cst256) : (i16, i16) -> () // CHECK-NEXT: 269 func.call @check_addi(%cst256, %cst13) : (i16, i16) -> () // CHECK-NEXT: 293 func.call @check_addi(%cst256, %cst37) : (i16, i16) -> () // CHECK-NEXT: 253 - func.call @check_addi(%cst256, %cst_3) : (i16, i16) -> () + func.call @check_addi(%cst256, %cst_n3) : (i16, i16) -> () // CHECK-NEXT: -32756 func.call @check_addi(%cst13, %cst_i16_max) : (i16, i16) -> () diff --git a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir index 22ef5d4..e65589d 100644 --- a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir +++ b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir @@ -21,8 +21,8 @@ func.func @emulate_constant(%first : i16) { %cst0 = arith.constant 0 : i16 %cst1 = arith.constant 1 : i16 - %cst_1 = arith.constant -1 : i16 - %cst_3 = arith.constant -3 : i16 + %cst_n1 = arith.constant -1 : i16 + %cst_n3 = arith.constant -3 : i16 %cst13 = arith.constant 13 : i16 %cst256 = arith.constant 256 : i16 @@ -36,9 +36,9 @@ func.func @emulate_constant(%first : i16) { vector.print %cst1 : i16 // EMULATED-NEXT: ( -1, -1 ) - vector.print %cst_1 : i16 + vector.print %cst_n1 : i16 // EMULATED-NEXT: ( -3, -1 ) - vector.print %cst_3 : i16 + vector.print %cst_n3 : i16 // EMULATED-NEXT: ( 13, 0 ) vector.print %cst13 : i16 diff --git a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir index 976e28f..ab0ded7 100644 --- a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir +++ b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir @@ -29,8 +29,8 @@ func.func @check_muli(%lhs : i16, %rhs : i16) -> () { func.func @entry() { %cst0 = arith.constant 0 : i16 %cst1 = arith.constant 1 : i16 - %cst_1 = arith.constant -1 : i16 - %cst_3 = arith.constant -3 : i16 + %cst_n1 = arith.constant -1 : i16 + %cst_n3 = arith.constant -3 : i16 %cst13 = arith.constant 13 : i16 %cst37 = arith.constant 37 : i16 @@ -47,11 +47,11 @@ func.func @entry() { // CHECK-NEXT: 1 func.call @check_muli(%cst1, %cst1) : (i16, i16) -> () // CHECK-NEXT: -1 - func.call @check_muli(%cst1, %cst_1) : (i16, i16) -> () + func.call @check_muli(%cst1, %cst_n1) : (i16, i16) -> () // CHECK-NEXT: 1 - func.call @check_muli(%cst_1, %cst_1) : (i16, i16) -> () + func.call @check_muli(%cst_n1, %cst_n1) : (i16, i16) -> () // CHECK-NEXT: -3 - func.call @check_muli(%cst1, %cst_3) : (i16, i16) -> () + func.call @check_muli(%cst1, %cst_n3) : (i16, i16) -> () // CHECK-NEXT: 169 func.call @check_muli(%cst13, %cst13) : (i16, i16) -> () @@ -61,13 +61,13 @@ func.func @entry() { func.call @check_muli(%cst37, %cst42) : (i16, i16) -> () // CHECK-NEXT: -256 - func.call @check_muli(%cst_1, %cst256) : (i16, i16) -> () + func.call @check_muli(%cst_n1, %cst256) : (i16, i16) -> () // CHECK-NEXT: 3328 func.call @check_muli(%cst256, %cst13) : (i16, i16) -> () // CHECK-NEXT: 9472 func.call @check_muli(%cst256, %cst37) : (i16, i16) -> () // CHECK-NEXT: -768 - func.call @check_muli(%cst256, %cst_3) : (i16, i16) -> () + func.call @check_muli(%cst256, %cst_n3) : (i16, i16) -> () // CHECK-NEXT: 32755 func.call @check_muli(%cst13, %cst_i16_max) : (i16, i16) -> () diff --git a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir index 5663723..2aa75f3 100644 --- a/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir +++ b/mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir @@ -35,8 +35,7 @@ func.func @entry() { %cst9 = arith.constant 9 : i16 %cst15 = arith.constant 15 : i16 - %cst_1 = arith.constant -1 : i16 - %cst_3 = arith.constant -3 : i16 + %cst_n1 = arith.constant -1 : i16 %cst1337 = arith.constant 1337 : i16 @@ -52,8 +51,8 @@ func.func @entry() { func.call @check_shrui(%cst0, %cst1) : (i16, i16) -> () func.call @check_shrui(%cst1, %cst1) : (i16, i16) -> () func.call @check_shrui(%cst1, %cst0) : (i16, i16) -> () - func.call @check_shrui(%cst_1, %cst1) : (i16, i16) -> () - func.call @check_shrui(%cst_1, %cst15) : (i16, i16) -> () + func.call @check_shrui(%cst_n1, %cst1) : (i16, i16) -> () + func.call @check_shrui(%cst_n1, %cst15) : (i16, i16) -> () // CHECK-NEXT: 1337 // CHECK-NEXT: 334 -- 2.7.4