Skip to content

Commit 524e0d7

Browse files
committed
refac(tests): generalize some tests
Also, these test cases were affected by the upstream PR llvm/llvm-project#127993
1 parent d5db0dc commit 524e0d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/Dialect/Arith/arith_to_mod_arith.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: zkir-opt --arith-to-mod-arith --split-input-file %s | FileCheck %s --enable-var-scope
22

33
// CHECK-LABEL: @test_lower_add
4-
// CHECK-SAME: (%[[LHS:.*]]: !z2147483648_i33_, %[[RHS:.*]]: !z2147483648_i33_) -> [[T:.*]] {
4+
// CHECK-SAME: (%[[LHS:.*]]: [[T:.*]], %[[RHS:.*]]: [[T]]) -> [[T]] {
55
func.func @test_lower_add(%lhs : i32, %rhs : i32) -> i32 {
66
// CHECK: %[[ADD:.*]] = mod_arith.add %[[LHS]], %[[RHS]] : [[T]]
77
// CHECK: return %[[ADD:.*]] : [[T]]
@@ -10,7 +10,7 @@ func.func @test_lower_add(%lhs : i32, %rhs : i32) -> i32 {
1010
}
1111

1212
// CHECK-LABEL: @test_lower_add_vec
13-
// CHECK-SAME: (%[[LHS:.*]]: tensor<4x!z2147483648_i33_>, %[[RHS:.*]]: tensor<4x!z2147483648_i33_>) -> [[T:.*]] {
13+
// CHECK-SAME: (%[[LHS:.*]]: [[T:.*]], %[[RHS:.*]]: [[T]]) -> [[T]] {
1414
func.func @test_lower_add_vec(%lhs : tensor<4xi32>, %rhs : tensor<4xi32>) -> tensor<4xi32> {
1515
// CHECK: %[[ADD:.*]] = mod_arith.add %[[LHS]], %[[RHS]] : [[T]]
1616
// CHECK: return %[[ADD:.*]] : [[T]]

tests/Dialect/Field/prime_field_to_mod_arith.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func.func @test_lower_add() -> !PF1 {
147147
// CHECK-SAME: (%[[LHS:.*]]: [[T:.*]], %[[RHS:.*]]: [[T]]) -> [[T]] {
148148
func.func @test_lower_add_vec(%lhs : !PFv, %rhs : !PFv) -> !PFv {
149149
// CHECK-NOT: field.add
150-
// CHECK: %[[RES:.*]] = mod_arith.add %[[LHS]], %[[RHS]] : tensor<4x!z3_i32_>
150+
// CHECK: %[[RES:.*]] = mod_arith.add %[[LHS]], %[[RHS]] : [[T]]
151151
%res = field.add %lhs, %rhs : !PFv
152152
// CHECK: return %[[RES]] : [[T]]
153153
return %res : !PFv

0 commit comments

Comments
 (0)