Skip to content

Commit aa23bde

Browse files
committed
Fix false positives
1 parent 4f6aa7a commit aa23bde

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

mlir/test/Conversion/ArithToEmitC/arith-to-emitc.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,17 +318,17 @@ func.func @arith_cmpf_oge(%arg0: f32, %arg1: f32) -> i1 {
318318

319319
// -----
320320

321-
func.func @arith_cmpf_old(%arg0: f32, %arg1: f32) -> i1 {
322-
// CHECK-LABEL: arith_cmpf_old
321+
func.func @arith_cmpf_olt(%arg0: f32, %arg1: f32) -> i1 {
322+
// CHECK-LABEL: arith_cmpf_olt
323323
// CHECK-SAME: ([[Arg0:[^ ]*]]: f32, [[Arg1:[^ ]*]]: f32)
324324
// CHECK-DAG: [[LT:[^ ]*]] = emitc.cmp lt, [[Arg0]], [[Arg1]] : (f32, f32) -> i1
325325
// CHECK-DAG: [[NotNaNArg0:[^ ]*]] = emitc.cmp eq, [[Arg0]], [[Arg0]] : (f32, f32) -> i1
326326
// CHECK-DAG: [[NotNaNArg1:[^ ]*]] = emitc.cmp eq, [[Arg1]], [[Arg1]] : (f32, f32) -> i1
327327
// CHECK-DAG: [[Ordered:[^ ]*]] = emitc.logical_and [[NotNaNArg0]], [[NotNaNArg1]] : i1, i1
328328
// CHECK-DAG: [[OLT:[^ ]*]] = emitc.logical_and [[Ordered]], [[LT]] : i1, i1
329-
%old = arith.cmpf old, %arg0, %arg1 : f32
329+
%olt = arith.cmpf olt, %arg0, %arg1 : f32
330330
// CHECK: return [[OLT]]
331-
return %old: i1
331+
return %olt: i1
332332
}
333333

334334
// -----

mlir/test/Conversion/ArithToSPIRV/arith-to-spirv.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func.func @cmpf(%arg0 : f32, %arg1 : f32) {
315315
// CHECK: spirv.FOrdGreaterThanEqual
316316
%3 = arith.cmpf oge, %arg0, %arg1 : f32
317317
// CHECK: spirv.FOrdLessThan
318-
%4 = arith.cmpf old, %arg0, %arg1 : f32
318+
%4 = arith.cmpf olt, %arg0, %arg1 : f32
319319
// CHECK: spirv.FOrdLessThanEqual
320320
%5 = arith.cmpf ole, %arg0, %arg1 : f32
321321
// CHECK: spirv.FOrdNotEqual

mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func.func @complex_div(%lhs: complex<f32>, %rhs: complex<f32>) -> complex<f32> {
167167
// CHECK: %[[ZERO_MULTIPLICATOR_2:.*]] = arith.subf %[[RHS_REAL_IS_INF_WITH_SIGN_TIMES_LHS_IMAG]], %[[RHS_IMAG_IS_INF_WITH_SIGN_TIMES_LHS_REAL]] : f32
168168
// CHECK: %[[RESULT_IMAG_4:.*]] = arith.mulf %[[ZERO]], %[[ZERO_MULTIPLICATOR_2]] : f32
169169

170-
// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf old, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32
170+
// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32
171171
// CHECK: %[[RESULT_REAL:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_REAL_1]], %[[RESULT_REAL_2]] : f32
172172
// CHECK: %[[RESULT_IMAG:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_IMAG_1]], %[[RESULT_IMAG_2]] : f32
173173
// CHECK: %[[RESULT_REAL_SPECIAL_CASE_3:.*]] = arith.select %[[FINITE_NUM_INFINITE_DENOM]], %[[RESULT_REAL_4]], %[[RESULT_REAL]] : f32
@@ -1517,7 +1517,7 @@ func.func @complex_atan2_with_fmf(%lhs: complex<f32>,
15171517
// CHECK: %[[VAR398:.*]] = arith.mulf %[[VAR327]], %[[VAR392]] fastmath<nnan,contract> : f32
15181518
// CHECK: %[[VAR399:.*]] = arith.subf %[[VAR397]], %[[VAR398]] fastmath<nnan,contract> : f32
15191519
// CHECK: %[[VAR400:.*]] = arith.mulf %[[CST_16]], %[[VAR399]] fastmath<nnan,contract> : f32
1520-
// CHECK: %[[VAR401:.*]] = arith.cmpf old, %[[VAR349]], %[[VAR351]] : f32
1520+
// CHECK: %[[VAR401:.*]] = arith.cmpf olt, %[[VAR349]], %[[VAR351]] : f32
15211521
// CHECK: %[[VAR402:.*]] = arith.select %[[VAR401]], %[[VAR336]], %[[VAR345]] : f32
15221522
// CHECK: %[[VAR403:.*]] = arith.select %[[VAR401]], %[[VAR339]], %[[VAR348]] : f32
15231523
// CHECK: %[[VAR404:.*]] = arith.select %[[VAR388]], %[[VAR396]], %[[VAR402]] : f32
@@ -1743,7 +1743,7 @@ func.func @complex_div_with_fmf(%lhs: complex<f32>, %rhs: complex<f32>) -> compl
17431743
// CHECK: %[[ZERO_MULTIPLICATOR_2:.*]] = arith.subf %[[RHS_REAL_IS_INF_WITH_SIGN_TIMES_LHS_IMAG]], %[[RHS_IMAG_IS_INF_WITH_SIGN_TIMES_LHS_REAL]] fastmath<nnan,contract> : f32
17441744
// CHECK: %[[RESULT_IMAG_4:.*]] = arith.mulf %[[ZERO]], %[[ZERO_MULTIPLICATOR_2]] fastmath<nnan,contract> : f32
17451745

1746-
// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf old, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32
1746+
// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32
17471747
// CHECK: %[[RESULT_REAL:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_REAL_1]], %[[RESULT_REAL_2]] : f32
17481748
// CHECK: %[[RESULT_IMAG:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_IMAG_1]], %[[RESULT_IMAG_2]] : f32
17491749
// CHECK: %[[RESULT_REAL_SPECIAL_CASE_3:.*]] = arith.select %[[FINITE_NUM_INFINITE_DENOM]], %[[RESULT_REAL_4]], %[[RESULT_REAL]] : f32

mlir/test/Conversion/SPIRVToLLVM/comparison-ops-to-llvm.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ spirv.func @f_ord_greater_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>
240240

241241
// CHECK-LABEL: @f_ord_less_than_scalar
242242
spirv.func @f_ord_less_than_scalar(%arg0: f64, %arg1: f64) "None" {
243-
// CHECK: llvm.fcmp "old" %{{.*}}, %{{.*}} : f64
243+
// CHECK: llvm.fcmp "olt" %{{.*}}, %{{.*}} : f64
244244
%0 = spirv.FOrdLessThan %arg0, %arg1 : f64
245245
spirv.Return
246246
}
247247

248248
// CHECK-LABEL: @f_ord_less_than_vector
249249
spirv.func @f_ord_less_than_vector(%arg0: vector<2xf64>, %arg1: vector<2xf64>) "None" {
250-
// CHECK: llvm.fcmp "old" %{{.*}}, %{{.*}} : vector<2xf64>
250+
// CHECK: llvm.fcmp "olt" %{{.*}}, %{{.*}} : vector<2xf64>
251251
%0 = spirv.FOrdLessThan %arg0, %arg1 : vector<2xf64>
252252
spirv.Return
253253
}

mlir/test/Dialect/Arith/canonicalize.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,8 +2025,8 @@ func.func @test_cmpf(%arg0 : f32) -> (i1, i1, i1, i1) {
20252025
// CHECK-DAG: %[[F:.*]] = arith.constant false
20262026
// CHECK: return %[[F]], %[[F]], %[[T]], %[[T]]
20272027
%nan = arith.constant 0x7fffffff : f32
2028-
%0 = arith.cmpf old, %nan, %arg0 : f32
2029-
%1 = arith.cmpf old, %arg0, %nan : f32
2028+
%0 = arith.cmpf olt, %nan, %arg0 : f32
2029+
%1 = arith.cmpf olt, %arg0, %nan : f32
20302030
%2 = arith.cmpf ugt, %nan, %arg0 : f32
20312031
%3 = arith.cmpf ugt, %arg0, %nan : f32
20322032
return %0, %1, %2, %3 : i1, i1, i1, i1
@@ -2192,7 +2192,7 @@ func.func @test1(%arg0: i32) -> i1 {
21922192
func.func @test2(%arg0: i32) -> i1 {
21932193
%cst = arith.constant 0.000000e+00 : f64
21942194
%1 = arith.uitofp %arg0: i32 to f64
2195-
%2 = arith.cmpf old, %1, %cst : f64
2195+
%2 = arith.cmpf olt, %1, %cst : f64
21962196
return %2 : i1
21972197
// CHECK: %[[c0:.+]] = arith.constant 0 : i32
21982198
// CHECK: arith.cmpi ult, %[[arg0]], %[[c0]] : i32
@@ -2234,7 +2234,7 @@ func.func @test5(%arg0: i32) -> i1 {
22342234
func.func @test6(%arg0: i32) -> i1 {
22352235
%cst = arith.constant -4.400000e+00 : f64
22362236
%1 = arith.uitofp %arg0: i32 to f64
2237-
%2 = arith.cmpf old, %1, %cst : f64
2237+
%2 = arith.cmpf olt, %1, %cst : f64
22382238
return %2 : i1
22392239
// CHECK: %[[false:.+]] = arith.constant false
22402240
// CHECK: return %[[false]] : i1

mlir/test/Dialect/Arith/ops.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ func.func @test_cmpf(%arg0 : f64, %arg1 : f64) -> i1 {
998998

999999
// CHECK-LABEL: test_cmpf_tensor
10001000
func.func @test_cmpf_tensor(%arg0 : tensor<8x8xf64>, %arg1 : tensor<8x8xf64>) -> tensor<8x8xi1> {
1001-
%0 = arith.cmpf old, %arg0, %arg1 : tensor<8x8xf64>
1001+
%0 = arith.cmpf olt, %arg0, %arg1 : tensor<8x8xf64>
10021002
return %0 : tensor<8x8xi1>
10031003
}
10041004

mlir/test/Dialect/ControlFlow/canonicalize.mlir

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func.func @cond_br_pass_through_fail(%cond : i1) {
146146
// CHECK-SAME: %[[FLAG:[a-zA-Z0-9_]+]]
147147
// CHECK-SAME: %[[CASE_OPERAND_0:[a-zA-Z0-9_]+]]
148148
func.func @switch_only_default(%flag : i32, %caseOperand0 : f32) {
149-
// add predecessors for all blocks to avoid other canonicalization.
149+
// add predecessors for all blocks to avoid other canonicalizations.
150150
"foo.pred"() [^bb1, ^bb2] : () -> ()
151151
^bb1:
152152
// CHECK-NOT: cf.switch
@@ -166,7 +166,7 @@ func.func @switch_only_default(%flag : i32, %caseOperand0 : f32) {
166166
// CHECK-SAME: %[[CASE_OPERAND_0:[a-zA-Z0-9_]+]]
167167
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
168168
func.func @switch_case_matching_default(%flag : i32, %caseOperand0 : f32, %caseOperand1 : f32) {
169-
// add predecessors for all blocks to avoid other canonicalization.
169+
// add predecessors for all blocks to avoid other canonicalizations.
170170
"foo.pred"() [^bb1, ^bb2, ^bb3] : () -> ()
171171
^bb1:
172172
// CHECK: cf.switch %[[FLAG]]
@@ -191,7 +191,7 @@ func.func @switch_case_matching_default(%flag : i32, %caseOperand0 : f32, %caseO
191191
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
192192
// CHECK-SAME: %[[CASE_OPERAND_2:[a-zA-Z0-9_]+]]
193193
func.func @switch_on_const_no_match(%caseOperand0 : f32, %caseOperand1 : f32, %caseOperand2 : f32) {
194-
// add predecessors for all blocks to avoid other canonicalization.
194+
// add predecessors for all blocks to avoid other canonicalizations.
195195
"foo.pred"() [^bb1, ^bb2, ^bb3, ^bb4] : () -> ()
196196
^bb1:
197197
// CHECK-NOT: cf.switch
@@ -217,7 +217,7 @@ func.func @switch_on_const_no_match(%caseOperand0 : f32, %caseOperand1 : f32, %c
217217
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
218218
// CHECK-SAME: %[[CASE_OPERAND_2:[a-zA-Z0-9_]+]]
219219
func.func @switch_on_const_with_match(%caseOperand0 : f32, %caseOperand1 : f32, %caseOperand2 : f32) {
220-
// add predecessors for all blocks to avoid other canonicalization.
220+
// add predecessors for all blocks to avoid other canonicalizations.
221221
"foo.pred"() [^bb1, ^bb2, ^bb3, ^bb4] : () -> ()
222222
^bb1:
223223
// CHECK-NOT: cf.switch
@@ -249,7 +249,7 @@ func.func @switch_passthrough(%flag : i32,
249249
%caseOperand1 : f32,
250250
%caseOperand2 : f32,
251251
%caseOperand3 : f32) {
252-
// add predecessors for all blocks to avoid other canonicalization.
252+
// add predecessors for all blocks to avoid other canonicalizations.
253253
"foo.pred"() [^bb1, ^bb2, ^bb3, ^bb4, ^bb5, ^bb6] : () -> ()
254254

255255
^bb1:
@@ -286,7 +286,7 @@ func.func @switch_passthrough(%flag : i32,
286286
// CHECK-SAME: %[[CASE_OPERAND_0:[a-zA-Z0-9_]+]]
287287
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
288288
func.func @switch_from_switch_with_same_value_with_match(%flag : i32, %caseOperand0 : f32, %caseOperand1 : f32) {
289-
// add predecessors for all blocks except ^bb3 to avoid other canonicalization.
289+
// add predecessors for all blocks except ^bb3 to avoid other canonicalizations.
290290
"foo.pred"() [^bb1, ^bb2, ^bb4, ^bb5] : () -> ()
291291

292292
^bb1:
@@ -323,7 +323,7 @@ func.func @switch_from_switch_with_same_value_with_match(%flag : i32, %caseOpera
323323
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
324324
// CHECK-SAME: %[[CASE_OPERAND_2:[a-zA-Z0-9_]+]]
325325
func.func @switch_from_switch_with_same_value_no_match(%flag : i32, %caseOperand0 : f32, %caseOperand1 : f32, %caseOperand2 : f32) {
326-
// add predecessors for all blocks except ^bb3 to avoid other canonicalization.
326+
// add predecessors for all blocks except ^bb3 to avoid other canonicalizations.
327327
"foo.pred"() [^bb1, ^bb2, ^bb4, ^bb5, ^bb6] : () -> ()
328328

329329
^bb1:
@@ -363,7 +363,7 @@ func.func @switch_from_switch_with_same_value_no_match(%flag : i32, %caseOperand
363363
// CHECK-SAME: %[[CASE_OPERAND_1:[a-zA-Z0-9_]+]]
364364
// CHECK-SAME: %[[CASE_OPERAND_2:[a-zA-Z0-9_]+]]
365365
func.func @switch_from_switch_default_with_same_value(%flag : i32, %caseOperand0 : f32, %caseOperand1 : f32, %caseOperand2 : f32) {
366-
// add predecessors for all blocks except ^bb3 to avoid other canonicalization.
366+
// add predecessors for all blocks except ^bb3 to avoid other canonicalizations.
367367
"foo.pred"() [^bb1, ^bb2, ^bb4, ^bb5, ^bb6] : () -> ()
368368

369369
^bb1:

mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func.func @cmpf(%arg0: tensor<f32>, %arg1: tensor<f32>) -> tensor<i1> {
8080
// CHECK-SAME: ins(%[[ARG0]], %[[ARG1]]
8181
// CHECK-SAME: outs(%[[INIT]]
8282
// CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32, %{{.*}}: i1):
83-
// CHECK: arith.cmpf old, %{{.*}}, %{{.*}} : f32
84-
%0 = arith.cmpf old, %arg0, %arg1 : tensor<f32>
83+
// CHECK: arith.cmpf olt, %{{.*}}, %{{.*}} : f32
84+
%0 = arith.cmpf olt, %arg0, %arg1 : tensor<f32>
8585
return %0 : tensor<i1>
8686
}
8787

@@ -103,8 +103,8 @@ func.func @cmpf(%arg0: tensor<4x?x?x8x2x?xf32>, %arg1: tensor<4x?x?x8x2x?xf32>)
103103
// CHECK-SAME: ins(%[[ARG0]], %[[ARG1]]
104104
// CHECK-SAME: outs(%[[INIT]]
105105
// CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32, %{{.*}}: i1):
106-
// CHECK: arith.cmpf old, %{{.*}}, %{{.*}} : f32
107-
%0 = arith.cmpf old, %arg0, %arg1 : tensor<4x?x?x8x2x?xf32>
106+
// CHECK: arith.cmpf olt, %{{.*}}, %{{.*}} : f32
107+
%0 = arith.cmpf olt, %arg0, %arg1 : tensor<4x?x?x8x2x?xf32>
108108
return %0 : tensor<4x?x?x8x2x?xi1>
109109
}
110110

mlir/test/Dialect/Linalg/match-ops-interpreter.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ module attributes { transform.with_named_sequence } {
279279
} ins(%lhs, %rhs: tensor<2x4xf32>, tensor<4x3xf32>) outs(%out, %r: tensor<2x3xf32>, tensor<2x3xf32>) {
280280
^bb0(%arg0: f32, %arg1: f32, %arg2: f32, %arg3: f32):
281281
%0 = arith.mulf %arg0, %arg1 : f32
282-
%1 = arith.cmpf old, %0, %arg2 : f32
282+
%1 = arith.cmpf olt, %0, %arg2 : f32
283283
%2 = arith.select %1, %0, %arg2 : f32
284284
%3 = arith.select %1, %arg3, %0 : f32
285285
linalg.yield %2, %3 : f32, f32

mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Demonstrates what happens when peeling the 4th loop (that corresponds to the
44
// "depth" dimension in depthwise convs) followed by vectorization in the
55
// presence of _scalable_ vectors (these are introduced through scalable
6-
// tiling). The main goal is to verify that canonicalization fold away the
6+
// tiling). The main goal is to verify that canonicalizations fold away the
77
// masks in the main loop.
88

99
func.func @conv(%arg0: tensor<1x1080x1962x48xi32>, %arg1: tensor<1x43x48xi32>) -> tensor<1x1080x1920x48xi32> {

0 commit comments

Comments
 (0)