Skip to content

Commit 9c6af68

Browse files
committed
comparison updated with new case
1 parent 13ae182 commit 9c6af68

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

mlir/test/Integration/Dialect/Arith/CPU/comparison.mlir

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func.func @cmpi_signed() {
5555
%false = arith.constant false
5656
%true = arith.constant true
5757

58-
// slt 0 1 = false, sle 0 1 = false, sgt 0 1 = true, sge 0 1 = true
58+
// slt 0 1 = false, sle 0 1 = false, sgt 0 1 = true, sge 0 1 = true, sge 1 0 = false
5959

6060
// CHECK-LABEL: @cmpi_slt_i1
6161
// CHECK-NEXT: 0
@@ -72,17 +72,10 @@ func.func @cmpi_signed() {
7272
// CHECK-LABEL: @cmpi_sge_i1
7373
// CHECK-NEXT: 1
7474
func.call @cmpi_sge_i1(%false, %true) : (i1, i1) -> ()
75-
76-
// check that addui_extended overflow bit is treated as -1 in comparison operations
77-
// in the case of an overflow
78-
// addui_extended -1 -1 = (..., overflow_bit)
79-
// assert(overflow_bit <= 0)
80-
%n1_i64 = arith.constant -1 : i64
81-
%sum, %overflow = arith.addui_extended %n1_i64, %n1_i64 : i64, i1
82-
75+
8376
// CHECK-LABEL: @cmpi_sge_i1
84-
// CHECK-NEXT: 0
85-
func.call @cmpi_sge_i1(%overflow, %false) : (i1, i1) -> ()
77+
// CHECK-NEXT: 0
78+
func.call @cmpi_sge_i1(%true, %false) : (i1, i1) -> ()
8679

8780
// ------------------------------------------------
8881
// TODO: Test i8, i16 etc..

0 commit comments

Comments
 (0)