Skip to content

Commit

Permalink
[mlir][Math] Change regex to match fp value on different target.
Browse files Browse the repository at this point in the history
Link: #58048

Reviewed By: ftynse, Mogball

Differential Revision: https://reviews.llvm.org/D134850
  • Loading branch information
jacquesguan authored and jacquesguan committed Oct 12, 2022
1 parent bfe5e81 commit a4ace22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlir/test/Dialect/Math/canonicalize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func.func @trunc_fold_vec() -> (vector<4xf32>) {
}

// CHECK-LABEL: @sin_fold
// CHECK-NEXT: %[[cst:.+]] = arith.constant 0.84{{[0-9]+}} : f32
// CHECK-NEXT: %[[cst:.+]] = arith.constant {{0.84[0-9]+|8.4[0-9]+e-01}} : f32
// CHECK-NEXT: return %[[cst]]
func.func @sin_fold() -> f32 {
%c = arith.constant 1.0 : f32
Expand All @@ -458,7 +458,7 @@ func.func @sin_fold() -> f32 {
}

// CHECK-LABEL: @sin_fold_vec
// CHECK-NEXT: %[[cst:.+]] = arith.constant dense<[0.000000e+00, 0.84{{[0-9]+}}, 0.000000e+00, 0.84{{[0-9]+}}]> : vector<4xf32>
// CHECK-NEXT: %[[cst:.+]] = arith.constant dense<[0.000000e+00, {{0.84[0-9]+|8.4[0-9]+e-01}}, 0.000000e+00, {{0.84[0-9]+|8.4[0-9]+e-01}}]> : vector<4xf32>
// CHECK-NEXT: return %[[cst]]
func.func @sin_fold_vec() -> (vector<4xf32>) {
%v1 = arith.constant dense<[0.0, 1.0, 0.0, 1.0]> : vector<4xf32>
Expand All @@ -467,7 +467,7 @@ func.func @sin_fold_vec() -> (vector<4xf32>) {
}

// CHECK-LABEL: @erf_fold
// CHECK-NEXT: %[[cst:.+]] = arith.constant 0.84{{[0-9]+}} : f32
// CHECK-NEXT: %[[cst:.+]] = arith.constant {{0.84[0-9]+|8.4[0-9]+e-01}} : f32
// CHECK-NEXT: return %[[cst]]
func.func @erf_fold() -> f32 {
%c = arith.constant 1.0 : f32
Expand All @@ -476,7 +476,7 @@ func.func @erf_fold() -> f32 {
}

// CHECK-LABEL: @erf_fold_vec
// CHECK-NEXT: %[[cst:.+]] = arith.constant dense<[0.000000e+00, 0.84{{[0-9]+}}, 0.000000e+00, 0.84{{[0-9]+}}]> : vector<4xf32>
// CHECK-NEXT: %[[cst:.+]] = arith.constant dense<[0.000000e+00, {{0.84[0-9]+|8.4[0-9]+e-01}}, 0.000000e+00, {{0.84[0-9]+|8.4[0-9]+e-01}}]> : vector<4xf32>
// CHECK-NEXT: return %[[cst]]
func.func @erf_fold_vec() -> (vector<4xf32>) {
%v1 = arith.constant dense<[0.0, 1.0, 0.0, 1.0]> : vector<4xf32>
Expand Down

0 comments on commit a4ace22

Please sign in to comment.