[Mlir-commits] [mlir] 41f3602 - [mlir][arith] Fix constant naming in integration tests. NFC.
Jakub Kuderski
llvmlistbot at llvm.org
Tue Sep 20 16:02:16 PDT 2022
Author: Jakub Kuderski
Date: 2022-09-20T19:00:32-04:00
New Revision: 41f3602dfa5fff7bdd416cb2d4625bd7afdf63c0
URL: https://github.com/llvm/llvm-project/commit/41f3602dfa5fff7bdd416cb2d4625bd7afdf63c0
DIFF: https://github.com/llvm/llvm-project/commit/41f3602dfa5fff7bdd416cb2d4625bd7afdf63c0.diff
LOG: [mlir][arith] Fix constant naming in integration tests. NFC.
Suggested by @antiagainst in D134321.
Added:
Modified:
mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-addi-i16.mlir
mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-constants-i16.mlir
mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-muli-i16.mlir
mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-shrui-i16.mlir
Removed:
################################################################################
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 96a54696adf4..fcf70e5ea8d7 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 22ef5d408745..e65589d9b589 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 976e28fe72ca..ab0ded7e0448 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 5663723d4267..2aa75f32bd00 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
More information about the Mlir-commits
mailing list