diff --git a/flang/test/Fir/affine-promotion.fir b/flang/test/Fir/affine-promotion.fir --- a/flang/test/Fir/affine-promotion.fir +++ b/flang/test/Fir/affine-promotion.fir @@ -89,7 +89,7 @@ fir.do_loop %j = %c1 to %len step %c1 { fir.do_loop %k = %c1 to %len step %c1 { %im2 = arith.subi %i, %c2 : index - %cond = arith.cmpi "sgt", %im2, %c0 : index + %cond = arith.cmpi sgt(%im2, %c0) : index fir.if %cond { %a_idx = fir.array_coor %a(%dims) %i : (!arr_d1, !fir.shape<1>, index) -> !fir.ref diff --git a/flang/test/Fir/array-value-copy-2.fir b/flang/test/Fir/array-value-copy-2.fir --- a/flang/test/Fir/array-value-copy-2.fir +++ b/flang/test/Fir/array-value-copy-2.fir @@ -15,7 +15,7 @@ %4 = arith.subi %3, %0 : index %5 = arith.addi %4, %0 : index %6 = arith.divsi %5, %0 : index - %7 = arith.cmpi sgt, %6, %c0 : index + %7 = arith.cmpi sgt(%6, %c0) : index %8 = arith.select %7, %6, %c0 : index %9 = fir.slice %0, %3, %0 : (index, index, index) -> !fir.slice<1> %10 = fir.array_load %arg0 [%9] : (!fir.box>, !fir.slice<1>) -> !fir.array @@ -57,7 +57,7 @@ %5 = arith.subi %4, %0 : index %6 = arith.addi %5, %1 : index %7 = arith.divsi %6, %1 : index - %8 = arith.cmpi sgt, %7, %c0 : index + %8 = arith.cmpi sgt(%7, %c0) : index %9 = arith.select %8, %7, %c0 : index %10 = fir.slice %0, %4, %1 : (index, index, index) -> !fir.slice<1> %11 = fir.array_load %arg0 [%10] : (!fir.box>, !fir.slice<1>) -> !fir.array diff --git a/flang/test/Fir/boxproc.fir b/flang/test/Fir/boxproc.fir --- a/flang/test/Fir/boxproc.fir +++ b/flang/test/Fir/boxproc.fir @@ -70,8 +70,8 @@ // CHECK: store { ptr, i64 } %[[VAL_6]], ptr %[[VAL_3]], align 8 // CHECK: call void @llvm.memmove.p0.p0.i64(ptr %[[VAL_1]], ptr // CHECK: br label %[[VAL_8:.*]] -// CHECK: %[[VAL_11:.*]] = phi -// CHECK: %[[VAL_13:.*]] = phi +// CHECK: %[[VAL_11:.*]] = phi +// CHECK: %[[VAL_13:.*]] = phi // CHECK: %[[VAL_15:.*]] = icmp sgt i64 %[[VAL_13]], 0 // CHECK: %[[VAL_18:.*]] = getelementptr [10 x [1 x i8]], ptr %[[VAL_1]], i32 0, i64 %[[VAL_11]] // CHECK: store [1 x i8] c" ", ptr %[[VAL_18]], align 1 @@ -172,7 +172,7 @@ %11 = fir.insert_value %10, %c32_i8, [0 : index] : (!fir.char<1>, i8) -> !fir.char<1> cf.br ^bb1(%c9, %c1 : index, index) ^bb1(%12: index, %13: index): // 2 preds: ^bb0, ^bb2 - %14 = arith.cmpi sgt, %13, %c0 : index + %14 = arith.cmpi sgt(%13, %c0) : index cf.cond_br %14, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %15 = fir.convert %1 : (!fir.ref>) -> !fir.ref>> @@ -210,7 +210,7 @@ %1 = fir.load %0 : !fir.ref> %2:2 = fir.unboxchar %1 : (!fir.boxchar<1>) -> (!fir.ref>, index) %3 = fir.convert %arg0 : (!fir.ref>) -> !fir.ref> - %4 = arith.cmpi slt, %c10, %2#1 : index + %4 = arith.cmpi slt(%c10, %2#1) : index %5 = arith.select %4, %c10, %2#1 : index %6 = fir.convert %5 : (index) -> i64 %7 = fir.convert %3 : (!fir.ref>) -> !fir.ref @@ -221,7 +221,7 @@ %11 = arith.subi %c10, %5 : index cf.br ^bb1(%5, %11 : index, index) ^bb1(%12: index, %13: index): // 2 preds: ^bb0, ^bb2 - %14 = arith.cmpi sgt, %13, %c0 : index + %14 = arith.cmpi sgt(%13, %c0) : index cf.cond_br %14, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %15 = fir.convert %3 : (!fir.ref>) -> !fir.ref>> @@ -259,7 +259,7 @@ fir.call @llvm.memmove.p0.p0.i64(%13, %14, %12, %false) : (!fir.ref, !fir.ref, i64, i1) -> () cf.br ^bb1(%c12, %8 : index, index) ^bb1(%15: index, %16: index): // 2 preds: ^bb0, ^bb2 - %17 = arith.cmpi sgt, %16, %c0 : index + %17 = arith.cmpi sgt(%16, %c0) : index cf.cond_br %17, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %18 = arith.subi %15, %c12 : index @@ -273,7 +273,7 @@ %25 = arith.subi %16, %c1 : index cf.br ^bb1(%24, %25 : index, index) ^bb3: // pred: ^bb1 - %26 = arith.cmpi slt, %c40, %10 : index + %26 = arith.cmpi slt(%c40, %10) : index %27 = arith.select %26, %c40, %10 : index %28 = fir.convert %27 : (index) -> i64 %29 = fir.convert %0 : (!fir.ref>) -> !fir.ref @@ -283,7 +283,7 @@ %32 = arith.subi %c40, %27 : index cf.br ^bb4(%27, %32 : index, index) ^bb4(%33: index, %34: index): // 2 preds: ^bb3, ^bb5 - %35 = arith.cmpi sgt, %34, %c0 : index + %35 = arith.cmpi sgt(%34, %c0) : index cf.cond_br %35, ^bb5, ^bb6 ^bb5: // pred: ^bb4 %36 = fir.convert %0 : (!fir.ref>) -> !fir.ref>> diff --git a/flang/test/Fir/loop01.fir b/flang/test/Fir/loop01.fir --- a/flang/test/Fir/loop01.fir +++ b/flang/test/Fir/loop01.fir @@ -22,7 +22,7 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_7]] : index, index) // CHECK: ^bb1(%[[VAL_8:.*]]: index, %[[VAL_9:.*]]: index): // CHECK: %[[VAL_10:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_10]] : index +// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_10]]) : index // CHECK: cond_br %[[VAL_11]], ^bb2, ^bb6 // CHECK: ^bb2: // CHECK: cond_br %[[VAL_3]], ^bb3, ^bb4 @@ -61,10 +61,10 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_2]] : index, i1) // CHECK: ^bb1(%[[VAL_4:.*]]: index, %[[VAL_5:.*]]: i1): // CHECK: %[[VAL_6:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_7:.*]] = arith.cmpi slt, %[[VAL_6]], %[[VAL_3]] : index -// CHECK: %[[VAL_8:.*]] = arith.cmpi sle, %[[VAL_4]], %[[VAL_1]] : index -// CHECK: %[[VAL_9:.*]] = arith.cmpi slt, %[[VAL_3]], %[[VAL_6]] : index -// CHECK: %[[VAL_10:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_4]] : index +// CHECK: %[[VAL_7:.*]] = arith.cmpi slt(%[[VAL_6]], %[[VAL_3]]) : index +// CHECK: %[[VAL_8:.*]] = arith.cmpi sle(%[[VAL_4]], %[[VAL_1]]) : index +// CHECK: %[[VAL_9:.*]] = arith.cmpi slt(%[[VAL_3]], %[[VAL_6]]) : index +// CHECK: %[[VAL_10:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_4]]) : index // CHECK: %[[VAL_11:.*]] = arith.andi %[[VAL_7]], %[[VAL_8]] : i1 // CHECK: %[[VAL_12:.*]] = arith.andi %[[VAL_9]], %[[VAL_10]] : i1 // CHECK: %[[VAL_13:.*]] = arith.ori %[[VAL_11]], %[[VAL_12]] : i1 @@ -103,7 +103,7 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_3]], %[[VAL_6]] : index, i1, index) // CHECK: ^bb1(%[[VAL_7:.*]]: index, %[[VAL_8:.*]]: i1, %[[VAL_9:.*]]: index): // CHECK: %[[VAL_10:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_10]] : index +// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_10]]) : index // CHECK: cond_br %[[VAL_11]], ^bb2, ^bb3 // CHECK: ^bb2: // CHECK: %[[VAL_12:.*]] = fir.call @f2() : () -> i1 @@ -141,10 +141,10 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_3]], %[[VAL_4]] : index, i1, i1) // CHECK: ^bb1(%[[VAL_5:.*]]: index, %[[VAL_6:.*]]: i1, %[[VAL_7:.*]]: i1): // CHECK: %[[VAL_8:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_9:.*]] = arith.cmpi slt, %[[VAL_8]], %[[VAL_2]] : index -// CHECK: %[[VAL_10:.*]] = arith.cmpi sle, %[[VAL_5]], %[[VAL_1]] : index -// CHECK: %[[VAL_11:.*]] = arith.cmpi slt, %[[VAL_2]], %[[VAL_8]] : index -// CHECK: %[[VAL_12:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_5]] : index +// CHECK: %[[VAL_9:.*]] = arith.cmpi slt(%[[VAL_8]], %[[VAL_2]]) : index +// CHECK: %[[VAL_10:.*]] = arith.cmpi sle(%[[VAL_5]], %[[VAL_1]]) : index +// CHECK: %[[VAL_11:.*]] = arith.cmpi slt(%[[VAL_2]], %[[VAL_8]]) : index +// CHECK: %[[VAL_12:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_5]]) : index // CHECK: %[[VAL_13:.*]] = arith.andi %[[VAL_9]], %[[VAL_10]] : i1 // CHECK: %[[VAL_14:.*]] = arith.andi %[[VAL_11]], %[[VAL_12]] : i1 // CHECK: %[[VAL_15:.*]] = arith.ori %[[VAL_13]], %[[VAL_14]] : i1 @@ -183,7 +183,7 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_5]] : index, index) // CHECK: ^bb1(%[[VAL_6:.*]]: index, %[[VAL_7:.*]]: index): // CHECK: %[[VAL_8:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_9:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_8]] : index +// CHECK: %[[VAL_9:.*]] = arith.cmpi sgt(%[[VAL_7]], %[[VAL_8]]) : index // CHECK: cond_br %[[VAL_9]], ^bb2, ^bb3 // CHECK: ^bb2: // CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_6]] : (index) -> i32 @@ -218,10 +218,10 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_3]] : index, i1) // CHECK: ^bb1(%[[VAL_4:.*]]: index, %[[VAL_5:.*]]: i1): // CHECK: %[[VAL_6:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_7:.*]] = arith.cmpi slt, %[[VAL_6]], %[[VAL_2]] : index -// CHECK: %[[VAL_8:.*]] = arith.cmpi sle, %[[VAL_4]], %[[VAL_1]] : index -// CHECK: %[[VAL_9:.*]] = arith.cmpi slt, %[[VAL_2]], %[[VAL_6]] : index -// CHECK: %[[VAL_10:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_4]] : index +// CHECK: %[[VAL_7:.*]] = arith.cmpi slt(%[[VAL_6]], %[[VAL_2]]) : index +// CHECK: %[[VAL_8:.*]] = arith.cmpi sle(%[[VAL_4]], %[[VAL_1]]) : index +// CHECK: %[[VAL_9:.*]] = arith.cmpi slt(%[[VAL_2]], %[[VAL_6]]) : index +// CHECK: %[[VAL_10:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_4]]) : index // CHECK: %[[VAL_11:.*]] = arith.andi %[[VAL_7]], %[[VAL_8]] : i1 // CHECK: %[[VAL_12:.*]] = arith.andi %[[VAL_9]], %[[VAL_10]] : i1 // CHECK: %[[VAL_13:.*]] = arith.ori %[[VAL_11]], %[[VAL_12]] : i1 @@ -263,7 +263,7 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_3]], %[[VAL_6]] : index, i16, index) // CHECK: ^bb1(%[[VAL_7:.*]]: index, %[[VAL_8:.*]]: i16, %[[VAL_9:.*]]: index): // CHECK: %[[VAL_10:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_10]] : index +// CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_10]]) : index // CHECK: cond_br %[[VAL_11]], ^bb2, ^bb3 // CHECK: ^bb2: // CHECK: %[[VAL_12:.*]] = fir.call @f2() : () -> i1 @@ -307,10 +307,10 @@ // CHECK: br ^bb1(%[[VAL_0]], %[[VAL_4]], %[[VAL_3]] : index, i1, i16) // CHECK: ^bb1(%[[VAL_5:.*]]: index, %[[VAL_6:.*]]: i1, %[[VAL_7:.*]]: i16): // CHECK: %[[VAL_8:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_9:.*]] = arith.cmpi slt, %[[VAL_8]], %[[VAL_2]] : index -// CHECK: %[[VAL_10:.*]] = arith.cmpi sle, %[[VAL_5]], %[[VAL_1]] : index -// CHECK: %[[VAL_11:.*]] = arith.cmpi slt, %[[VAL_2]], %[[VAL_8]] : index -// CHECK: %[[VAL_12:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_5]] : index +// CHECK: %[[VAL_9:.*]] = arith.cmpi slt(%[[VAL_8]], %[[VAL_2]]) : index +// CHECK: %[[VAL_10:.*]] = arith.cmpi sle(%[[VAL_5]], %[[VAL_1]]) : index +// CHECK: %[[VAL_11:.*]] = arith.cmpi slt(%[[VAL_2]], %[[VAL_8]]) : index +// CHECK: %[[VAL_12:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_5]]) : index // CHECK: %[[VAL_13:.*]] = arith.andi %[[VAL_9]], %[[VAL_10]] : i1 // CHECK: %[[VAL_14:.*]] = arith.andi %[[VAL_11]], %[[VAL_12]] : i1 // CHECK: %[[VAL_15:.*]] = arith.ori %[[VAL_13]], %[[VAL_14]] : i1 diff --git a/flang/test/Fir/loop02.fir b/flang/test/Fir/loop02.fir --- a/flang/test/Fir/loop02.fir +++ b/flang/test/Fir/loop02.fir @@ -21,13 +21,13 @@ // CHECK: %[[VAL_4:.*]] = arith.addi %[[VAL_3]], %[[VAL_2]] : index // CHECK: %[[VAL_5:.*]] = arith.divsi %[[VAL_4]], %[[VAL_2]] : index // CHECK: %[[VAL_6:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_7:.*]] = arith.cmpi sle, %[[VAL_5]], %[[VAL_6]] : index +// CHECK: %[[VAL_7:.*]] = arith.cmpi sle(%[[VAL_5]], %[[VAL_6]]) : index // CHECK: %[[VAL_8:.*]] = arith.constant 1 : index // CHECK: %[[VAL_9:.*]] = arith.select %[[VAL_7]], %[[VAL_8]], %[[VAL_5]] : index // CHECK: br ^bb1(%[[VAL_1]], %[[VAL_9]] : index, index) // CHECK: ^bb1(%[[VAL_10:.*]]: index, %[[VAL_11:.*]]: index): // CHECK: %[[VAL_12:.*]] = arith.constant 0 : index -// CHECK: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_11]], %[[VAL_12]] : index +// CHECK: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_11]], %[[VAL_12]]) : index // CHECK: cond_br %[[VAL_13]], ^bb2, ^bb3 // CHECK: ^bb2: // CHECK: fir.call @y(%[[VAL_0]]) : (!fir.ref) -> () @@ -50,7 +50,7 @@ // NOOPT: br ^bb1(%[[VAL_1]], %[[VAL_5]] : index, index) // NOOPT: ^bb1(%[[VAL_6:.*]]: index, %[[VAL_7:.*]]: index): // NOOPT: %[[VAL_8:.*]] = arith.constant 0 : index -// NOOPT: %[[VAL_9:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_8]] : index +// NOOPT: %[[VAL_9:.*]] = arith.cmpi sgt(%[[VAL_7]], %[[VAL_8]]) : index // NOOPT: cond_br %[[VAL_9]], ^bb2, ^bb3 // NOOPT: ^bb2: // NOOPT: fir.call @y(%[[VAL_0]]) : (!fir.ref) -> () diff --git a/flang/test/Fir/memref-data-flow.fir b/flang/test/Fir/memref-data-flow.fir --- a/flang/test/Fir/memref-data-flow.fir +++ b/flang/test/Fir/memref-data-flow.fir @@ -11,7 +11,7 @@ %1 = fir.alloca !fir.array<60xi32> {bindc_name = "t1", uniq_name = "_QFf1dcEt1"} cf.br ^bb1(%c1, %c60 : index, index) ^bb1(%2: index, %3: index): // 2 preds: ^bb0, ^bb2 - %4 = arith.cmpi sgt, %3, %c0 : index + %4 = arith.cmpi sgt(%3, %c0) : index cf.cond_br %4, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %5 = fir.convert %2 : (index) -> i32 @@ -32,7 +32,7 @@ fir.store %15 to %0 : !fir.ref cf.br ^bb4(%c1, %c60 : index, index) ^bb4(%16: index, %17: index): // 2 preds: ^bb3, ^bb5 - %18 = arith.cmpi sgt, %17, %c0 : index + %18 = arith.cmpi sgt(%17, %c0) : index cf.cond_br %18, ^bb5, ^bb6 ^bb5: // pred: ^bb4 %19 = fir.convert %16 : (index) -> i32 @@ -59,7 +59,7 @@ // CHECK-LABEL: func @load_store_chain_removal // CHECK-LABEL: ^bb1 // CHECK-LABEL: ^bb2: -// Make sure the previous fir.store/fir.load pair have been elimated and we +// Make sure the previous fir.store/fir.load pair have been elimated and we // preserve the last pair of fir.load/fir.store. // CHECK-COUNT-1: %{{.*}} = fir.load %{{.*}} : !fir.ref // CHECK-COUNT-1: fir.store %{{.*}} to %{{.*}} : !fir.ref diff --git a/flang/test/Fir/simplify-region-lite-after-inliner.fir b/flang/test/Fir/simplify-region-lite-after-inliner.fir --- a/flang/test/Fir/simplify-region-lite-after-inliner.fir +++ b/flang/test/Fir/simplify-region-lite-after-inliner.fir @@ -21,7 +21,7 @@ %c-35_i8 = arith.constant -35 : i8 %9 = arith.andi %arg1, %c-35_i8 : i8 %10 = arith.ori %7, %9 : i8 - %11 = arith.cmpi ne, %5, %10 : i8 + %11 = arith.cmpi ne(%5, %10) : i8 cf.cond_br %11, ^bb1, ^bb2 ^bb1: // pred: ^bb0 %13 = func.call @foo() : () -> none diff --git a/flang/test/Lower/Intrinsics/associated.f90 b/flang/test/Lower/Intrinsics/associated.f90 --- a/flang/test/Lower/Intrinsics/associated.f90 +++ b/flang/test/Lower/Intrinsics/associated.f90 @@ -9,12 +9,12 @@ ! CHECK: %[[scalar:.*]] = fir.load %[[arg0]] : !fir.ref>> ! CHECK: %[[addr0:.*]] = fir.box_addr %[[scalar]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[addrToInt0:.*]] = fir.convert %[[addr0]] - ! CHECK: cmpi ne, %[[addrToInt0]], %c0{{.*}} + ! CHECK: cmpi ne(%[[addrToInt0]], %c0{{.*}}) print *, associated(scalar) ! CHECK: %[[array:.*]] = fir.load %[[arg1]] : !fir.ref>>> ! CHECK: %[[addr1:.*]] = fir.box_addr %[[array]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[addrToInt1:.*]] = fir.convert %[[addr1]] - ! CHECK: cmpi ne, %[[addrToInt1]], %c0{{.*}} + ! CHECK: cmpi ne(%[[addrToInt1]], %c0{{.*}}) print *, associated(array) ! CHECK: %[[zbox0:.*]] = fir.embox %[[ziel]] : (!fir.ref) -> !fir.box ! CHECK: %[[scalar:.*]] = fir.load %[[arg0]] : !fir.ref>> @@ -23,11 +23,11 @@ ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[sbox]], %[[zbox]]) : (!fir.box, !fir.box) -> i1 print *, associated(scalar, ziel) end subroutine - + subroutine test_func_results() interface function get_pointer() - real, pointer :: get_pointer(:) + real, pointer :: get_pointer(:) end function end interface ! CHECK: %[[result:.*]] = fir.call @_QPget_pointer() : () -> !fir.box>> @@ -35,10 +35,10 @@ ! CHECK: %[[box:.*]] = fir.load %[[box_storage]] : !fir.ref>>> ! CHECK: %[[addr:.*]] = fir.box_addr %[[box]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[addr_cast:.*]] = fir.convert %[[addr]] : (!fir.ptr>) -> i64 - ! CHECK: arith.cmpi ne, %[[addr_cast]], %c0{{.*}} : i64 + ! CHECK: arith.cmpi ne(%[[addr_cast]], %c0{{.*}}) : i64 print *, associated(get_pointer()) end subroutine - + ! CHECK-LABEL: func @_QPtest_optional_target_1( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref> {fir.bindc_name = "optionales_ziel", fir.optional, fir.target}) { @@ -57,7 +57,7 @@ ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_12]] : (!fir.box>) -> !fir.box ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[VAL_14]], %[[VAL_15]]) : (!fir.box, !fir.box) -> i1 end subroutine - + ! CHECK-LABEL: func @_QPtest_optional_target_2( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.box> {fir.bindc_name = "optionales_ziel", fir.optional, fir.target}) { @@ -73,7 +73,7 @@ ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_9]] : (!fir.box>) -> !fir.box ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[VAL_11]], %[[VAL_12]]) : (!fir.box, !fir.box) -> i1 end subroutine - + ! CHECK-LABEL: func @_QPtest_optional_target_3( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> {fir.bindc_name = "optionales_ziel", fir.optional}) { @@ -90,7 +90,7 @@ ! CHECK: %[[VAL_13:.*]] = fir.convert %[[VAL_10]] : (!fir.box>>) -> !fir.box ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[VAL_12]], %[[VAL_13]]) : (!fir.box, !fir.box) -> i1 end subroutine - + ! CHECK-LABEL: func @_QPtest_optional_target_4( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> {fir.bindc_name = "optionales_ziel", fir.optional, fir.target}) { @@ -107,7 +107,7 @@ ! CHECK: %[[VAL_13:.*]] = fir.convert %[[VAL_10]] : (!fir.box>>) -> !fir.box ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[VAL_12]], %[[VAL_13]]) : (!fir.box, !fir.box) -> i1 end subroutine - + ! CHECK-LABEL: func @_QPtest_pointer_target( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> {fir.bindc_name = "pointer_ziel"}) { @@ -121,7 +121,7 @@ ! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_7]] : (!fir.box>>) -> !fir.box ! CHECK: fir.call @_FortranAPointerIsAssociatedWith(%[[VAL_9]], %[[VAL_10]]) : (!fir.box, !fir.box) -> i1 end subroutine - + ! CHECK-LABEL: func @_QPtest_allocatable_target( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> {fir.bindc_name = "p"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> {fir.bindc_name = "allocatable_ziel", fir.target}) { diff --git a/flang/test/Lower/Intrinsics/bge.f90 b/flang/test/Lower/Intrinsics/bge.f90 --- a/flang/test/Lower/Intrinsics/bge.f90 +++ b/flang/test/Lower/Intrinsics/bge.f90 @@ -9,7 +9,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test @@ -22,7 +22,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i8 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i8 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test1 @@ -35,7 +35,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i16 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i16 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test2 @@ -48,7 +48,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test3 @@ -61,7 +61,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i64 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i64 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test4 @@ -74,7 +74,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_VAL]] : i128 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_VAL]]) : i128 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test5 @@ -89,7 +89,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test6 @@ -104,7 +104,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bge(a, b) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test7 @@ -118,7 +118,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i32 c = bge(a, 42_4) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test8 @@ -132,7 +132,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i16 c = bge(a, 42_2) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi uge(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bge_test9 diff --git a/flang/test/Lower/Intrinsics/bgt.f90 b/flang/test/Lower/Intrinsics/bgt.f90 --- a/flang/test/Lower/Intrinsics/bgt.f90 +++ b/flang/test/Lower/Intrinsics/bgt.f90 @@ -9,7 +9,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test @@ -22,7 +22,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i8 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i8 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test1 @@ -35,7 +35,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i16 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i16 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test2 @@ -48,7 +48,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test3 @@ -61,7 +61,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i64 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i64 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test4 @@ -74,7 +74,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_VAL]] : i128 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_VAL]]) : i128 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test5 @@ -89,7 +89,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test6 @@ -104,7 +104,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = bgt(a, b) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test7 @@ -118,7 +118,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i32 c = bgt(a, 42_4) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test8 @@ -132,7 +132,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i16 c = bgt(a, 42_2) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ugt(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine bgt_test9 diff --git a/flang/test/Lower/Intrinsics/ble.f90 b/flang/test/Lower/Intrinsics/ble.f90 --- a/flang/test/Lower/Intrinsics/ble.f90 +++ b/flang/test/Lower/Intrinsics/ble.f90 @@ -9,7 +9,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test @@ -22,7 +22,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i8 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i8 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test1 @@ -35,7 +35,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i16 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i16 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test2 @@ -48,7 +48,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test3 @@ -61,7 +61,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i64 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i64 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test4 @@ -74,7 +74,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_VAL]] : i128 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_VAL]]) : i128 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test5 @@ -89,7 +89,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test6 @@ -104,7 +104,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = ble(a, b) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test7 @@ -118,7 +118,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i32 c = ble(a, 42_4) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test8 @@ -132,7 +132,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i16 c = ble(a, 42_2) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ule(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine ble_test9 diff --git a/flang/test/Lower/Intrinsics/blt.f90 b/flang/test/Lower/Intrinsics/blt.f90 --- a/flang/test/Lower/Intrinsics/blt.f90 +++ b/flang/test/Lower/Intrinsics/blt.f90 @@ -9,7 +9,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test @@ -22,7 +22,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i8 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i8 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test1 @@ -35,7 +35,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i16 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i16 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test2 @@ -48,7 +48,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test3 @@ -61,7 +61,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i64 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i64 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test4 @@ -74,7 +74,7 @@ ! CHECK: %[[A_VAL:.*]] = fir.load %[[A]] : !fir.ref ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_VAL]] : i128 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_VAL]]) : i128 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test5 @@ -89,7 +89,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test6 @@ -104,7 +104,7 @@ ! CHECK: %[[B_VAL:.*]] = fir.load %[[B]] : !fir.ref c = blt(a, b) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test7 @@ -118,7 +118,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i32 c = blt(a, 42_4) ! CHECK: %[[A_EXT:.*]] = arith.extui %[[A_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_EXT]], %[[B_VAL]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_EXT]], %[[B_VAL]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test8 @@ -132,7 +132,7 @@ ! CHECK: %[[B_VAL:.*]] = arith.constant 42 : i16 c = blt(a, 42_2) ! CHECK: %[[B_EXT:.*]] = arith.extui %[[B_VAL]] : i16 to i32 - ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult, %[[A_VAL]], %[[B_EXT]] : i32 + ! CHECK: %[[C_CMP:.*]] = arith.cmpi ult(%[[A_VAL]], %[[B_EXT]]) : i32 ! CHECK: %[[C_VAL:.*]] = fir.convert %[[C_CMP]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[C_VAL]] to %[[C]] : !fir.ref> end subroutine blt_test9 diff --git a/flang/test/Lower/Intrinsics/c_loc.f90 b/flang/test/Lower/Intrinsics/c_loc.f90 --- a/flang/test/Lower/Intrinsics/c_loc.f90 +++ b/flang/test/Lower/Intrinsics/c_loc.f90 @@ -56,7 +56,7 @@ ! CHECK: %[[VAL_11:.*]] = arith.subi %[[VAL_5]], %[[VAL_4]] : index ! CHECK: %[[VAL_12:.*]] = arith.addi %[[VAL_11]], %[[VAL_6]] : index ! CHECK: %[[VAL_13:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_14:.*]] = arith.cmpi slt, %[[VAL_12]], %[[VAL_13]] : index +! CHECK: %[[VAL_14:.*]] = arith.cmpi slt(%[[VAL_12]], %[[VAL_13]]) : index ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_13]], %[[VAL_12]] : index ! CHECK: %[[VAL_16:.*]] = fir.embox %[[VAL_10]] typeparams %[[VAL_15]] : (!fir.ref>, index) -> !fir.box> ! CHECK: %[[VAL_17:.*]] = fir.alloca !fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}> diff --git a/flang/test/Lower/Intrinsics/cmplx.f90 b/flang/test/Lower/Intrinsics/cmplx.f90 --- a/flang/test/Lower/Intrinsics/cmplx.f90 +++ b/flang/test/Lower/Intrinsics/cmplx.f90 @@ -17,7 +17,7 @@ ! CHECK: %[[VAL_9:.*]] = fir.box_addr %[[VAL_8]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_9]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_11:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_12:.*]] = arith.cmpi ne, %[[VAL_10]], %[[VAL_11]] : i64 +! CHECK: %[[VAL_12:.*]] = arith.cmpi ne(%[[VAL_10]], %[[VAL_11]]) : i64 ! CHECK: %[[VAL_13:.*]] = fir.if %[[VAL_12]] -> (f32) { ! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_1]] : !fir.ref>> ! CHECK: %[[VAL_15:.*]] = fir.box_addr %[[VAL_14]] : (!fir.box>) -> !fir.ptr @@ -65,7 +65,7 @@ ! CHECK: %[[VAL_9:.*]] = fir.box_addr %[[VAL_8]] : (!fir.box>) -> !fir.heap ! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_9]] : (!fir.heap) -> i64 ! CHECK: %[[VAL_11:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_12:.*]] = arith.cmpi ne, %[[VAL_10]], %[[VAL_11]] : i64 +! CHECK: %[[VAL_12:.*]] = arith.cmpi ne(%[[VAL_10]], %[[VAL_11]]) : i64 ! CHECK: %[[VAL_13:.*]] = fir.if %[[VAL_12]] -> (i64) { ! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_1]] : !fir.ref>> ! CHECK: %[[VAL_15:.*]] = fir.box_addr %[[VAL_14]] : (!fir.box>) -> !fir.heap @@ -98,7 +98,7 @@ ! CHECK: %[[VAL_11:.*]] = fir.box_addr %[[VAL_10]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_11]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_13:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_14:.*]] = arith.cmpi ne, %[[VAL_12]], %[[VAL_13]] : i64 +! CHECK: %[[VAL_14:.*]] = arith.cmpi ne(%[[VAL_12]], %[[VAL_13]]) : i64 ! CHECK: %[[VAL_15:.*]] = fir.if %[[VAL_14]] -> (f32) { ! CHECK: %[[VAL_16:.*]] = fir.load %[[VAL_2]] : !fir.ref>> ! CHECK: %[[VAL_17:.*]] = fir.box_addr %[[VAL_16]] : (!fir.box>) -> !fir.ptr diff --git a/flang/test/Lower/Intrinsics/date_and_time.f90 b/flang/test/Lower/Intrinsics/date_and_time.f90 --- a/flang/test/Lower/Intrinsics/date_and_time.f90 +++ b/flang/test/Lower/Intrinsics/date_and_time.f90 @@ -18,13 +18,13 @@ ! CHECK: fir.call @_FortranADateAndTime(%[[dateBuffer]], %[[dateLen]], %[[timeBuffer]], %[[timeLen]], %[[zoneBuffer]], %[[zoneLen]], %{{.*}}, %{{.*}}, %[[valuesCast]]) : (!fir.ref, i64, !fir.ref, i64, !fir.ref, i64, !fir.ref, i32, !fir.box) -> none call date_and_time(date, time, zone, values) end subroutine - + ! CHECK-LABEL: func @_QPdate_and_time_test2( ! CHECK-SAME: %[[date:.*]]: !fir.boxchar<1>{{.*}}) subroutine date_and_time_test2(date) character(*) :: date ! CHECK: %[[dateUnbox:.*]]:2 = fir.unboxchar %[[date]] : (!fir.boxchar<1>) -> (!fir.ref>, index) - ! CHECK: %[[values:.*]] = fir.absent !fir.box + ! CHECK: %[[values:.*]] = fir.absent !fir.box ! CHECK: %[[dateBuffer:.*]] = fir.convert %[[dateUnbox]]#0 : (!fir.ref>) -> !fir.ref ! CHECK: %[[dateLen:.*]] = fir.convert %[[dateUnbox]]#1 : (index) -> i64 ! CHECK: %[[timeBuffer:.*]] = fir.convert %c0{{.*}} : (index) -> !fir.ref @@ -34,7 +34,7 @@ ! CHECK: fir.call @_FortranADateAndTime(%[[dateBuffer]], %[[dateLen]], %[[timeBuffer]], %[[timeLen]], %[[zoneBuffer]], %[[zoneLen]], %{{.*}}, %{{.*}}, %[[values]]) : (!fir.ref, i64, !fir.ref, i64, !fir.ref, i64, !fir.ref, i32, !fir.box) -> none call date_and_time(date) end subroutine - + ! CHECK-LABEL: func @_QPdate_and_time_dynamic_optional( ! CHECK-SAME: %[[VAL_0:[^:]*]]: !fir.boxchar<1> ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> @@ -58,7 +58,7 @@ ! CHECK: %[[VAL_10:.*]] = fir.box_addr %[[VAL_9]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_12:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_13:.*]] = arith.cmpi ne, %[[VAL_11]], %[[VAL_12]] : i64 + ! CHECK: %[[VAL_13:.*]] = arith.cmpi ne(%[[VAL_11]], %[[VAL_12]]) : i64 ! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_3]] : !fir.ref>>> ! CHECK: %[[VAL_15:.*]] = fir.absent !fir.box>> ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_13]], %[[VAL_14]], %[[VAL_15]] : !fir.box>> diff --git a/flang/test/Lower/Intrinsics/dim.f90 b/flang/test/Lower/Intrinsics/dim.f90 --- a/flang/test/Lower/Intrinsics/dim.f90 +++ b/flang/test/Lower/Intrinsics/dim.f90 @@ -8,7 +8,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = arith.constant 0.000000e+00 : f32 ! CHECK: %[[VAL_6:.*]] = arith.subf %[[VAL_3]], %[[VAL_4]] : f32 -! CHECK: %[[VAL_7:.*]] = arith.cmpf ogt, %[[VAL_6]], %[[VAL_5]] : f32 +! CHECK: %[[VAL_7:.*]] = arith.cmpf ogt(%[[VAL_6]], %[[VAL_5]]) : f32 ! CHECK: %[[VAL_8:.*]] = arith.select %[[VAL_7]], %[[VAL_6]], %[[VAL_5]] : f32 ! CHECK: fir.store %[[VAL_8]] to %[[VAL_2]] : !fir.ref ! CHECK: return @@ -23,11 +23,10 @@ ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i32 ! CHECK: %[[VAL_6:.*]] = arith.subi %[[VAL_3]], %[[VAL_4]] : i32 -! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt, %[[VAL_6]], %[[VAL_5]] : i32 +! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt(%[[VAL_6]], %[[VAL_5]]) : i32 ! CHECK: %[[VAL_8:.*]] = arith.select %[[VAL_7]], %[[VAL_6]], %[[VAL_5]] : i32 ! CHECK: fir.store %[[VAL_8]] to %[[VAL_2]] : !fir.ref ! CHECK: return integer :: i, j, k k = dim(i, j) end subroutine - diff --git a/flang/test/Lower/Intrinsics/dshiftl.f90 b/flang/test/Lower/Intrinsics/dshiftl.f90 --- a/flang/test/Lower/Intrinsics/dshiftl.f90 +++ b/flang/test/Lower/Intrinsics/dshiftl.f90 @@ -17,15 +17,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i8 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i8 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_L]] : i8 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_L]] : i8 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_L]]) : i8 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_L]]) : i8 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[S_CONV]] : i8 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i8 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i8 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_R]] : i8 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_R]] : i8 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_R]]) : i8 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_R]]) : i8 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[DIFF]] : i8 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i8 @@ -48,15 +48,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i16 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i16 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_L]] : i16 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_L]] : i16 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_L]]) : i16 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_L]]) : i16 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[S_CONV]] : i16 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i16 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i16 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_R]] : i16 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_R]] : i16 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_R]]) : i16 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_R]]) : i16 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[DIFF]] : i16 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i16 @@ -78,15 +78,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_VAL]] : i32 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[S_VAL]], %[[C_0_L]] : i32 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[S_VAL]], %[[C_BITS_L]] : i32 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[S_VAL]], %[[C_0_L]]) : i32 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[S_VAL]], %[[C_BITS_L]]) : i32 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[S_VAL]] : i32 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i32 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_R]] : i32 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_R]] : i32 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_R]]) : i32 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_R]]) : i32 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[DIFF]] : i32 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i32 @@ -109,15 +109,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i64 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i64 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_L]] : i64 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_L]] : i64 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_L]]) : i64 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_L]]) : i64 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[S_CONV]] : i64 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i64 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i64 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_R]] : i64 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_R]] : i64 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_R]]) : i64 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_R]]) : i64 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[DIFF]] : i64 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i64 @@ -140,15 +140,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i128 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i128 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_L]] : i128 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_L]] : i128 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_L]]) : i128 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_L]]) : i128 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[S_CONV]] : i128 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i128 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i128 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_R]] : i128 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_R]] : i128 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_R]]) : i128 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_R]]) : i128 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[DIFF]] : i128 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i128 diff --git a/flang/test/Lower/Intrinsics/dshiftr.f90 b/flang/test/Lower/Intrinsics/dshiftr.f90 --- a/flang/test/Lower/Intrinsics/dshiftr.f90 +++ b/flang/test/Lower/Intrinsics/dshiftr.f90 @@ -17,15 +17,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i8 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i8 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_L]] : i8 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_L]] : i8 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_L]]) : i8 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_L]]) : i8 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[DIFF]] : i8 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i8 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i8 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_R]] : i8 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_R]] : i8 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_R]]) : i8 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_R]]) : i8 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[S_CONV]] : i8 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i8 @@ -48,15 +48,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i16 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i16 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_L]] : i16 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_L]] : i16 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_L]]) : i16 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_L]]) : i16 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[DIFF]] : i16 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i16 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i16 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_R]] : i16 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_R]] : i16 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_R]]) : i16 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_R]]) : i16 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[S_CONV]] : i16 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i16 @@ -78,15 +78,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_VAL]] : i32 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_L]] : i32 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_L]] : i32 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_L]]) : i32 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_L]]) : i32 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[DIFF]] : i32 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i32 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[S_VAL]], %[[C_0_R]] : i32 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[S_VAL]], %[[C_BITS_R]] : i32 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[S_VAL]], %[[C_0_R]]) : i32 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[S_VAL]], %[[C_BITS_R]]) : i32 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[S_VAL]] : i32 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i32 @@ -109,15 +109,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i64 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i64 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_L]] : i64 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_L]] : i64 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_L]]) : i64 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_L]]) : i64 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[DIFF]] : i64 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i64 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i64 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_R]] : i64 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_R]] : i64 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_R]]) : i64 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_R]]) : i64 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[S_CONV]] : i64 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i64 @@ -140,15 +140,15 @@ ! CHECK: %[[DIFF:.*]] = arith.subi %[[C_BITS]], %[[S_CONV]] : i128 ! CHECK: %[[C_BITS_L:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0_L:.*]] = arith.constant 0 : i128 - ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt, %[[DIFF]], %[[C_0_L]] : i128 - ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge, %[[DIFF]], %[[C_BITS_L]] : i128 + ! CHECK: %[[UNDER_L:.*]] = arith.cmpi slt(%[[DIFF]], %[[C_0_L]]) : i128 + ! CHECK: %[[OVER_L:.*]] = arith.cmpi sge(%[[DIFF]], %[[C_BITS_L]]) : i128 ! CHECK: %[[INV_L:.*]] = arith.ori %[[UNDER_L]], %[[OVER_L]] : i1 ! CHECK: %[[SHL:.*]] = arith.shli %[[A_VAL]], %[[DIFF]] : i128 ! CHECK: %[[LFT:.*]] = arith.select %[[INV_L]], %[[C_0_L]], %[[SHL]] : i128 ! CHECK: %[[C_BITS_R:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0_R:.*]] = arith.constant 0 : i128 - ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt, %[[S_CONV]], %[[C_0_R]] : i128 - ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge, %[[S_CONV]], %[[C_BITS_R]] : i128 + ! CHECK: %[[UNDER_R:.*]] = arith.cmpi slt(%[[S_CONV]], %[[C_0_R]]) : i128 + ! CHECK: %[[OVER_R:.*]] = arith.cmpi sge(%[[S_CONV]], %[[C_BITS_R]]) : i128 ! CHECK: %[[INV_R:.*]] = arith.ori %[[UNDER_R]], %[[OVER_R]] : i1 ! CHECK: %[[SHR:.*]] = arith.shrui %[[B_VAL]], %[[S_CONV]] : i128 ! CHECK: %[[RGT:.*]] = arith.select %[[INV_R]], %[[C_0_R]], %[[SHR]] : i128 diff --git a/flang/test/Lower/Intrinsics/exit-2.f90 b/flang/test/Lower/Intrinsics/exit-2.f90 --- a/flang/test/Lower/Intrinsics/exit-2.f90 +++ b/flang/test/Lower/Intrinsics/exit-2.f90 @@ -26,7 +26,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi ne, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi ne(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.if %[[VAL_5]] -> (i32) { ! CHECK: %[[VAL_7:.*]] = fir.load %[[VAL_0]] : !fir.ref>> ! CHECK: %[[VAL_8:.*]] = fir.box_addr %[[VAL_7]] : (!fir.box>) -> !fir.ptr diff --git a/flang/test/Lower/Intrinsics/get_command_argument-optional.f90 b/flang/test/Lower/Intrinsics/get_command_argument-optional.f90 --- a/flang/test/Lower/Intrinsics/get_command_argument-optional.f90 +++ b/flang/test/Lower/Intrinsics/get_command_argument-optional.f90 @@ -7,11 +7,11 @@ ! CHECK-SAME: %[[lengthParam:.*]]: !fir.ref {fir.bindc_name = "length", fir.optional}, ! CHECK-SAME: %[[statusParam:.*]]: !fir.ref {fir.bindc_name = "status", fir.optional}, ! CHECK-SAME: %[[errmsgParam:.*]]: !fir.boxchar<1> {fir.bindc_name = "errmsg", fir.optional}) { -subroutine test(number, value, length, status, errmsg) +subroutine test(number, value, length, status, errmsg) integer, optional :: number, status, length character(*), optional :: value, errmsg ! Note: number cannot be absent - call get_command_argument(number, value, length, status, errmsg) + call get_command_argument(number, value, length, status, errmsg) ! CHECK: %[[errmsgUnboxed:.*]]:2 = fir.unboxchar %[[errmsgParam]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[valueUnboxed:.*]]:2 = fir.unboxchar %[[valueParam]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[number:.*]] = fir.load %[[numberParam]] : !fir.ref @@ -36,7 +36,7 @@ ! CHECK: %[[status:.*]] = fir.call @_FortranAGetCommandArgument(%[[number]], %[[value]], %[[length]], %[[errmsg]], %[[sourceFile]], %[[sourceLine]]) : (i32, !fir.box, !fir.box, !fir.box, !fir.ref, i32) -> i32 ! CHECK: %[[statusI64:.*]] = fir.convert %[[statusParam]] : (!fir.ref) -> i64 ! CHECK: %[[zero:.*]] = arith.constant 0 : i64 -! CHECK: %[[statusIsNonNull:.*]] = arith.cmpi ne, %[[statusI64]], %[[zero]] : i64 +! CHECK: %[[statusIsNonNull:.*]] = arith.cmpi ne(%[[statusI64]], %[[zero]]) : i64 ! CHECK: fir.if %[[statusIsNonNull]] { ! CHECK: fir.store %[[status]] to %[[statusParam]] : !fir.ref ! CHECK: } diff --git a/flang/test/Lower/Intrinsics/get_environment_variable-optional.f90 b/flang/test/Lower/Intrinsics/get_environment_variable-optional.f90 --- a/flang/test/Lower/Intrinsics/get_environment_variable-optional.f90 +++ b/flang/test/Lower/Intrinsics/get_environment_variable-optional.f90 @@ -9,12 +9,12 @@ ! CHECK-SAME: %[[VAL_3:.*]]: !fir.ref {fir.bindc_name = "status", fir.optional}, ! CHECK-SAME: %[[VAL_4:.*]]: !fir.ref> {fir.bindc_name = "trim_name", fir.optional}, ! CHECK-SAME: %[[VAL_5:.*]]: !fir.boxchar<1> {fir.bindc_name = "errmsg", fir.optional}) { -subroutine test(name, value, length, status, trim_name, errmsg) +subroutine test(name, value, length, status, trim_name, errmsg) integer, optional :: status, length character(*), optional :: name, value, errmsg logical, optional :: trim_name ! Note: name is not optional in et_environment_variable and must be present - call get_environment_variable(name, value, length, status, trim_name, errmsg) + call get_environment_variable(name, value, length, status, trim_name, errmsg) ! CHECK: %[[VAL_6:.*]]:2 = fir.unboxchar %[[VAL_5]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_7:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_8:.*]]:2 = fir.unboxchar %[[VAL_1]] : (!fir.boxchar<1>) -> (!fir.ref>, index) @@ -29,7 +29,7 @@ ! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_14]], %[[VAL_15]], %[[VAL_16]] : !fir.box> ! CHECK: %[[VAL_18:.*]] = fir.convert %[[VAL_4]] : (!fir.ref>) -> i64 ! CHECK: %[[VAL_19:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_20:.*]] = arith.cmpi ne, %[[VAL_18]], %[[VAL_19]] : i64 +! CHECK: %[[VAL_20:.*]] = arith.cmpi ne(%[[VAL_18]], %[[VAL_19]]) : i64 ! CHECK: %[[VAL_21:.*]] = fir.if %[[VAL_20]] -> (i1) { ! CHECK: %[[VAL_22:.*]] = fir.load %[[VAL_4]] : !fir.ref> ! CHECK: %[[VAL_23:.*]] = fir.convert %[[VAL_22]] : (!fir.logical<4>) -> i1 @@ -44,13 +44,13 @@ ! CHECK: %[[VAL_31:.*]] = fir.call @_FortranAEnvVariableValue(%[[VAL_27]], %[[VAL_28]], %[[VAL_32:.*]], %[[VAL_29]], %{{.*}}, %{{.*}}) : (!fir.box, !fir.box, i1, !fir.box, !fir.ref, i32) -> i32 ! CHECK: %[[VAL_33:.*]] = fir.convert %[[VAL_3]] : (!fir.ref) -> i64 ! CHECK: %[[VAL_34:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_35:.*]] = arith.cmpi ne, %[[VAL_33]], %[[VAL_34]] : i64 +! CHECK: %[[VAL_35:.*]] = arith.cmpi ne(%[[VAL_33]], %[[VAL_34]]) : i64 ! CHECK: fir.if %[[VAL_35]] { ! CHECK: fir.store %[[VAL_31]] to %[[VAL_3]] : !fir.ref ! CHECK: } ! CHECK: %[[VAL_36:.*]] = fir.convert %[[VAL_2]] : (!fir.ref) -> i64 ! CHECK: %[[VAL_37:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_38:.*]] = arith.cmpi ne, %[[VAL_36]], %[[VAL_37]] : i64 +! CHECK: %[[VAL_38:.*]] = arith.cmpi ne(%[[VAL_36]], %[[VAL_37]]) : i64 ! CHECK: fir.if %[[VAL_38]] { ! CHECK: %[[VAL_41:.*]] = fir.convert %[[VAL_9]] : (!fir.box>) -> !fir.box ! CHECK: %[[VAL_43:.*]] = fir.call @_FortranAEnvVariableLength(%[[VAL_41]], %[[VAL_32]], %{{.*}}, %{{.*}}) : (!fir.box, i1, !fir.ref, i32) -> i64 diff --git a/flang/test/Lower/Intrinsics/ibits.f90 b/flang/test/Lower/Intrinsics/ibits.f90 --- a/flang/test/Lower/Intrinsics/ibits.f90 +++ b/flang/test/Lower/Intrinsics/ibits.f90 @@ -14,7 +14,7 @@ ! CHECK: %[[VAL_11:.*]] = arith.shrui %[[VAL_10]], %[[VAL_8]] : i32 ! CHECK: %[[VAL_12:.*]] = arith.shrsi %[[i]], %[[j]] : i32 ! CHECK: %[[VAL_13:.*]] = arith.andi %[[VAL_12]], %[[VAL_11]] : i32 - ! CHECK: %[[VAL_14:.*]] = arith.cmpi eq, %[[k]], %[[VAL_9]] : i32 + ! CHECK: %[[VAL_14:.*]] = arith.cmpi eq(%[[k]], %[[VAL_9]]) : i32 ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_9]], %[[VAL_13]] : i32 ! CHECK: fir.store %[[VAL_15]] to %[[result]] : !fir.ref ! CHECK: %[[VAL_16:.*]] = fir.load %[[result]] : !fir.ref diff --git a/flang/test/Lower/Intrinsics/ieee_is_finite.f90 b/flang/test/Lower/Intrinsics/ieee_is_finite.f90 --- a/flang/test/Lower/Intrinsics/ieee_is_finite.f90 +++ b/flang/test/Lower/Intrinsics/ieee_is_finite.f90 @@ -11,9 +11,9 @@ ! CHECK: %[[V_6:[0-9]+]] = arith.shrui %c-1{{.*}}, %[[V_5]] : i32 ! CHECK: %[[V_7:[0-9]+]] = arith.shrsi %[[V_4]], %c23{{.*}} : i32 ! CHECK: %[[V_8:[0-9]+]] = arith.andi %[[V_7]], %[[V_6]] : i32 - ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi eq, %c8{{.*}}, %c0{{.*}} : i32 + ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi eq(%c8{{.*}}, %c0{{.*}}) : i32 ! CHECK: %[[V_10:[0-9]+]] = arith.select %[[V_9]], %c0{{.*}}, %[[V_8]] : i32 - ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c255{{.*}} : i32 + ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne(%[[V_10]], %c255{{.*}}) : i32 ! CHECK: %[[V_12:[0-9]+]] = fir.convert %[[V_11]] : (i1) -> !fir.logical<4> ! CHECK: %[[V_13:[0-9]+]] = fir.convert %[[V_12]] : (!fir.logical<4>) -> i1 print*, ieee_is_finite(x) @@ -26,9 +26,9 @@ ! CHECK: %[[V_24:[0-9]+]] = arith.shrui %c-1{{.*}}, %[[V_23]] : i32 ! CHECK: %[[V_25:[0-9]+]] = arith.shrsi %[[V_22]], %c23{{.*}} : i32 ! CHECK: %[[V_26:[0-9]+]] = arith.andi %[[V_25]], %[[V_24]] : i32 - ! CHECK: %[[V_27:[0-9]+]] = arith.cmpi eq, %c8{{.*}}, %c0{{.*}} : i32 + ! CHECK: %[[V_27:[0-9]+]] = arith.cmpi eq(%c8{{.*}}, %c0{{.*}}) : i32 ! CHECK: %[[V_28:[0-9]+]] = arith.select %[[V_27]], %c0{{.*}}, %[[V_26]] : i32 - ! CHECK: %[[V_29:[0-9]+]] = arith.cmpi ne, %[[V_28]], %c255{{.*}} : i32 + ! CHECK: %[[V_29:[0-9]+]] = arith.cmpi ne(%[[V_28]], %c255{{.*}}) : i32 ! CHECK: %[[V_30:[0-9]+]] = fir.convert %[[V_29]] : (i1) -> !fir.logical<4> ! CHECK: %[[V_31:[0-9]+]] = fir.convert %[[V_30]] : (!fir.logical<4>) -> i1 print*, ieee_is_finite(x+x) @@ -39,9 +39,9 @@ ! CHECK: %[[V_40:[0-9]+]] = arith.shrui %c-1{{.*}}, %[[V_39]] : i64 ! CHECK: %[[V_41:[0-9]+]] = arith.shrsi %[[V_38]], %c52{{.*}} : i64 ! CHECK: %[[V_42:[0-9]+]] = arith.andi %[[V_41]], %[[V_40]] : i64 - ! CHECK: %[[V_43:[0-9]+]] = arith.cmpi eq, %c11{{.*}}, %c0{{.*}} : i64 + ! CHECK: %[[V_43:[0-9]+]] = arith.cmpi eq(%c11{{.*}}, %c0{{.*}}) : i64 ! CHECK: %[[V_44:[0-9]+]] = arith.select %[[V_43]], %c0{{.*}}, %[[V_42]] : i64 - ! CHECK: %[[V_45:[0-9]+]] = arith.cmpi ne, %[[V_44]], %c2047{{.*}} : i64 + ! CHECK: %[[V_45:[0-9]+]] = arith.cmpi ne(%[[V_44]], %c2047{{.*}}) : i64 ! CHECK: %[[V_46:[0-9]+]] = fir.convert %[[V_45]] : (i1) -> !fir.logical<4> ! CHECK: %[[V_47:[0-9]+]] = fir.convert %[[V_46]] : (!fir.logical<4>) -> i1 print*, ieee_is_finite(y) @@ -54,9 +54,9 @@ ! CHECK: %[[V_58:[0-9]+]] = arith.shrui %c-1{{.*}}, %[[V_57]] : i64 ! CHECK: %[[V_59:[0-9]+]] = arith.shrsi %[[V_56]], %c52{{.*}} : i64 ! CHECK: %[[V_60:[0-9]+]] = arith.andi %[[V_59]], %[[V_58]] : i64 - ! CHECK: %[[V_61:[0-9]+]] = arith.cmpi eq, %c11{{.*}}, %c0{{.*}} : i64 + ! CHECK: %[[V_61:[0-9]+]] = arith.cmpi eq(%c11{{.*}}, %c0{{.*}}) : i64 ! CHECK: %[[V_62:[0-9]+]] = arith.select %[[V_61]], %c0{{.*}}, %[[V_60]] : i64 - ! CHECK: %[[V_63:[0-9]+]] = arith.cmpi ne, %[[V_62]], %c2047{{.*}} : i64 + ! CHECK: %[[V_63:[0-9]+]] = arith.cmpi ne(%[[V_62]], %c2047{{.*}}) : i64 ! CHECK: %[[V_64:[0-9]+]] = fir.convert %[[V_63]] : (i1) -> !fir.logical<4> ! CHECK: %[[V_65:[0-9]+]] = fir.convert %[[V_64]] : (!fir.logical<4>) -> i1 print*, ieee_is_finite(y+y) diff --git a/flang/test/Lower/Intrinsics/ieee_operator_eq.f90 b/flang/test/Lower/Intrinsics/ieee_operator_eq.f90 --- a/flang/test/Lower/Intrinsics/ieee_operator_eq.f90 +++ b/flang/test/Lower/Intrinsics/ieee_operator_eq.f90 @@ -9,7 +9,7 @@ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ! CHECK: %[[V_6:[0-9]+]] = fir.coordinate_of %arg1, %[[V_3]] : (!fir.ref>, !fir.field) -> !fir.ref ! CHECK: %[[V_7:[0-9]+]] = fir.load %[[V_6]] : !fir.ref - ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi eq, %[[V_5]], %[[V_7]] : i8 + ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi eq(%[[V_5]], %[[V_7]]) : i8 ! CHECK: %[[V_9:[0-9]+]] = fir.call @_FortranAioOutputLogical(%{{.*}}, %[[V_8]]) : (!fir.ref, i1) -> i1 print*, r1 == r2 end diff --git a/flang/test/Lower/Intrinsics/ishft.f90 b/flang/test/Lower/Intrinsics/ishft.f90 --- a/flang/test/Lower/Intrinsics/ishft.f90 +++ b/flang/test/Lower/Intrinsics/ishft.f90 @@ -13,8 +13,8 @@ ! CHECK: %[[VAL_10:.*]] = arith.subi %[[VAL_9]], %[[VAL_8]] : i32 ! CHECK: %[[VAL_11:.*]] = arith.shli %[[i]], %[[VAL_10]] : i32 ! CHECK: %[[VAL_12:.*]] = arith.shrui %[[i]], %[[VAL_10]] : i32 - ! CHECK: %[[VAL_13:.*]] = arith.cmpi sge, %[[VAL_10]], %[[VAL_5]] : i32 - ! CHECK: %[[VAL_14:.*]] = arith.cmpi slt, %[[j]], %[[VAL_6]] : i32 + ! CHECK: %[[VAL_13:.*]] = arith.cmpi sge(%[[VAL_10]], %[[VAL_5]]) : i32 + ! CHECK: %[[VAL_14:.*]] = arith.cmpi slt(%[[j]], %[[VAL_6]]) : i32 ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_12]], %[[VAL_11]] : i32 ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_13]], %[[VAL_6]], %[[VAL_15]] : i32 ! CHECK: fir.store %[[VAL_16]] to %[[result]] : !fir.ref diff --git a/flang/test/Lower/Intrinsics/ishftc.f90 b/flang/test/Lower/Intrinsics/ishftc.f90 --- a/flang/test/Lower/Intrinsics/ishftc.f90 +++ b/flang/test/Lower/Intrinsics/ishftc.f90 @@ -14,13 +14,13 @@ ! CHECK: %[[VAL_12:.*]] = arith.xori %[[j]], %[[VAL_11]] : i32 ! CHECK: %[[VAL_13:.*]] = arith.subi %[[VAL_12]], %[[VAL_11]] : i32 ! CHECK: %[[VAL_14:.*]] = arith.subi %[[k]], %[[VAL_13]] : i32 - ! CHECK: %[[VAL_15:.*]] = arith.cmpi eq, %[[j]], %[[VAL_8]] : i32 - ! CHECK: %[[VAL_16:.*]] = arith.cmpi eq, %[[VAL_13]], %[[k]] : i32 + ! CHECK: %[[VAL_15:.*]] = arith.cmpi eq(%[[j]], %[[VAL_8]]) : i32 + ! CHECK: %[[VAL_16:.*]] = arith.cmpi eq(%[[VAL_13]], %[[k]]) : i32 ! CHECK: %[[VAL_17:.*]] = arith.ori %[[VAL_15]], %[[VAL_16]] : i1 - ! CHECK: %[[VAL_18:.*]] = arith.cmpi sgt, %[[j]], %[[VAL_8]] : i32 + ! CHECK: %[[VAL_18:.*]] = arith.cmpi sgt(%[[j]], %[[VAL_8]]) : i32 ! CHECK: %[[VAL_19:.*]] = arith.select %[[VAL_18]], %[[VAL_13]], %[[VAL_14]] : i32 ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_18]], %[[VAL_14]], %[[VAL_13]] : i32 - ! CHECK: %[[VAL_21:.*]] = arith.cmpi ne, %[[k]], %[[VAL_7]] : i32 + ! CHECK: %[[VAL_21:.*]] = arith.cmpi ne(%[[k]], %[[VAL_7]]) : i32 ! CHECK: %[[VAL_22:.*]] = arith.shrui %[[i]], %[[k]] : i32 ! CHECK: %[[VAL_23:.*]] = arith.shli %[[VAL_22]], %[[k]] : i32 ! CHECK: %[[VAL_24:.*]] = arith.select %[[VAL_21]], %[[VAL_23]], %[[VAL_8]] : i32 @@ -40,7 +40,7 @@ ! CHECK: return %[[VAL_36]] : i32 ishftc_test = ishftc(i, j, k) end - + ! Test cases where the size argument presence can only be know at runtime module test_ishftc contains @@ -67,9 +67,9 @@ ! CHECK: %[[VAL_19:.*]] = arith.xori %[[VAL_9]], %[[VAL_18]] : i32 ! CHECK: %[[VAL_20:.*]] = arith.subi %[[VAL_19]], %[[VAL_18]] : i32 ! CHECK: %[[VAL_21:.*]] = arith.subi %[[VAL_11]], %[[VAL_20]] : i32 - ! ... as in non optional case + ! ... as in non optional case end subroutine - + ! CHECK-LABEL: func @_QMtest_ishftcPdyn_optional_array_scalar( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.box> {fir.bindc_name = "i"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.box> {fir.bindc_name = "shift"}, @@ -90,11 +90,11 @@ ! CHECK: %[[VAL_26:.*]] = arith.constant 32 : i32 ! CHECK: fir.result %[[VAL_26]] : i32 ! CHECK: } - ! ... as in non optional case + ! ... as in non optional case ! CHECK: } print *, ishftc(i, shift, size) end subroutine - + ! CHECK-LABEL: func @_QMtest_ishftcPdyn_optional_array( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.box> {fir.bindc_name = "i"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.box> {fir.bindc_name = "shift"}, @@ -117,22 +117,22 @@ ! CHECK: %[[VAL_32:.*]] = arith.constant 32 : i32 ! CHECK: fir.result %[[VAL_32]] : i32 ! CHECK: } - ! ... as in non optional case + ! ... as in non optional case ! CHECK: } print *, ishftc(i, shift, size) end subroutine end module - + use test_ishftc integer :: i(4) = [333, 334, 335, 336] integer :: shift(4) = [2, 1, -1, -2] integer :: size(4) = [2, 4, 8, 16] call dyn_optional_scalar(i(1), shift(1)) call dyn_optional_scalar(i(1), shift(1), size(1)) - + call dyn_optional_array_scalar(i, shift) call dyn_optional_array_scalar(i, shift, size(1)) - + call dyn_optional_array(i, shift) call dyn_optional_array(i, shift, size) end diff --git a/flang/test/Lower/Intrinsics/lbound.f90 b/flang/test/Lower/Intrinsics/lbound.f90 --- a/flang/test/Lower/Intrinsics/lbound.f90 +++ b/flang/test/Lower/Intrinsics/lbound.f90 @@ -71,14 +71,14 @@ ! BeginExternalListOutput ! CHECK: %[[VAL_32:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_33:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_34:.*]] = arith.cmpi eq, %[[VAL_16:.*]], %[[VAL_33]] : index +! CHECK: %[[VAL_34:.*]] = arith.cmpi eq(%[[VAL_16:.*]], %[[VAL_33]]) : index ! CHECK: %[[VAL_35:.*]] = fir.convert %[[VAL_32]] : (i32) -> index ! CHECK: %[[VAL_36:.*]] = arith.select %[[VAL_34]], %[[VAL_35]], %[[VAL_8]] : index ! CHECK: %[[VAL_37:.*]] = fir.convert %[[VAL_36]] : (index) -> i32 ! CHECK: %[[VAL_38:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_39:.*]] = fir.coordinate_of %[[VAL_6]], %[[VAL_38]] : (!fir.ref>, index) -> !fir.ref ! CHECK: fir.store %[[VAL_37]] to %[[VAL_39]] : !fir.ref -! CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_26:.*]], %[[VAL_33]] : index +! CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_26:.*]], %[[VAL_33]]) : index ! CHECK: %[[VAL_41:.*]] = fir.convert %[[VAL_32]] : (i32) -> index ! CHECK: %[[VAL_42:.*]] = arith.select %[[VAL_40]], %[[VAL_41]], %[[VAL_18]] : index ! CHECK: %[[VAL_43:.*]] = fir.convert %[[VAL_42]] : (index) -> i32 diff --git a/flang/test/Lower/Intrinsics/len.f90 b/flang/test/Lower/Intrinsics/len.f90 --- a/flang/test/Lower/Intrinsics/len.f90 +++ b/flang/test/Lower/Intrinsics/len.f90 @@ -72,7 +72,7 @@ character(n), allocatable :: c(:) ! CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 -! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[c0_i32]] : i32 +! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[c0_i32]]) : i32 ! CHECK: %[[len:.*]] = arith.select %[[cmp]], %[[VAL_3]], %[[c0_i32]] : i32 ! CHECK: fir.store %[[len]] to %[[VAL_0]] : !fir.ref i = len(c) @@ -87,7 +87,7 @@ character(n), pointer :: c(:) ! CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 -! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[c0_i32]] : i32 +! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[c0_i32]]) : i32 ! CHECK: %[[len:.*]] = arith.select %[[cmp]], %[[VAL_3]], %[[c0_i32]] : i32 ! CHECK: fir.store %[[len]] to %[[VAL_0]] : !fir.ref i = len(c) @@ -102,7 +102,7 @@ character(n) :: c(:) ! CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 -! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[c0_i32]] : i32 +! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[c0_i32]]) : i32 ! CHECK: %[[len:.*]] = arith.select %[[cmp]], %[[VAL_3]], %[[c0_i32]] : i32 ! CHECK: fir.store %[[len]] to %[[VAL_0]] : !fir.ref i = len(c) diff --git a/flang/test/Lower/Intrinsics/maskl.f90 b/flang/test/Lower/Intrinsics/maskl.f90 --- a/flang/test/Lower/Intrinsics/maskl.f90 +++ b/flang/test/Lower/Intrinsics/maskl.f90 @@ -14,7 +14,7 @@ ! CHECK: %[[BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_VAL]] : i32 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[C__1]], %[[LEN]] : i32 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_VAL]], %[[C__0]] : i32 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_VAL]], %[[C__0]]) : i32 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i32 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskl_test @@ -33,7 +33,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i8 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i8 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[C__1]], %[[LEN]] : i8 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i8 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i8 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i8 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskl1_test @@ -52,7 +52,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i16 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i16 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[C__1]], %[[LEN]] : i16 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i16 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i16 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i16 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskl2_test @@ -70,7 +70,7 @@ ! CHECK: %[[BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_VAL]] : i32 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[C__1]], %[[LEN]] : i32 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_VAL]], %[[C__0]] : i32 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_VAL]], %[[C__0]]) : i32 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i32 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskl4_test @@ -89,7 +89,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i64 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i64 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[C__1]], %[[LEN]] : i64 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i64 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i64 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i64 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskl8_test diff --git a/flang/test/Lower/Intrinsics/maskr.f90 b/flang/test/Lower/Intrinsics/maskr.f90 --- a/flang/test/Lower/Intrinsics/maskr.f90 +++ b/flang/test/Lower/Intrinsics/maskr.f90 @@ -14,7 +14,7 @@ ! CHECK: %[[BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_VAL]] : i32 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[C__1]], %[[LEN]] : i32 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_VAL]], %[[C__0]] : i32 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_VAL]], %[[C__0]]) : i32 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i32 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskr_test @@ -33,7 +33,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i8 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i8 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[C__1]], %[[LEN]] : i8 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i8 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i8 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i8 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskr1_test @@ -52,7 +52,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i16 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i16 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[C__1]], %[[LEN]] : i16 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i16 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i16 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i16 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskr2_test @@ -70,7 +70,7 @@ ! CHECK: %[[BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_VAL]] : i32 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[C__1]], %[[LEN]] : i32 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_VAL]], %[[C__0]] : i32 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_VAL]], %[[C__0]]) : i32 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i32 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskr4_test @@ -89,7 +89,7 @@ ! CHECK: %[[A_CONV:.*]] = fir.convert %[[A_VAL]] : (i32) -> i64 ! CHECK: %[[LEN:.*]] = arith.subi %[[BITS]], %[[A_CONV]] : i64 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[C__1]], %[[LEN]] : i64 - ! CHECK: %[[IS0:.*]] = arith.cmpi eq, %[[A_CONV]], %[[C__0]] : i64 + ! CHECK: %[[IS0:.*]] = arith.cmpi eq(%[[A_CONV]], %[[C__0]]) : i64 ! CHECK: %[[RESULT:.*]] = arith.select %[[IS0]], %[[C__0]], %[[SHIFT]] : i64 ! CHECK: fir.store %[[RESULT]] to %[[B]] : !fir.ref end subroutine maskr8_test diff --git a/flang/test/Lower/Intrinsics/max.f90 b/flang/test/Lower/Intrinsics/max.f90 --- a/flang/test/Lower/Intrinsics/max.f90 +++ b/flang/test/Lower/Intrinsics/max.f90 @@ -17,11 +17,11 @@ ! CHECK: fir.do_loop %[[VAL_26:.*]] = %{{.*}} to %{{.*}} step %{{.*}} unordered iter_args(%[[VAL_27:.*]] = %{{.*}}) -> (!fir.array) { ! CHECK: %[[VAL_28:.*]] = fir.array_fetch %[[VAL_10]], %[[VAL_26]] : (!fir.array, index) -> i32 ! CHECK: %[[VAL_29:.*]] = fir.array_fetch %[[VAL_11]], %[[VAL_26]] : (!fir.array, index) -> i32 - ! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_28]], %[[VAL_29]] : i32 + ! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_28]], %[[VAL_29]]) : i32 ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_28]], %[[VAL_29]] : i32 ! CHECK: %[[VAL_32:.*]] = fir.if %[[VAL_12]] -> (i32) { ! CHECK: %[[VAL_33:.*]] = fir.array_fetch %[[VAL_18]], %[[VAL_26]] : (!fir.array, index) -> i32 - ! CHECK: %[[VAL_34:.*]] = arith.cmpi sgt, %[[VAL_31]], %[[VAL_33]] : i32 + ! CHECK: %[[VAL_34:.*]] = arith.cmpi sgt(%[[VAL_31]], %[[VAL_33]]) : i32 ! CHECK: %[[VAL_35:.*]] = arith.select %[[VAL_34]], %[[VAL_31]], %[[VAL_33]] : i32 ! CHECK: fir.result %[[VAL_35]] : i32 ! CHECK: } else { @@ -31,8 +31,8 @@ ! CHECK: fir.result %[[VAL_36]] : !fir.array ! CHECK: } print *, max(a, b, c) - end subroutine - + end subroutine + ! CHECK-LABEL: func @_QMmax_testPdynamic_optional_array_expr_scalar_optional( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.box> {fir.bindc_name = "a"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.box> {fir.bindc_name = "b"}, @@ -47,11 +47,11 @@ ! CHECK: fir.do_loop %[[VAL_20:.*]] = %{{.*}} to %{{.*}} step %{{.*}} unordered iter_args(%[[VAL_21:.*]] = %{{.*}}) -> (!fir.array) { ! CHECK: %[[VAL_22:.*]] = fir.array_fetch %[[VAL_10]], %[[VAL_20]] : (!fir.array, index) -> i32 ! CHECK: %[[VAL_23:.*]] = fir.array_fetch %[[VAL_11]], %[[VAL_20]] : (!fir.array, index) -> i32 - ! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt, %[[VAL_22]], %[[VAL_23]] : i32 + ! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt(%[[VAL_22]], %[[VAL_23]]) : i32 ! CHECK: %[[VAL_25:.*]] = arith.select %[[VAL_24]], %[[VAL_22]], %[[VAL_23]] : i32 ! CHECK: %[[VAL_26:.*]] = fir.if %[[VAL_12]] -> (i32) { ! CHECK: %[[VAL_27:.*]] = fir.load %[[VAL_2]] : !fir.ref - ! CHECK: %[[VAL_28:.*]] = arith.cmpi sgt, %[[VAL_25]], %[[VAL_27]] : i32 + ! CHECK: %[[VAL_28:.*]] = arith.cmpi sgt(%[[VAL_25]], %[[VAL_27]]) : i32 ! CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_28]], %[[VAL_25]], %[[VAL_27]] : i32 ! CHECK: fir.result %[[VAL_29]] : i32 ! CHECK: } else { @@ -60,8 +60,8 @@ ! CHECK: %[[VAL_30:.*]] = fir.array_update %[[VAL_21]], %[[VAL_26]], %[[VAL_20]] : (!fir.array, i32, index) -> !fir.array ! CHECK: fir.result %[[VAL_30]] : !fir.array ! CHECK: } - end subroutine - + end subroutine + ! CHECK-LABEL: func @_QMmax_testPdynamic_optional_scalar( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref {fir.bindc_name = "a"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref {fir.bindc_name = "b"}, @@ -73,19 +73,19 @@ ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_9:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_10:.*]] = fir.is_present %[[VAL_2]] : (!fir.ref) -> i1 - ! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_8]], %[[VAL_9]] : i32 + ! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_8]], %[[VAL_9]]) : i32 ! CHECK: %[[VAL_12:.*]] = arith.select %[[VAL_11]], %[[VAL_8]], %[[VAL_9]] : i32 ! CHECK: %[[VAL_13:.*]] = fir.if %[[VAL_10]] -> (i32) { ! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_2]] : !fir.ref - ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_14]] : i32 + ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_14]]) : i32 ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_15]], %[[VAL_12]], %[[VAL_14]] : i32 ! CHECK: fir.result %[[VAL_16]] : i32 ! CHECK: } else { ! CHECK: fir.result %[[VAL_12]] : i32 ! CHECK: } ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[VAL_13]]) : (!fir.ref, i32) -> i1 - end subroutine - + end subroutine + ! CHECK-LABEL: func @_QMmax_testPdynamic_optional_weird( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref {fir.bindc_name = "a"}, ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref {fir.bindc_name = "b"}, @@ -102,30 +102,30 @@ ! CHECK: %[[VAL_12:.*]] = fir.is_present %[[VAL_2]] : (!fir.ref) -> i1 ! CHECK: %[[VAL_13:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_14:.*]] = fir.is_present %[[VAL_4]] : (!fir.ref) -> i1 - ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt, %[[VAL_10]], %[[VAL_11]] : i32 + ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt(%[[VAL_10]], %[[VAL_11]]) : i32 ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_15]], %[[VAL_10]], %[[VAL_11]] : i32 ! CHECK: %[[VAL_17:.*]] = fir.if %[[VAL_12]] -> (i32) { ! CHECK: %[[VAL_18:.*]] = fir.load %[[VAL_2]] : !fir.ref - ! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_18]] : i32 + ! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_18]]) : i32 ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_19]], %[[VAL_16]], %[[VAL_18]] : i32 ! CHECK: fir.result %[[VAL_20]] : i32 ! CHECK: } else { ! CHECK: fir.result %[[VAL_16]] : i32 ! CHECK: } - ! CHECK: %[[VAL_21:.*]] = arith.cmpi sgt, %[[VAL_17]], %[[VAL_13]] : i32 + ! CHECK: %[[VAL_21:.*]] = arith.cmpi sgt(%[[VAL_17]], %[[VAL_13]]) : i32 ! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_21]], %[[VAL_17]], %[[VAL_13]] : i32 ! CHECK: %[[VAL_24:.*]] = fir.if %[[VAL_14]] -> (i32) { ! CHECK: %[[VAL_25:.*]] = fir.load %[[VAL_4]] : !fir.ref - ! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt, %[[VAL_23]], %[[VAL_25]] : i32 + ! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt(%[[VAL_23]], %[[VAL_25]]) : i32 ! CHECK: %[[VAL_27:.*]] = arith.select %[[VAL_26]], %[[VAL_23]], %[[VAL_25]] : i32 ! CHECK: fir.result %[[VAL_27]] : i32 ! CHECK: } else { ! CHECK: fir.result %[[VAL_23]] : i32 ! CHECK: } ! CHECK: fir.call @_FortranAioOutputInteger32(%{{.*}}, %[[VAL_24]]) : (!fir.ref, i32) -> i1 - end subroutine + end subroutine end module - + use :: max_test integer :: a(4) = [1,12,23, 34] integer :: b(4) = [31,22,13, 4] diff --git a/flang/test/Lower/Intrinsics/modulo.f90 b/flang/test/Lower/Intrinsics/modulo.f90 --- a/flang/test/Lower/Intrinsics/modulo.f90 +++ b/flang/test/Lower/Intrinsics/modulo.f90 @@ -8,9 +8,9 @@ ! CHECK-DAG: %[[p:.*]] = fir.load %[[arg2]] : !fir.ref ! CHECK-DAG: %[[rem:.*]] = arith.remf %[[a]], %[[p]] : f64 ! CHECK-DAG: %[[zero:.*]] = arith.constant 0.000000e+00 : f64 - ! CHECK-DAG: %[[remNotZero:.*]] = arith.cmpf une, %[[rem]], %[[zero]] : f64 - ! CHECK-DAG: %[[aNeg:.*]] = arith.cmpf olt, %[[a]], %[[zero]] : f64 - ! CHECK-DAG: %[[pNeg:.*]] = arith.cmpf olt, %[[p]], %[[zero]] : f64 + ! CHECK-DAG: %[[remNotZero:.*]] = arith.cmpf une(%[[rem]], %[[zero]]) : f64 + ! CHECK-DAG: %[[aNeg:.*]] = arith.cmpf olt(%[[a]], %[[zero]]) : f64 + ! CHECK-DAG: %[[pNeg:.*]] = arith.cmpf olt(%[[p]], %[[zero]]) : f64 ! CHECK-DAG: %[[signDifferent:.*]] = arith.xori %[[aNeg]], %[[pNeg]] : i1 ! CHECK-DAG: %[[mustAddP:.*]] = arith.andi %[[remNotZero]], %[[signDifferent]] : i1 ! CHECK-DAG: %[[remPlusP:.*]] = arith.addf %[[rem]], %[[p]] : f64 @@ -18,7 +18,7 @@ ! CHECK: fir.store %[[res]] to %[[arg0]] : !fir.ref r = modulo(a, p) end subroutine - + ! CHECK-LABEL: func @_QPmodulo_testi( ! CHECK-SAME: %[[arg0:.*]]: !fir.ref{{.*}}, %[[arg1:.*]]: !fir.ref{{.*}}, %[[arg2:.*]]: !fir.ref{{.*}}) { subroutine modulo_testi(r, a, p) @@ -27,12 +27,11 @@ ! CHECK-DAG: %[[p:.*]] = fir.load %[[arg2]] : !fir.ref ! CHECK-DAG: %[[rem:.*]] = arith.remsi %[[a]], %[[p]] : i64 ! CHECK-DAG: %[[argXor:.*]] = arith.xori %[[a]], %[[p]] : i64 - ! CHECK-DAG: %[[signDifferent:.*]] = arith.cmpi slt, %[[argXor]], %c0{{.*}} : i64 - ! CHECK-DAG: %[[remNotZero:.*]] = arith.cmpi ne, %[[rem]], %c0{{.*}} : i64 + ! CHECK-DAG: %[[signDifferent:.*]] = arith.cmpi slt(%[[argXor]], %c0{{.*}}) : i64 + ! CHECK-DAG: %[[remNotZero:.*]] = arith.cmpi ne(%[[rem]], %c0{{.*}}) : i64 ! CHECK-DAG: %[[mustAddP:.*]] = arith.andi %[[remNotZero]], %[[signDifferent]] : i1 ! CHECK-DAG: %[[remPlusP:.*]] = arith.addi %[[rem]], %[[p]] : i64 ! CHECK: %[[res:.*]] = arith.select %[[mustAddP]], %[[remPlusP]], %[[rem]] : i64 ! CHECK: fir.store %[[res]] to %[[arg0]] : !fir.ref r = modulo(a, p) end subroutine - \ No newline at end of file diff --git a/flang/test/Lower/Intrinsics/mvbits.f90 b/flang/test/Lower/Intrinsics/mvbits.f90 --- a/flang/test/Lower/Intrinsics/mvbits.f90 +++ b/flang/test/Lower/Intrinsics/mvbits.f90 @@ -22,7 +22,7 @@ ! CHECK: %[[VAL_20:.*]] = arith.andi %[[VAL_19]], %[[VAL_15]] : i32 ! CHECK: %[[VAL_21:.*]] = arith.shli %[[VAL_20]], %[[topos]] : i32 ! CHECK: %[[VAL_22:.*]] = arith.ori %[[VAL_18]], %[[VAL_21]] : i32 - ! CHECK: %[[VAL_23:.*]] = arith.cmpi eq, %[[len]], %[[VAL_11]] : i32 + ! CHECK: %[[VAL_23:.*]] = arith.cmpi eq(%[[len]], %[[VAL_11]]) : i32 ! CHECK: %[[VAL_24:.*]] = arith.select %[[VAL_23]], %[[to]], %[[VAL_22]] : i32 ! CHECK: fir.store %[[VAL_24]] to %arg3 : !fir.ref ! CHECK: %[[VAL_25:.*]] = fir.load %arg3 : !fir.ref @@ -62,7 +62,7 @@ ! CHECK: %[[VAL_29:.*]] = arith.andi %[[VAL_28]], %[[VAL_24]] : i32 ! CHECK: %[[VAL_30:.*]] = arith.shli %[[VAL_29]], %[[VAL_10]] : i32 ! CHECK: %[[VAL_31:.*]] = arith.ori %[[VAL_27]], %[[VAL_30]] : i32 -! CHECK: %[[VAL_32:.*]] = arith.cmpi eq, %[[VAL_9]], %[[VAL_20]] : i32 +! CHECK: %[[VAL_32:.*]] = arith.cmpi eq(%[[VAL_9]], %[[VAL_20]]) : i32 ! CHECK: %[[VAL_33:.*]] = arith.select %[[VAL_32]], %[[VAL_19]], %[[VAL_31]] : i32 ! CHECK: fir.store %[[VAL_33]] to %[[VAL_18]] : !fir.ref ! CHECK: } diff --git a/flang/test/Lower/Intrinsics/nearest.f90 b/flang/test/Lower/Intrinsics/nearest.f90 --- a/flang/test/Lower/Intrinsics/nearest.f90 +++ b/flang/test/Lower/Intrinsics/nearest.f90 @@ -7,13 +7,13 @@ ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f32 - ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] : f32 + ! CHECK: %[[cmp:.*]] = arith.cmpf ogt(%[[s]], %[[zero]]) : f32 ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 res = nearest(x, s) ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest4(%[[x]], %[[pos]]) : (f32, i1) -> f32 ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref end subroutine nearest_test1 - + ! CHECK-LABEL: nearest_test2 subroutine nearest_test2(x, s) real(kind=8) :: x, s, res @@ -21,13 +21,13 @@ ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f64 - ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] : f64 + ! CHECK: %[[cmp:.*]] = arith.cmpf ogt(%[[s]], %[[zero]]) : f64 ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 res = nearest(x, s) ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest8(%[[x]], %[[pos]]) : (f64, i1) -> f64 ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref end subroutine nearest_test2 - + ! CHECK-LABEL: nearest_test3 subroutine nearest_test3(x, s) real(kind=10) :: x, s, res @@ -35,13 +35,13 @@ ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f80 - ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] : f80 + ! CHECK: %[[cmp:.*]] = arith.cmpf ogt(%[[s]], %[[zero]]) : f80 ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 res = nearest(x, s) ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest10(%[[x]], %[[pos]]) : (f80, i1) -> f80 ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref end subroutine nearest_test3 - + ! CHECK-LABEL: nearest_test4 subroutine nearest_test4(x, s) real(kind=16) :: x, s, res @@ -49,13 +49,13 @@ ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f128 - ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] : f128 + ! CHECK: %[[cmp:.*]] = arith.cmpf ogt(%[[s]], %[[zero]]) : f128 ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 res = nearest(x, s) ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest16(%[[x]], %[[pos]]) : (f128, i1) -> f128 ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref end subroutine nearest_test4 - + ! CHECK-LABEL: nearest_test5 subroutine nearest_test5(x, s) real(kind=16) :: x, res @@ -64,7 +64,7 @@ real :: s ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f32 - ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] : f32 + ! CHECK: %[[cmp:.*]] = arith.cmpf ogt(%[[s]], %[[zero]]) : f32 ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 res = nearest(x, s) ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest16(%[[x]], %[[pos]]) : (f128, i1) -> f128 diff --git a/flang/test/Lower/Intrinsics/pack.f90 b/flang/test/Lower/Intrinsics/pack.f90 --- a/flang/test/Lower/Intrinsics/pack.f90 +++ b/flang/test/Lower/Intrinsics/pack.f90 @@ -21,7 +21,7 @@ ! CHECK: %[[a13:.*]] = fir.box_addr %[[a11]] : (!fir.box>>) -> !fir.heap> ! CHECK: fir.freemem %[[a13]] end subroutine - + ! CHECK-LABEL: func @_QPtest_pack_optional( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> subroutine test_pack_optional(vector, array, mask) @@ -33,7 +33,7 @@ ! CHECK: %[[VAL_10:.*]] = fir.box_addr %[[VAL_9]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_12:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_13:.*]] = arith.cmpi ne, %[[VAL_11]], %[[VAL_12]] : i64 + ! CHECK: %[[VAL_13:.*]] = arith.cmpi ne(%[[VAL_11]], %[[VAL_12]]) : i64 ! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_15:.*]] = fir.absent !fir.box>> ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_13]], %[[VAL_14]], %[[VAL_15]] : !fir.box>> diff --git a/flang/test/Lower/Intrinsics/product.f90 b/flang/test/Lower/Intrinsics/product.f90 --- a/flang/test/Lower/Intrinsics/product.f90 +++ b/flang/test/Lower/Intrinsics/product.f90 @@ -81,7 +81,7 @@ ! CHECK: %[[VAL_5:.*]] = fir.box_addr %[[VAL_4]] : (!fir.box>>>) -> !fir.ptr>> ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (!fir.ptr>>) -> i64 ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_8:.*]] = arith.cmpi ne, %[[VAL_6]], %[[VAL_7]] : i64 +! CHECK: %[[VAL_8:.*]] = arith.cmpi ne(%[[VAL_6]], %[[VAL_7]]) : i64 ! CHECK: %[[VAL_9:.*]] = fir.load %[[VAL_0]] : !fir.ref>>>> ! CHECK: %[[VAL_10:.*]] = fir.absent !fir.box>>> ! CHECK: %[[VAL_11:.*]] = arith.select %[[VAL_8]], %[[VAL_9]], %[[VAL_10]] : !fir.box>>> @@ -112,7 +112,7 @@ real :: x(:) logical :: use_mask logical, allocatable :: mask(:) -if (use_mask) then +if (use_mask) then allocate(mask(size(x, 1))) call set_mask(mask) ! CHECK: fir.call @_QPset_mask @@ -121,7 +121,7 @@ ! CHECK: %[[VAL_20:.*]] = fir.load %[[VAL_3:.*]] : !fir.ref>>> ! CHECK: %[[VAL_21:.*]] = fir.convert %[[VAL_20]] : (!fir.heap>>) -> i64 ! CHECK: %[[VAL_22:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_23:.*]] = arith.cmpi ne, %[[VAL_21]], %[[VAL_22]] : i64 +! CHECK: %[[VAL_23:.*]] = arith.cmpi ne(%[[VAL_21]], %[[VAL_22]]) : i64 ! CHECK: %[[VAL_24:.*]] = fir.load %[[VAL_4:.*]] : !fir.ref ! CHECK: %[[VAL_25:.*]] = fir.load %[[VAL_5:.*]] : !fir.ref ! CHECK: %[[VAL_26:.*]] = fir.load %[[VAL_3]] : !fir.ref>>> diff --git a/flang/test/Lower/Intrinsics/reshape.f90 b/flang/test/Lower/Intrinsics/reshape.f90 --- a/flang/test/Lower/Intrinsics/reshape.f90 +++ b/flang/test/Lower/Intrinsics/reshape.f90 @@ -24,21 +24,21 @@ ! CHECK-DAG: %[[a18:.*]] = fir.box_addr %[[a15]] : (!fir.box>>) -> !fir.heap> ! CHECK-DAG: fir.freemem %[[a18]] end subroutine - + ! CHECK-LABEL: func @_QPtest_reshape_optional( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>>> ! CHECK-SAME: %[[VAL_1:.*]]: !fir.ref>>> subroutine test_reshape_optional(pad, order, source, shape) - real, pointer :: pad(:, :) - integer, pointer :: order(:) + real, pointer :: pad(:, :) + integer, pointer :: order(:) real :: source(:, :, :) - integer :: shape(4) - print *, reshape(source=source, shape=shape, pad=pad, order=order) + integer :: shape(4) + print *, reshape(source=source, shape=shape, pad=pad, order=order) ! CHECK: %[[VAL_13:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_14:.*]] = fir.box_addr %[[VAL_13]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_16:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_17:.*]] = arith.cmpi ne, %[[VAL_15]], %[[VAL_16]] : i64 + ! CHECK: %[[VAL_17:.*]] = arith.cmpi ne(%[[VAL_15]], %[[VAL_16]]) : i64 ! CHECK: %[[VAL_18:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_19:.*]] = fir.absent !fir.box>> ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_17]], %[[VAL_18]], %[[VAL_19]] : !fir.box>> @@ -46,7 +46,7 @@ ! CHECK: %[[VAL_22:.*]] = fir.box_addr %[[VAL_21]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_23:.*]] = fir.convert %[[VAL_22]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_24:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_25:.*]] = arith.cmpi ne, %[[VAL_23]], %[[VAL_24]] : i64 + ! CHECK: %[[VAL_25:.*]] = arith.cmpi ne(%[[VAL_23]], %[[VAL_24]]) : i64 ! CHECK: %[[VAL_26:.*]] = fir.load %[[VAL_1]] : !fir.ref>>> ! CHECK: %[[VAL_27:.*]] = fir.absent !fir.box>> ! CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_25]], %[[VAL_26]], %[[VAL_27]] : !fir.box>> diff --git a/flang/test/Lower/Intrinsics/shifta.f90 b/flang/test/Lower/Intrinsics/shifta.f90 --- a/flang/test/Lower/Intrinsics/shifta.f90 +++ b/flang/test/Lower/Intrinsics/shifta.f90 @@ -14,8 +14,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i8 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i8 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i8 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i8 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i8 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i8 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrsi %[[A_VAL]], %[[B_CONV]] : i8 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i8 @@ -34,8 +34,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i16 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i16 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i16 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i16 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i16 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i16 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrsi %[[A_VAL]], %[[B_CONV]] : i16 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i16 @@ -53,8 +53,8 @@ c = shifta(a, b) ! CHECK: %[[C_BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_VAL]], %[[C_0]] : i32 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_VAL]], %[[C_BITS]] : i32 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_VAL]], %[[C_0]]) : i32 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_VAL]], %[[C_BITS]]) : i32 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrsi %[[A_VAL]], %[[B_VAL]] : i32 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i32 @@ -73,8 +73,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i64 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i64 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i64 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i64 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i64 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i64 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrsi %[[A_VAL]], %[[B_CONV]] : i64 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i64 @@ -93,8 +93,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i128 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i128 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i128 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i128 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i128 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i128 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrsi %[[A_VAL]], %[[B_CONV]] : i128 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i128 diff --git a/flang/test/Lower/Intrinsics/shiftl.f90 b/flang/test/Lower/Intrinsics/shiftl.f90 --- a/flang/test/Lower/Intrinsics/shiftl.f90 +++ b/flang/test/Lower/Intrinsics/shiftl.f90 @@ -14,8 +14,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i8 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i8 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i8 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i8 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i8 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i8 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[A_VAL]], %[[B_CONV]] : i8 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i8 @@ -34,8 +34,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i16 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i16 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i16 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i16 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i16 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i16 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[A_VAL]], %[[B_CONV]] : i16 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i16 @@ -53,8 +53,8 @@ c = shiftl(a, b) ! CHECK: %[[C_BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_VAL]], %[[C_0]] : i32 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_VAL]], %[[C_BITS]] : i32 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_VAL]], %[[C_0]]) : i32 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_VAL]], %[[C_BITS]]) : i32 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[A_VAL]], %[[B_VAL]] : i32 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i32 @@ -73,8 +73,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i64 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i64 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i64 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i64 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i64 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i64 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[A_VAL]], %[[B_CONV]] : i64 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i64 @@ -93,8 +93,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i128 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i128 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i128 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i128 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i128 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i128 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shli %[[A_VAL]], %[[B_CONV]] : i128 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i128 diff --git a/flang/test/Lower/Intrinsics/shiftr.f90 b/flang/test/Lower/Intrinsics/shiftr.f90 --- a/flang/test/Lower/Intrinsics/shiftr.f90 +++ b/flang/test/Lower/Intrinsics/shiftr.f90 @@ -14,8 +14,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 8 : i8 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i8 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i8 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i8 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i8 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i8 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i8 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[A_VAL]], %[[B_CONV]] : i8 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i8 @@ -34,8 +34,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 16 : i16 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i16 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i16 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i16 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i16 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i16 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i16 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[A_VAL]], %[[B_CONV]] : i16 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i16 @@ -53,8 +53,8 @@ c = shiftr(a, b) ! CHECK: %[[C_BITS:.*]] = arith.constant 32 : i32 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i32 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_VAL]], %[[C_0]] : i32 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_VAL]], %[[C_BITS]] : i32 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_VAL]], %[[C_0]]) : i32 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_VAL]], %[[C_BITS]]) : i32 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[A_VAL]], %[[B_VAL]] : i32 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i32 @@ -73,8 +73,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 64 : i64 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i64 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i64 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i64 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i64 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i64 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i64 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[A_VAL]], %[[B_CONV]] : i64 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i64 @@ -93,8 +93,8 @@ ! CHECK: %[[C_BITS:.*]] = arith.constant 128 : i128 ! CHECK: %[[C_0:.*]] = arith.constant 0 : i128 ! CHECK: %[[B_CONV:.*]] = fir.convert %[[B_VAL]] : (i32) -> i128 - ! CHECK: %[[UNDER:.*]] = arith.cmpi slt, %[[B_CONV]], %[[C_0]] : i128 - ! CHECK: %[[OVER:.*]] = arith.cmpi sge, %[[B_CONV]], %[[C_BITS]] : i128 + ! CHECK: %[[UNDER:.*]] = arith.cmpi slt(%[[B_CONV]], %[[C_0]]) : i128 + ! CHECK: %[[OVER:.*]] = arith.cmpi sge(%[[B_CONV]], %[[C_BITS]]) : i128 ! CHECK: %[[INVALID:.*]] = arith.ori %[[UNDER]], %[[OVER]] : i1 ! CHECK: %[[SHIFT:.*]] = arith.shrui %[[A_VAL]], %[[B_CONV]] : i128 ! CHECK: %[[RES:.*]] = arith.select %[[INVALID]], %[[C_0]], %[[SHIFT]] : i128 diff --git a/flang/test/Lower/Intrinsics/sign.f90 b/flang/test/Lower/Intrinsics/sign.f90 --- a/flang/test/Lower/Intrinsics/sign.f90 +++ b/flang/test/Lower/Intrinsics/sign.f90 @@ -7,7 +7,7 @@ ! CHECK: %[[VAL_2:.*]] = arith.xori %{{.*}}, %[[VAL_1]] : i32 ! CHECK: %[[VAL_3:.*]] = arith.subi %[[VAL_2]], %[[VAL_1]] : i32 ! CHECK-DAG: %[[VAL_4:.*]] = arith.subi %{{.*}}, %[[VAL_3]] : i32 - ! CHECK-DAG: %[[VAL_5:.*]] = arith.cmpi slt, %{{.*}}, %{{.*}} : i32 + ! CHECK-DAG: %[[VAL_5:.*]] = arith.cmpi slt(%{{.*}}, %{{.*}}) : i32 ! CHECK: select %[[VAL_5]], %[[VAL_4]], %[[VAL_3]] : i32 c = sign(a, b) end subroutine diff --git a/flang/test/Lower/Intrinsics/size.f90 b/flang/test/Lower/Intrinsics/size.f90 --- a/flang/test/Lower/Intrinsics/size.f90 +++ b/flang/test/Lower/Intrinsics/size.f90 @@ -30,7 +30,7 @@ ! CHECK: %[[VAL_11:.*]] = fir.embox %[[VAL_0]](%[[VAL_9]]) [%[[VAL_10]]] : (!fir.ref>, !fir.shapeshift<2>, !fir.slice<2>) -> !fir.box> ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_1]] : (!fir.ref) -> i64 ! CHECK: %[[c0_i64:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_13:.*]] = arith.cmpi eq, %[[VAL_12]], %[[c0_i64]] : i64 +! CHECK: %[[VAL_13:.*]] = arith.cmpi eq(%[[VAL_12]], %[[c0_i64]]) : i64 ! CHECK: %[[VAL_14:.*]] = fir.if %[[VAL_13]] -> (i64) { ! CHECK: %[[VAL_17:.*]] = fir.convert %[[VAL_11]] : (!fir.box>) -> !fir.box ! CHECK: %[[VAL_19:.*]] = fir.call @_FortranASize(%[[VAL_17]], %{{.*}}, %{{.*}}) : (!fir.box, !fir.ref, i32) -> i64 @@ -57,7 +57,7 @@ iSize = size(array, dim, 8) ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_1]] : (!fir.ref) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi eq, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi eq(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.if %[[VAL_5]] -> (i64) { ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_0]] : (!fir.box>) -> !fir.box ! CHECK: %[[VAL_11:.*]] = fir.call @_FortranASize(%[[VAL_9]], %{{.*}}, %{{.*}}) : (!fir.box, !fir.ref, i32) -> i64 @@ -84,7 +84,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.box_addr %[[VAL_3]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_7:.*]] = arith.cmpi eq, %[[VAL_5]], %[[VAL_6]] : i64 +! CHECK: %[[VAL_7:.*]] = arith.cmpi eq(%[[VAL_5]], %[[VAL_6]]) : i64 ! CHECK: %[[VAL_8:.*]] = fir.if %[[VAL_7]] -> (i64) { ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_0]] : (!fir.box>) -> !fir.box ! CHECK: %[[VAL_13:.*]] = fir.call @_FortranASize(%[[VAL_11]], %{{.*}}, %{{.*}}) : (!fir.box, !fir.ref, i32) -> i64 diff --git a/flang/test/Lower/Intrinsics/sum.f90 b/flang/test/Lower/Intrinsics/sum.f90 --- a/flang/test/Lower/Intrinsics/sum.f90 +++ b/flang/test/Lower/Intrinsics/sum.f90 @@ -81,7 +81,7 @@ ! CHECK: %[[VAL_5:.*]] = fir.box_addr %[[VAL_4]] : (!fir.box>>>) -> !fir.ptr>> ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (!fir.ptr>>) -> i64 ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_8:.*]] = arith.cmpi ne, %[[VAL_6]], %[[VAL_7]] : i64 +! CHECK: %[[VAL_8:.*]] = arith.cmpi ne(%[[VAL_6]], %[[VAL_7]]) : i64 ! CHECK: %[[VAL_9:.*]] = fir.load %[[VAL_0]] : !fir.ref>>>> ! CHECK: %[[VAL_10:.*]] = fir.absent !fir.box>>> ! CHECK: %[[VAL_11:.*]] = arith.select %[[VAL_8]], %[[VAL_9]], %[[VAL_10]] : !fir.box>>> @@ -112,7 +112,7 @@ integer :: x(:) logical :: use_mask logical, allocatable :: mask(:) -if (use_mask) then +if (use_mask) then allocate(mask(size(x, 1))) call set_mask(mask) ! CHECK: fir.call @_QPset_mask @@ -121,7 +121,7 @@ ! CHECK: %[[VAL_20:.*]] = fir.load %[[VAL_3:.*]] : !fir.ref>>> ! CHECK: %[[VAL_21:.*]] = fir.convert %[[VAL_20]] : (!fir.heap>>) -> i64 ! CHECK: %[[VAL_22:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_23:.*]] = arith.cmpi ne, %[[VAL_21]], %[[VAL_22]] : i64 +! CHECK: %[[VAL_23:.*]] = arith.cmpi ne(%[[VAL_21]], %[[VAL_22]]) : i64 ! CHECK: %[[VAL_24:.*]] = fir.load %[[VAL_4:.*]] : !fir.ref ! CHECK: %[[VAL_25:.*]] = fir.load %[[VAL_5:.*]] : !fir.ref ! CHECK: %[[VAL_26:.*]] = fir.load %[[VAL_3]] : !fir.ref>>> diff --git a/flang/test/Lower/Intrinsics/system_clock.f90 b/flang/test/Lower/Intrinsics/system_clock.f90 --- a/flang/test/Lower/Intrinsics/system_clock.f90 +++ b/flang/test/Lower/Intrinsics/system_clock.f90 @@ -53,13 +53,13 @@ ! CHECK: fir.store %[[V_29]] to %arg0 : !fir.ref ! CHECK: } ! CHECK: %[[V_12:[0-9]+]] = fir.convert %[[V_9]] : (!fir.ptr) -> i64 - ! CHECK: %[[V_13:[0-9]+]] = arith.cmpi ne, %[[V_12]], %c0{{.*}}_i64 : i64 + ! CHECK: %[[V_13:[0-9]+]] = arith.cmpi ne(%[[V_12]], %c0{{.*}}_i64) : i64 ! CHECK: fir.if %[[V_13]] { ! CHECK: %[[V_29]] = fir.call @_FortranASystemClockCountRate(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_29]] to %[[V_9]] : !fir.ptr ! CHECK: } ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_10]] : (!fir.heap) -> i64 - ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_14]], %c0{{.*}}_i64_0 : i64 + ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne(%[[V_14]], %c0{{.*}}_i64_0) : i64 ! CHECK: fir.if %[[V_15]] { ! CHECK: %[[V_29]] = fir.call @_FortranASystemClockCountMax(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_29]] to %[[V_10]] : !fir.heap @@ -80,13 +80,13 @@ ! CHECK: %[[V_29]] = fir.load %[[V_4]] : !fir.ref> ! CHECK: %[[V_30:[0-9]+]] = fir.load %[[V_1]] : !fir.ref> ! CHECK: %[[V_31]] = fir.convert %[[V_29]] : (!fir.ptr) -> i64 - ! CHECK: %[[V_32]] = arith.cmpi ne, %[[V_31]], %c0{{.*}}_i64_3 : i64 + ! CHECK: %[[V_32]] = arith.cmpi ne(%[[V_31]], %c0{{.*}}_i64_3) : i64 ! CHECK: fir.if %[[V_32]] { ! CHECK: %[[V_45:[0-9]+]] = fir.call @_FortranASystemClockCountRate(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_45]] to %[[V_29]] : !fir.ptr ! CHECK: } ! CHECK: %[[V_33]] = fir.convert %[[V_30]] : (!fir.heap) -> i64 - ! CHECK: %[[V_34]] = arith.cmpi ne, %[[V_33]], %c0{{.*}}_i64_4 : i64 + ! CHECK: %[[V_34]] = arith.cmpi ne(%[[V_33]], %c0{{.*}}_i64_4) : i64 ! CHECK: fir.if %[[V_34]] { ! CHECK: %[[V_45]] = fir.call @_FortranASystemClockCountMax(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_45]] to %[[V_30]] : !fir.heap @@ -120,13 +120,13 @@ ! CHECK: fir.store %[[V_29]] to %arg0 : !fir.ref ! CHECK: } ! CHECK: %[[V_24:[0-9]+]] = fir.convert %[[V_21]] : (!fir.ptr) -> i64 - ! CHECK: %[[V_25:[0-9]+]] = arith.cmpi ne, %[[V_24]], %c0{{.*}}_i64_1 : i64 + ! CHECK: %[[V_25:[0-9]+]] = arith.cmpi ne(%[[V_24]], %c0{{.*}}_i64_1) : i64 ! CHECK: fir.if %[[V_25]] { ! CHECK: %[[V_29]] = fir.call @_FortranASystemClockCountRate(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_29]] to %[[V_21]] : !fir.ptr ! CHECK: } ! CHECK: %[[V_26:[0-9]+]] = fir.convert %[[V_22]] : (!fir.heap) -> i64 - ! CHECK: %[[V_27:[0-9]+]] = arith.cmpi ne, %[[V_26]], %c0{{.*}}_i64_2 : i64 + ! CHECK: %[[V_27:[0-9]+]] = arith.cmpi ne(%[[V_26]], %c0{{.*}}_i64_2) : i64 ! CHECK: fir.if %[[V_27]] { ! CHECK: %[[V_29]] = fir.call @_FortranASystemClockCountMax(%c8{{.*}}_i32) : (i32) -> i64 ! CHECK: fir.store %[[V_29]] to %[[V_22]] : !fir.heap diff --git a/flang/test/Lower/OpenMP/atomic-update.f90 b/flang/test/Lower/OpenMP/atomic-update.f90 --- a/flang/test/Lower/OpenMP/atomic-update.f90 +++ b/flang/test/Lower/OpenMP/atomic-update.f90 @@ -37,7 +37,7 @@ !CHECK: omp.yield(%[[RESULT]] : i32) !CHECK: } !$omp atomic update - a = a + b + a = a + b !CHECK: omp.atomic.update %[[Y]] : !fir.ref { !CHECK: ^bb0(%[[ARG:.*]]: i32): @@ -51,10 +51,10 @@ !CHECK: %[[RESULT:.*]] = arith.muli %[[LOADED_X]], %[[ARG]] : i32 !CHECK: omp.yield(%[[RESULT]] : i32) !CHECK: } - !$omp atomic + !$omp atomic y = y + 1 !$omp atomic update - z = x * z + z = x * z !CHECK: omp.atomic.update memory_order(relaxed) hint(uncontended) %[[X]] : !fir.ref { !CHECK: ^bb0(%[[ARG:.*]]: i32): @@ -66,9 +66,9 @@ !CHECK: ^bb0(%[[ARG:.*]]: i32): !CHECK: %[[LOADED_X:.*]] = fir.load %[[X]] : !fir.ref !CHECK: %[[LOADED_Z:.*]] = fir.load %[[Z]] : !fir.ref -!CHECK: %{{.*}} = arith.cmpi sgt, %[[LOADED_X]], %[[ARG]] : i32 +!CHECK: %{{.*}} = arith.cmpi sgt(%[[LOADED_X]], %[[ARG]]) : i32 !CHECK: %{{.*}} = arith.select %{{.*}}, %[[LOADED_X]], %[[ARG]] : i32 -!CHECK: %{{.*}} = arith.cmpi sgt, %{{.*}}, %[[LOADED_Z]] : i32 +!CHECK: %{{.*}} = arith.cmpi sgt(%{{.*}}, %[[LOADED_Z]]) : i32 !CHECK: %[[RESULT:.*]] = arith.select %{{.*}}, %{{.*}}, %[[LOADED_Z]] : i32 !CHECK: omp.yield(%[[RESULT]] : i32) !CHECK: } @@ -80,7 +80,7 @@ !CHECK: } !$omp atomic relaxed update hint(omp_sync_hint_uncontended) x = x - 1 - !$omp atomic update relaxed + !$omp atomic update relaxed y = max(x, y, z) !$omp atomic relaxed hint(omp_sync_hint_contended) z = z + x diff --git a/flang/test/Lower/OpenMP/master.f90 b/flang/test/Lower/OpenMP/master.f90 --- a/flang/test/Lower/OpenMP/master.f90 +++ b/flang/test/Lower/OpenMP/master.f90 @@ -74,7 +74,7 @@ !FIRDialect: %{{.*}} = fir.load %{{.*}} !FIRDialect: %{{.*}} = fir.load %{{.*}} - !FIRDialect: %[[RESULT:.*]] = arith.cmpi sge, %{{.*}}, %{{.*}} + !FIRDialect: %[[RESULT:.*]] = arith.cmpi sge(%{{.*}}, %{{.*}}) !FIRDialect: fir.if %[[RESULT]] { if (alpha .ge. gama) then diff --git a/flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90 b/flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90 --- a/flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90 +++ b/flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90 @@ -8,22 +8,22 @@ !CHECK-DAG: %[[FIVE:.*]] = arith.constant 5 : index !CHECK: omp.parallel { -!CHECK-DAG: %[[ARG1_PVT:.*]] = fir.alloca !fir.char<1,5> {bindc_name = "arg1", +!CHECK-DAG: %[[ARG1_PVT:.*]] = fir.alloca !fir.char<1,5> {bindc_name = "arg1", ! Check that we are accessing the clone inside the loop !CHECK-DAG: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { !CHECK-DAG: %[[NEG_ONE:.*]] = arith.constant -1 : i32 !CHECK-NEXT: %[[ADDR:.*]] = fir.address_of(@_QQcl. -!CHECK-NEXT: %[[CVT0:.*]] = fir.convert %[[ADDR]] +!CHECK-NEXT: %[[CVT0:.*]] = fir.convert %[[ADDR]] !CHECK-NEXT: %[[CNST:.*]] = arith.constant !CHECK-NEXT: %[[CALL_BEGIN_IO:.*]] = fir.call @_FortranAioBeginExternalListOutput(%[[NEG_ONE]], %[[CVT0]], %[[CNST]]) : (i32, !fir.ref, i32) -> !fir.ref -!CHECK-NEXT: %[[CVT_0_1:.*]] = fir.convert %[[ARG1_PVT]] +!CHECK-NEXT: %[[CVT_0_1:.*]] = fir.convert %[[ARG1_PVT]] !CHECK-NEXT: %[[CVT_0_2:.*]] = fir.convert %[[FIVE]] !CHECK-NEXT: %[[CALL_OP_ASCII:.*]] = fir.call @_FortranAioOutputAscii(%[[CALL_BEGIN_IO]], %[[CVT_0_1]], %[[CVT_0_2]]) !CHECK-NEXT: %[[CALL_END_IO:.*]] = fir.call @_FortranAioEndIoStatement(%[[CALL_BEGIN_IO]]) ! Testing last iteration check -!CHECK-NEXT: %[[IV_CMP:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK-NEXT: %[[IV_CMP:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK: scf.if %[[IV_CMP]] { ! Testing lastprivate val update @@ -39,12 +39,12 @@ !CHECK-DAG: %[[COORD:.*]] = fir.coordinate_of %[[CVT_2]], %[[ARG2]] : (!fir.ref>>, index) -> !fir.ref> !CHECK-DAG: fir.store %[[INSERT]] to %[[COORD]] : !fir.ref> !CHECK-DAG: } -!CHECK-DAG: } +!CHECK-DAG: } !CHECK-DAG: omp.yield subroutine lastprivate_character(arg1) character(5) :: arg1 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO LASTPRIVATE(arg1) do n = 1, 5 arg1(n:n) = 'c' @@ -60,7 +60,7 @@ !CHECK: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { ! Testing last iteration check -!CHECK-DAG: %[[IV_CMP:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK-DAG: %[[IV_CMP:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK-DAG: scf.if %[[IV_CMP]] { ! Testing lastprivate val update @@ -71,7 +71,7 @@ subroutine lastprivate_int(arg1) integer :: arg1 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO LASTPRIVATE(arg1) do n = 1, 5 arg1 = 2 @@ -89,7 +89,7 @@ !CHECK: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { ! Testing last iteration check -!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK-NEXT: scf.if %[[IV_CMP1]] { ! Testing lastprivate val update !CHECK-DAG: %[[CLONE_LD1:.*]] = fir.load %[[CLONE1]] : !fir.ref @@ -101,7 +101,7 @@ subroutine mult_lastprivate_int(arg1, arg2) integer :: arg1, arg2 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO LASTPRIVATE(arg1) LASTPRIVATE(arg2) do n = 1, 5 arg1 = 2 @@ -120,7 +120,7 @@ !CHECK: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { !Testing last iteration check -!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK-NEXT: scf.if %[[IV_CMP1]] { !Testing lastprivate val update !CHECK-DAG: %[[CLONE_LD2:.*]] = fir.load %[[CLONE2]] : !fir.ref @@ -132,7 +132,7 @@ subroutine mult_lastprivate_int2(arg1, arg2) integer :: arg1, arg2 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO LASTPRIVATE(arg1, arg2) do n = 1, 5 arg1 = 2 @@ -156,7 +156,7 @@ !CHECK: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { ! Testing last iteration check -!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK-NEXT: scf.if %[[IV_CMP1]] { ! Testing lastprivate val update !CHECK-NEXT: %[[CLONE_LD:.*]] = fir.load %[[CLONE2]] : !fir.ref @@ -166,7 +166,7 @@ subroutine firstpriv_lastpriv_int(arg1, arg2) integer :: arg1, arg2 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO FIRSTPRIVATE(arg1) LASTPRIVATE(arg2) do n = 1, 5 arg1 = 2 @@ -187,7 +187,7 @@ !CHECK-NEXT: omp.barrier !CHECK: omp.wsloop for (%[[INDX_WS:.*]]) : {{.*}} { ! Testing last iteration check -!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq, %[[INDX_WS]] +!CHECK: %[[IV_CMP1:.*]] = arith.cmpi eq(%[[INDX_WS]] !CHECK-NEXT: scf.if %[[IV_CMP1]] { ! Testing lastprivate val update !CHECK-NEXT: %[[CLONE_LD:.*]] = fir.load %[[CLONE1]] : !fir.ref @@ -197,7 +197,7 @@ subroutine firstpriv_lastpriv_int2(arg1) integer :: arg1 -!$OMP PARALLEL +!$OMP PARALLEL !$OMP DO FIRSTPRIVATE(arg1) LASTPRIVATE(arg1) do n = 1, 5 arg1 = 2 diff --git a/flang/test/Lower/OpenMP/omp-unstructured.f90 b/flang/test/Lower/OpenMP/omp-unstructured.f90 --- a/flang/test/Lower/OpenMP/omp-unstructured.f90 +++ b/flang/test/Lower/OpenMP/omp-unstructured.f90 @@ -119,7 +119,7 @@ ! CHECK: %[[ALLOCA:.*]] = fir.alloca i32 {{{.*}}, pinned} ! CHECK: omp.wsloop for (%[[ARG:.*]]) : {{.*}} { ! CHECK: fir.store %[[ARG]] to %[[ALLOCA]] : !fir.ref -! CHECK: %[[COND:.*]] = arith.cmpi eq, %{{.*}}, %{{.*}} +! CHECK: %[[COND:.*]] = arith.cmpi eq(%{{.*}}, %{{.*}}) ! CHECK: %[[COND_XOR:.*]] = arith.xori %[[COND]], %{{.*}} ! CHECK: fir.if %[[COND_XOR]] { ! CHECK: @_FortranAioBeginExternalListOutput diff --git a/flang/test/Lower/allocatable-assignment.f90 b/flang/test/Lower/allocatable-assignment.f90 --- a/flang/test/Lower/allocatable-assignment.f90 +++ b/flang/test/Lower/allocatable-assignment.f90 @@ -20,7 +20,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.box_addr %[[VAL_2]] : (!fir.box>) -> !fir.heap ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.heap) -> i64 ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_6:.*]] = arith.cmpi ne, %[[VAL_4]], %[[VAL_5]] : i64 +! CHECK: %[[VAL_6:.*]] = arith.cmpi ne(%[[VAL_4]], %[[VAL_5]]) : i64 ! CHECK: %[[VAL_7:.*]]:2 = fir.if %[[VAL_6]] -> (i1, !fir.heap) { ! CHECK: %[[VAL_8:.*]] = arith.constant false ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_8]] -> (!fir.heap) { @@ -56,7 +56,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref> ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (!fir.heap) -> i64 ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_7:.*]] = arith.cmpi ne, %[[VAL_5]], %[[VAL_6]] : i64 +! CHECK: %[[VAL_7:.*]] = arith.cmpi ne(%[[VAL_5]], %[[VAL_6]]) : i64 ! CHECK: %[[VAL_8:.*]]:2 = fir.if %[[VAL_7]] -> (i1, !fir.heap) { ! CHECK: %[[VAL_9:.*]] = arith.constant false ! CHECK: %[[VAL_10:.*]] = fir.if %[[VAL_9]] -> (!fir.heap) { @@ -95,11 +95,11 @@ ! CHECK: %[[VAL_4:.*]] = fir.box_addr %[[VAL_3]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_7:.*]] = arith.cmpi ne, %[[VAL_5]], %[[VAL_6]] : i64 +! CHECK: %[[VAL_7:.*]] = arith.cmpi ne(%[[VAL_5]], %[[VAL_6]]) : i64 ! CHECK: %[[VAL_8:.*]]:2 = fir.if %[[VAL_7]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_9:.*]] = arith.constant false ! CHECK: %[[VAL_10:.*]] = fir.box_elesize %[[VAL_3]] : (!fir.box>>) -> index -! CHECK: %[[VAL_11:.*]] = arith.cmpi ne, %[[VAL_10]], %[[VAL_2]] : index +! CHECK: %[[VAL_11:.*]] = arith.cmpi ne(%[[VAL_10]], %[[VAL_2]]) : index ! CHECK: %[[VAL_12:.*]] = arith.select %[[VAL_11]], %[[VAL_11]], %[[VAL_9]] : i1 ! CHECK: %[[VAL_13:.*]] = fir.if %[[VAL_12]] -> (!fir.heap>) { ! CHECK: %[[VAL_14:.*]] = fir.allocmem !fir.char<1,?>(%[[VAL_2]] : index) {uniq_name = ".auto.alloc"} @@ -140,7 +140,7 @@ ! CHECK: %[[VAL_5:.*]] = fir.box_addr %[[VAL_4]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_8:.*]] = arith.cmpi ne, %[[VAL_6]], %[[VAL_7]] : i64 +! CHECK: %[[VAL_8:.*]] = arith.cmpi ne(%[[VAL_6]], %[[VAL_7]]) : i64 ! CHECK: %[[VAL_9:.*]]:2 = fir.if %[[VAL_8]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_10:.*]] = arith.constant false ! CHECK: %[[VAL_11:.*]] = fir.if %[[VAL_10]] -> (!fir.heap>) { @@ -179,7 +179,7 @@ character(n), allocatable :: x ! CHECK: %[[VAL_2A:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_2B:.*]] = arith.cmpi sgt, %[[VAL_2A]], %[[c0_i32]] : i32 +! CHECK: %[[VAL_2B:.*]] = arith.cmpi sgt(%[[VAL_2A]], %[[c0_i32]]) : i32 ! CHECK: %[[VAL_2:.*]] = arith.select %[[VAL_2B]], %[[VAL_2A]], %[[c0_i32]] : i32 ! CHECK: %[[VAL_3:.*]] = fir.address_of(@_QQcl.48656C6C6F20776F726C6421) : !fir.ref> ! CHECK: %[[VAL_4:.*]] = arith.constant 12 : index @@ -187,7 +187,7 @@ ! CHECK: %[[VAL_6:.*]] = fir.box_addr %[[VAL_5]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_7:.*]] = fir.convert %[[VAL_6]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_8:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_9:.*]] = arith.cmpi ne, %[[VAL_7]], %[[VAL_8]] : i64 +! CHECK: %[[VAL_9:.*]] = arith.cmpi ne(%[[VAL_7]], %[[VAL_8]]) : i64 ! CHECK: %[[VAL_10:.*]]:2 = fir.if %[[VAL_9]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_11:.*]] = arith.constant false ! CHECK: %[[VAL_12:.*]] = fir.if %[[VAL_11]] -> (!fir.heap>) { @@ -232,7 +232,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.box_addr %[[VAL_2]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_6:.*]] = arith.cmpi ne, %[[VAL_4]], %[[VAL_5]] : i64 +! CHECK: %[[VAL_6:.*]] = arith.cmpi ne(%[[VAL_4]], %[[VAL_5]]) : i64 ! CHECK: %[[VAL_7:.*]]:2 = fir.if %[[VAL_6]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_8:.*]] = arith.constant false ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_8]] -> (!fir.heap>) { @@ -282,16 +282,16 @@ ! CHECK: %[[VAL_9:.*]] = fir.box_addr %[[VAL_8]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_9]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_11:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_12:.*]] = arith.cmpi ne, %[[VAL_10]], %[[VAL_11]] : i64 +! CHECK: %[[VAL_12:.*]] = arith.cmpi ne(%[[VAL_10]], %[[VAL_11]]) : i64 ! CHECK: %[[VAL_13:.*]]:2 = fir.if %[[VAL_12]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_14:.*]] = arith.constant false ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_16:.*]]:3 = fir.box_dims %[[VAL_8]], %[[VAL_15]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_17:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_18:.*]]:3 = fir.box_dims %[[VAL_8]], %[[VAL_17]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_19:.*]] = arith.cmpi ne, %[[VAL_16]]#1, %[[VAL_4]] : index +! CHECK: %[[VAL_19:.*]] = arith.cmpi ne(%[[VAL_16]]#1, %[[VAL_4]]) : index ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_19]], %[[VAL_19]], %[[VAL_14]] : i1 -! CHECK: %[[VAL_21:.*]] = arith.cmpi ne, %[[VAL_18]]#1, %[[VAL_5]] : index +! CHECK: %[[VAL_21:.*]] = arith.cmpi ne(%[[VAL_18]]#1, %[[VAL_5]]) : index ! CHECK: %[[VAL_22:.*]] = arith.select %[[VAL_21]], %[[VAL_21]], %[[VAL_20]] : i1 ! CHECK: %[[VAL_23:.*]] = fir.if %[[VAL_22]] -> (!fir.heap>) { ! CHECK: %[[VAL_24:.*]] = fir.allocmem !fir.array, %[[VAL_4]], %[[VAL_5]] {uniq_name = ".auto.alloc"} @@ -379,16 +379,16 @@ ! CHECK: %[[VAL_8:.*]] = fir.box_addr %[[VAL_7]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_10:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_11:.*]] = arith.cmpi ne, %[[VAL_9]], %[[VAL_10]] : i64 +! CHECK: %[[VAL_11:.*]] = arith.cmpi ne(%[[VAL_9]], %[[VAL_10]]) : i64 ! CHECK: %[[VAL_12:.*]]:2 = fir.if %[[VAL_11]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_13:.*]] = arith.constant false ! CHECK: %[[VAL_14:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_15:.*]]:3 = fir.box_dims %[[VAL_7]], %[[VAL_14]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_16:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_17:.*]]:3 = fir.box_dims %[[VAL_7]], %[[VAL_16]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_18:.*]] = arith.cmpi ne, %[[VAL_15]]#1, %[[VAL_3]]#1 : index +! CHECK: %[[VAL_18:.*]] = arith.cmpi ne(%[[VAL_15]]#1, %[[VAL_3]]#1) : index ! CHECK: %[[VAL_19:.*]] = arith.select %[[VAL_18]], %[[VAL_18]], %[[VAL_13]] : i1 -! CHECK: %[[VAL_20:.*]] = arith.cmpi ne, %[[VAL_17]]#1, %[[VAL_5]]#1 : index +! CHECK: %[[VAL_20:.*]] = arith.cmpi ne(%[[VAL_17]]#1, %[[VAL_5]]#1) : index ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_20]], %[[VAL_19]] : i1 ! CHECK: %[[VAL_22:.*]] = fir.if %[[VAL_21]] -> (!fir.heap>) { ! CHECK: %[[VAL_23:.*]] = fir.allocmem !fir.array, %[[VAL_3]]#1, %[[VAL_5]]#1 {uniq_name = ".auto.alloc"} @@ -479,16 +479,16 @@ ! CHECK: %[[VAL_13:.*]] = fir.box_addr %[[VAL_12]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_13]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_16:.*]] = arith.cmpi ne, %[[VAL_14]], %[[VAL_15]] : i64 +! CHECK: %[[VAL_16:.*]] = arith.cmpi ne(%[[VAL_14]], %[[VAL_15]]) : i64 ! CHECK: %[[VAL_17:.*]]:2 = fir.if %[[VAL_16]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_18:.*]] = arith.constant false ! CHECK: %[[VAL_19:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_20:.*]]:3 = fir.box_dims %[[VAL_12]], %[[VAL_19]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_21:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_22:.*]]:3 = fir.box_dims %[[VAL_12]], %[[VAL_21]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_23:.*]] = arith.cmpi ne, %[[VAL_20]]#1, %[[VAL_8]]#1 : index +! CHECK: %[[VAL_23:.*]] = arith.cmpi ne(%[[VAL_20]]#1, %[[VAL_8]]#1) : index ! CHECK: %[[VAL_24:.*]] = arith.select %[[VAL_23]], %[[VAL_23]], %[[VAL_18]] : i1 -! CHECK: %[[VAL_25:.*]] = arith.cmpi ne, %[[VAL_22]]#1, %[[VAL_10]]#1 : index +! CHECK: %[[VAL_25:.*]] = arith.cmpi ne(%[[VAL_22]]#1, %[[VAL_10]]#1) : index ! CHECK: %[[VAL_26:.*]] = arith.select %[[VAL_25]], %[[VAL_25]], %[[VAL_24]] : i1 ! CHECK: %[[VAL_27:.*]] = fir.if %[[VAL_26]] -> (!fir.heap>) { ! CHECK: %[[VAL_28:.*]] = fir.allocmem !fir.array, %[[VAL_8]]#1, %[[VAL_10]]#1 {uniq_name = ".auto.alloc"} @@ -587,16 +587,16 @@ ! CHECK: %[[VAL_15:.*]] = fir.box_addr %[[VAL_14]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_16:.*]] = fir.convert %[[VAL_15]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_17:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_18:.*]] = arith.cmpi ne, %[[VAL_16]], %[[VAL_17]] : i64 +! CHECK: %[[VAL_18:.*]] = arith.cmpi ne(%[[VAL_16]], %[[VAL_17]]) : i64 ! CHECK: %[[VAL_19:.*]]:2 = fir.if %[[VAL_18]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_20:.*]] = arith.constant false ! CHECK: %[[VAL_21:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_22:.*]]:3 = fir.box_dims %[[VAL_14]], %[[VAL_21]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_23:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_24:.*]]:3 = fir.box_dims %[[VAL_14]], %[[VAL_23]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_25:.*]] = arith.cmpi ne, %[[VAL_22]]#1, %[[VAL_10]]#1 : index +! CHECK: %[[VAL_25:.*]] = arith.cmpi ne(%[[VAL_22]]#1, %[[VAL_10]]#1) : index ! CHECK: %[[VAL_26:.*]] = arith.select %[[VAL_25]], %[[VAL_25]], %[[VAL_20]] : i1 -! CHECK: %[[VAL_27:.*]] = arith.cmpi ne, %[[VAL_24]]#1, %[[VAL_12]]#1 : index +! CHECK: %[[VAL_27:.*]] = arith.cmpi ne(%[[VAL_24]]#1, %[[VAL_12]]#1) : index ! CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_27]], %[[VAL_26]] : i1 ! CHECK: %[[VAL_29:.*]] = fir.if %[[VAL_28]] -> (!fir.heap>) { ! CHECK: %[[VAL_30:.*]] = fir.allocmem !fir.array, %[[VAL_10]]#1, %[[VAL_12]]#1 {uniq_name = ".auto.alloc"} @@ -746,12 +746,12 @@ ! CHECK: %[[VAL_10:.*]] = fir.box_addr %[[VAL_9]] : (!fir.box>>>) -> !fir.heap>> ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (!fir.heap>>) -> i64 ! CHECK: %[[VAL_12:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_13:.*]] = arith.cmpi ne, %[[VAL_11]], %[[VAL_12]] : i64 +! CHECK: %[[VAL_13:.*]] = arith.cmpi ne(%[[VAL_11]], %[[VAL_12]]) : i64 ! CHECK: %[[VAL_14:.*]]:2 = fir.if %[[VAL_13]] -> (i1, !fir.heap>>) { ! CHECK: %[[VAL_15:.*]] = arith.constant false ! CHECK: %[[VAL_16:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_17:.*]]:3 = fir.box_dims %[[VAL_9]], %[[VAL_16]] : (!fir.box>>>, index) -> (index, index, index) -! CHECK: %[[VAL_18:.*]] = arith.cmpi ne, %[[VAL_17]]#1, %[[VAL_6]] : index +! CHECK: %[[VAL_18:.*]] = arith.cmpi ne(%[[VAL_17]]#1, %[[VAL_6]]) : index ! CHECK: %[[VAL_19:.*]] = arith.select %[[VAL_18]], %[[VAL_18]], %[[VAL_15]] : i1 ! CHECK: %[[VAL_20:.*]] = fir.if %[[VAL_19]] -> (!fir.heap>>) { ! CHECK: %[[VAL_21:.*]] = fir.allocmem !fir.array>, %[[VAL_6]] {uniq_name = ".auto.alloc"} @@ -764,7 +764,7 @@ ! CHECK: %[[VAL_30:.*]] = fir.array_access %[[VAL_8]], %[[VAL_28]] : (!fir.array<20x!fir.char<1,12>>, index) -> !fir.ref> ! CHECK: %[[VAL_31:.*]] = fir.array_access %[[VAL_29]], %[[VAL_28]] : (!fir.array>, index) -> !fir.ref> ! CHECK: %[[VAL_32:.*]] = arith.constant 10 : index -! CHECK: %[[VAL_33:.*]] = arith.cmpi slt, %[[VAL_32]], %[[VAL_3]] : index +! CHECK: %[[VAL_33:.*]] = arith.cmpi slt(%[[VAL_32]], %[[VAL_3]]) : index ! CHECK: %[[VAL_34:.*]] = arith.select %[[VAL_33]], %[[VAL_32]], %[[VAL_3]] : index ! CHECK: %[[VAL_35:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_36:.*]] = fir.convert %[[VAL_34]] : (index) -> i64 @@ -799,7 +799,7 @@ ! CHECK: %[[VAL_60:.*]] = fir.array_access %[[VAL_8]], %[[VAL_58]] : (!fir.array<20x!fir.char<1,12>>, index) -> !fir.ref> ! CHECK: %[[VAL_61:.*]] = fir.array_access %[[VAL_59]], %[[VAL_58]] : (!fir.array>, index) -> !fir.ref> ! CHECK: %[[VAL_62:.*]] = arith.constant 10 : index -! CHECK: %[[VAL_63:.*]] = arith.cmpi slt, %[[VAL_62]], %[[VAL_3]] : index +! CHECK: %[[VAL_63:.*]] = arith.cmpi slt(%[[VAL_62]], %[[VAL_3]]) : index ! CHECK: %[[VAL_64:.*]] = arith.select %[[VAL_63]], %[[VAL_62]], %[[VAL_3]] : index ! CHECK: %[[VAL_65:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_66:.*]] = fir.convert %[[VAL_64]] : (index) -> i64 @@ -838,7 +838,7 @@ ! CHECK: %[[VAL_93:.*]] = fir.array_access %[[VAL_8]], %[[VAL_91]] : (!fir.array<20x!fir.char<1,12>>, index) -> !fir.ref> ! CHECK: %[[VAL_94:.*]] = fir.array_access %[[VAL_92]], %[[VAL_91]] : (!fir.array>, index) -> !fir.ref> ! CHECK: %[[VAL_95:.*]] = arith.constant 10 : index -! CHECK: %[[VAL_96:.*]] = arith.cmpi slt, %[[VAL_95]], %[[VAL_3]] : index +! CHECK: %[[VAL_96:.*]] = arith.cmpi slt(%[[VAL_95]], %[[VAL_3]]) : index ! CHECK: %[[VAL_97:.*]] = arith.select %[[VAL_96]], %[[VAL_95]], %[[VAL_3]] : index ! CHECK: %[[VAL_98:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_99:.*]] = fir.convert %[[VAL_97]] : (index) -> i64 @@ -888,7 +888,7 @@ ! CHECK: %[[VAL_5:.*]] = arith.constant 20 : index ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt, %[[VAL_6]], %[[VAL_7]] : i32 +! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt(%[[VAL_6]], %[[VAL_7]]) : i32 ! CHECK: %[[VAL_9:.*]] = arith.select %[[VAL_8]], %[[VAL_6]], %[[VAL_7]] : i32 ! CHECK: %[[VAL_10:.*]] = arith.constant 20 : index ! CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_5]] : (index) -> !fir.shape<1> @@ -897,12 +897,12 @@ ! CHECK: %[[VAL_14:.*]] = fir.box_addr %[[VAL_13]] : (!fir.box>>>) -> !fir.heap>> ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (!fir.heap>>) -> i64 ! CHECK: %[[VAL_16:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_17:.*]] = arith.cmpi ne, %[[VAL_15]], %[[VAL_16]] : i64 +! CHECK: %[[VAL_17:.*]] = arith.cmpi ne(%[[VAL_15]], %[[VAL_16]]) : i64 ! CHECK: %[[VAL_18:.*]]:2 = fir.if %[[VAL_17]] -> (i1, !fir.heap>>) { ! CHECK: %[[VAL_19:.*]] = arith.constant false ! CHECK: %[[VAL_20:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_21:.*]]:3 = fir.box_dims %[[VAL_13]], %[[VAL_20]] : (!fir.box>>>, index) -> (index, index, index) -! CHECK: %[[VAL_22:.*]] = arith.cmpi ne, %[[VAL_21]]#1, %[[VAL_10]] : index +! CHECK: %[[VAL_22:.*]] = arith.cmpi ne(%[[VAL_21]]#1, %[[VAL_10]]) : index ! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_22]], %[[VAL_22]], %[[VAL_19]] : i1 ! CHECK: %[[VAL_24:.*]] = fir.if %[[VAL_23]] -> (!fir.heap>>) { ! CHECK: %[[VAL_25:.*]] = fir.convert %[[VAL_9]] : (i32) -> index @@ -916,7 +916,7 @@ ! CHECK: %[[VAL_35:.*]] = fir.array_access %[[VAL_12]], %[[VAL_33]] typeparams %[[VAL_3]]#1 : (!fir.array<20x!fir.char<1,?>>, index, index) -> !fir.ref> ! CHECK: %[[VAL_36:.*]] = fir.array_access %[[VAL_34]], %[[VAL_33]] typeparams %[[VAL_9]] : (!fir.array>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_37:.*]] = fir.convert %[[VAL_9]] : (i32) -> index -! CHECK: %[[VAL_38:.*]] = arith.cmpi slt, %[[VAL_37]], %[[VAL_3]]#1 : index +! CHECK: %[[VAL_38:.*]] = arith.cmpi slt(%[[VAL_37]], %[[VAL_3]]#1) : index ! CHECK: %[[VAL_39:.*]] = arith.select %[[VAL_38]], %[[VAL_37]], %[[VAL_3]]#1 : index ! CHECK: %[[VAL_40:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_41:.*]] = fir.convert %[[VAL_39]] : (index) -> i64 @@ -952,7 +952,7 @@ ! CHECK: %[[VAL_66:.*]] = fir.array_access %[[VAL_12]], %[[VAL_64]] typeparams %[[VAL_3]]#1 : (!fir.array<20x!fir.char<1,?>>, index, index) -> !fir.ref> ! CHECK: %[[VAL_67:.*]] = fir.array_access %[[VAL_65]], %[[VAL_64]] typeparams %[[VAL_9]] : (!fir.array>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_68:.*]] = fir.convert %[[VAL_9]] : (i32) -> index -! CHECK: %[[VAL_69:.*]] = arith.cmpi slt, %[[VAL_68]], %[[VAL_3]]#1 : index +! CHECK: %[[VAL_69:.*]] = arith.cmpi slt(%[[VAL_68]], %[[VAL_3]]#1) : index ! CHECK: %[[VAL_70:.*]] = arith.select %[[VAL_69]], %[[VAL_68]], %[[VAL_3]]#1 : index ! CHECK: %[[VAL_71:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_72:.*]] = fir.convert %[[VAL_70]] : (index) -> i64 @@ -993,7 +993,7 @@ ! CHECK: %[[VAL_101:.*]] = fir.array_access %[[VAL_12]], %[[VAL_99]] typeparams %[[VAL_3]]#1 : (!fir.array<20x!fir.char<1,?>>, index, index) -> !fir.ref> ! CHECK: %[[VAL_102:.*]] = fir.array_access %[[VAL_100]], %[[VAL_99]] typeparams %[[VAL_9]] : (!fir.array>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_103:.*]] = fir.convert %[[VAL_9]] : (i32) -> index -! CHECK: %[[VAL_104:.*]] = arith.cmpi slt, %[[VAL_103]], %[[VAL_3]]#1 : index +! CHECK: %[[VAL_104:.*]] = arith.cmpi slt(%[[VAL_103]], %[[VAL_3]]#1) : index ! CHECK: %[[VAL_105:.*]] = arith.select %[[VAL_104]], %[[VAL_103]], %[[VAL_3]]#1 : index ! CHECK: %[[VAL_106:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_107:.*]] = fir.convert %[[VAL_105]] : (index) -> i64 @@ -1036,14 +1036,14 @@ ! CHECK-LABEL: func @_QMalloc_assignPtest_derived_with_init subroutine test_derived_with_init(x, y) - type t + type t integer, allocatable :: a(:) - end type - type(t), allocatable :: x - type(t) :: y + end type + type(t), allocatable :: x + type(t) :: y ! The allocatable component of `x` need to be initialized ! during the automatic allocation (setting its rank and allocation - ! status) before it is assigned with the component of `y` + ! status) before it is assigned with the component of `y` x = y ! CHECK: fir.if %{{.*}} { ! CHECK: %[[VAL_11:.*]] = fir.allocmem !fir.type<_QMalloc_assignFtest_derived_with_initTt{a:!fir.box>>}> {uniq_name = ".auto.alloc"} @@ -1073,19 +1073,19 @@ ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_7:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_6]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[VAL_8:.*]] = fir.array_load %[[VAL_2]] : (!fir.box>) -> !fir.array -! CHECK: %[[VAL_9:.*]] = arith.cmpi sgt, %[[VAL_7]]#1, %[[VAL_5]]#1 : index +! CHECK: %[[VAL_9:.*]] = arith.cmpi sgt(%[[VAL_7]]#1, %[[VAL_5]]#1) : index ! CHECK: %[[VAL_10:.*]] = arith.select %[[VAL_9]], %[[VAL_5]]#1, %[[VAL_7]]#1 : index ! CHECK: %[[VAL_11:.*]] = fir.array_load %[[VAL_1]] : (!fir.box>) -> !fir.array ! CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_13:.*]] = fir.box_addr %[[VAL_12]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_13]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_16:.*]] = arith.cmpi ne, %[[VAL_14]], %[[VAL_15]] : i64 +! CHECK: %[[VAL_16:.*]] = arith.cmpi ne(%[[VAL_14]], %[[VAL_15]]) : i64 ! CHECK: %[[VAL_17:.*]]:2 = fir.if %[[VAL_16]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_18:.*]] = arith.constant false ! CHECK: %[[VAL_19:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_20:.*]]:3 = fir.box_dims %[[VAL_12]], %[[VAL_19]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_21:.*]] = arith.cmpi ne, %[[VAL_20]]#1, %[[VAL_10]] : index +! CHECK: %[[VAL_21:.*]] = arith.cmpi ne(%[[VAL_20]]#1, %[[VAL_10]]) : index ! CHECK: %[[VAL_22:.*]] = arith.select %[[VAL_21]], %[[VAL_21]], %[[VAL_18]] : i1 ! CHECK: %[[VAL_23:.*]] = fir.if %[[VAL_22]] -> (!fir.heap>) { ! CHECK: %[[VAL_24:.*]] = fir.allocmem !fir.array, %[[VAL_10]] {uniq_name = ".auto.alloc"} @@ -1172,12 +1172,12 @@ ! CHECK: %[[VAL_7:.*]] = fir.box_addr %[[VAL_6]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_8:.*]] = fir.convert %[[VAL_7]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_9:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_10:.*]] = arith.cmpi ne, %[[VAL_8]], %[[VAL_9]] : i64 +! CHECK: %[[VAL_10:.*]] = arith.cmpi ne(%[[VAL_8]], %[[VAL_9]]) : i64 ! CHECK: %[[VAL_11:.*]]:2 = fir.if %[[VAL_10]] -> (i1, !fir.heap>) { ! CHECK: %[[VAL_12:.*]] = arith.constant false ! CHECK: %[[VAL_13:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_14:.*]]:3 = fir.box_dims %[[VAL_6]], %[[VAL_13]] : (!fir.box>>, index) -> (index, index, index) -! CHECK: %[[VAL_15:.*]] = arith.cmpi ne, %[[VAL_14]]#1, %[[VAL_3]]#1 : index +! CHECK: %[[VAL_15:.*]] = arith.cmpi ne(%[[VAL_14]]#1, %[[VAL_3]]#1) : index ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_15]], %[[VAL_15]], %[[VAL_12]] : i1 ! CHECK: %[[VAL_17:.*]] = fir.if %[[VAL_16]] -> (!fir.heap>) { ! CHECK: %[[VAL_18:.*]] = fir.allocmem !fir.array, %[[VAL_3]]#1 {uniq_name = ".auto.alloc"} @@ -1253,7 +1253,7 @@ ! real :: y(2, 3) = reshape([1,2,3,4,5,6], [2,3]) ! real, allocatable :: x (:, :) ! allocate(x(2,2)) -! call test_with_lbounds(x, y) +! call test_with_lbounds(x, y) ! print *, x(10, 20) ! print *, x !end diff --git a/flang/test/Lower/allocatable-callee.f90 b/flang/test/Lower/allocatable-callee.f90 --- a/flang/test/Lower/allocatable-callee.f90 +++ b/flang/test/Lower/allocatable-callee.f90 @@ -61,7 +61,7 @@ ! Check that the length expr was evaluated before the execution parts. ! CHECK: %[[raw_len:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 - ! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[raw_len]], %[[c0_i32]] : i32 + ! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[raw_len]], %[[c0_i32]]) : i32 ! CHECK: %[[len:.*]] = arith.select %[[cmp]], %[[raw_len]], %[[c0_i32]] : i32 n = n + 1 ! CHECK: fir.store {{.*}} to %arg1 : !fir.ref @@ -111,7 +111,7 @@ ! Check that the length expr was evaluated before the execution parts. ! CHECK: %[[raw_len:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 - ! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[raw_len]], %[[c0_i32]] : i32 + ! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[raw_len]], %[[c0_i32]]) : i32 ! CHECK: %[[len:.*]] = arith.select %[[cmp]], %[[raw_len]], %[[c0_i32]] : i32 n = n + 1 ! CHECK: fir.store {{.*}} to %arg1 : !fir.ref diff --git a/flang/test/Lower/allocatable-runtime.f90 b/flang/test/Lower/allocatable-runtime.f90 --- a/flang/test/Lower/allocatable-runtime.f90 +++ b/flang/test/Lower/allocatable-runtime.f90 @@ -138,7 +138,7 @@ ! CHECK: %[[sBoxAddr:.*]] = fir.alloca !fir.box>> {{{.*}}uniq_name = "_QFchar_explicit_dynEscalar"} ! CHECK: %[[raw_l1:.*]] = fir.load %arg1 : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 - ! CHECK: %[[cmp1:.*]] = arith.cmpi sgt, %[[raw_l1]], %[[c0_i32]] : i32 + ! CHECK: %[[cmp1:.*]] = arith.cmpi sgt(%[[raw_l1]], %[[c0_i32]]) : i32 ! CHECK: %[[l1:.*]] = arith.select %[[cmp1]], %[[raw_l1]], %[[c0_i32]] : i32 ! CHECK: %[[sNullAddr:.*]] = fir.zero_bits !fir.heap> ! CHECK: %[[sInitBox:.*]] = fir.embox %[[sNullAddr]] typeparams %[[l1]] : (!fir.heap>, i32) -> !fir.box>> @@ -148,7 +148,7 @@ ! CHECK: %[[aBoxAddr:.*]] = fir.alloca !fir.box>>> {{{.*}}uniq_name = "_QFchar_explicit_dynEzarray"} ! CHECK: %[[raw_l2:.*]] = fir.load %arg2 : !fir.ref ! CHECK: %[[c0_i32_2:.*]] = arith.constant 0 : i32 - ! CHECK: %[[cmp2:.*]] = arith.cmpi sgt, %[[raw_l2]], %[[c0_i32_2]] : i32 + ! CHECK: %[[cmp2:.*]] = arith.cmpi sgt(%[[raw_l2]], %[[c0_i32_2]]) : i32 ! CHECK: %[[l2:.*]] = arith.select %[[cmp2]], %[[raw_l2]], %[[c0_i32_2]] : i32 ! CHECK: %[[aNullAddr:.*]] = fir.zero_bits !fir.heap>> ! CHECK: %[[aNullShape:.*]] = fir.shape %c0{{.*}} : (index) -> !fir.shape<1> diff --git a/flang/test/Lower/allocatables.f90 b/flang/test/Lower/allocatables.f90 --- a/flang/test/Lower/allocatables.f90 +++ b/flang/test/Lower/allocatables.f90 @@ -43,7 +43,7 @@ ! CHECK-DAG: %[[c100:.*]] = fir.convert %c100_i32 : (i32) -> index ! CHECK-DAG: %[[diff:.*]] = arith.subi %[[c100]], %[[c42]] : index ! CHECK: %[[rawExtent:.*]] = arith.addi %[[diff]], %c1{{.*}} : index - ! CHECK: %[[extentPositive:.*]] = arith.cmpi sgt, %[[rawExtent]], %c0{{.*}} : index + ! CHECK: %[[extentPositive:.*]] = arith.cmpi sgt(%[[rawExtent]], %c0{{.*}}) : index ! CHECK: %[[extent:.*]] = arith.select %[[extentPositive]], %[[rawExtent]], %c0{{.*}} : index ! CHECK: %[[alloc:.*]] = fir.allocmem !fir.array, %[[extent]] {{{.*}}uniq_name = "_QFfoodim1Ex.alloc"} ! CHECK-DAG: fir.store %[[alloc]] to %[[xAddrVar]] : !fir.ref>> @@ -88,7 +88,7 @@ ! CHECK: fir.freemem %{{.*}} allocate(character(n):: c) ! CHECK: %[[n:.*]] = fir.load %arg0 : !fir.ref - ! CHECK: %[[nPositive:.*]] = arith.cmpi sgt, %[[n]], %c0{{.*}} : i32 + ! CHECK: %[[nPositive:.*]] = arith.cmpi sgt(%[[n]], %c0{{.*}}) : i32 ! CHECK: %[[ns:.*]] = arith.select %[[nPositive]], %[[n]], %c0{{.*}} : i32 ! CHECK: %[[ni:.*]] = fir.convert %[[ns]] : (i32) -> index ! CHECK: fir.allocmem !fir.char<1,?>(%[[ni]] : index) {{{.*}}uniq_name = "_QFchar_deferredEc.alloc"} @@ -130,7 +130,7 @@ character(l1), allocatable :: c ! CHECK: %[[l1:.*]] = fir.load %arg0 : !fir.ref ! CHECK: %[[c0_i32:.*]] = arith.constant 0 : i32 - ! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[l1]], %[[c0_i32]] : i32 + ! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[l1]], %[[c0_i32]]) : i32 ! CHECK: %[[cLen:.*]] = arith.select %[[cmp]], %[[l1]], %[[c0_i32]] : i32 ! CHECK: %[[cAddrVar:.*]] = fir.alloca !fir.heap> {{{.*}}uniq_name = "_QFchar_explicit_dynEc.addr"} ! CHECK-NOT: "_QFchar_explicit_dynEc.len" diff --git a/flang/test/Lower/allocated.f90 b/flang/test/Lower/allocated.f90 --- a/flang/test/Lower/allocated.f90 +++ b/flang/test/Lower/allocated.f90 @@ -7,12 +7,11 @@ ! CHECK: %[[scalar:.*]] = fir.load %[[arg0]] : !fir.ref>> ! CHECK: %[[addr0:.*]] = fir.box_addr %[[scalar]] : (!fir.box>) -> !fir.heap ! CHECK: %[[addrToInt0:.*]] = fir.convert %[[addr0]] - ! CHECK: cmpi ne, %[[addrToInt0]], %c0{{.*}} + ! CHECK: cmpi ne(%[[addrToInt0]], %c0{{.*}}) print *, allocated(scalar) ! CHECK: %[[array:.*]] = fir.load %[[arg1]] : !fir.ref>>> ! CHECK: %[[addr1:.*]] = fir.box_addr %[[array]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[addrToInt1:.*]] = fir.convert %[[addr1]] - ! CHECK: cmpi ne, %[[addrToInt1]], %c0{{.*}} + ! CHECK: cmpi ne(%[[addrToInt1]], %c0{{.*}}) print *, allocated(array) end subroutine - \ No newline at end of file diff --git a/flang/test/Lower/always-execute-loop-body.f90 b/flang/test/Lower/always-execute-loop-body.f90 --- a/flang/test/Lower/always-execute-loop-body.f90 +++ b/flang/test/Lower/always-execute-loop-body.f90 @@ -10,7 +10,7 @@ ! CHECK: [[tripcount:%[0-9]+]] = arith.divsi ! CHECK: [[one:%c1_i32[_0-9]*]] = arith.constant 1 : i32 - ! CHECK: [[cmp:%[0-9]+]] = arith.cmpi slt, [[tripcount]], [[one]] : i32 + ! CHECK: [[cmp:%[0-9]+]] = arith.cmpi slt([[tripcount]], [[one]]) : i32 ! CHECK: [[newtripcount:%[0-9]+]] = arith.select [[cmp]], [[one]], [[tripcount]] : i32 ! CHECK: fir.store [[newtripcount]] to %{{[0-9]+}} : !fir.ref do i=4,1,1 diff --git a/flang/test/Lower/arithmetic-goto.f90 b/flang/test/Lower/arithmetic-goto.f90 --- a/flang/test/Lower/arithmetic-goto.f90 +++ b/flang/test/Lower/arithmetic-goto.f90 @@ -13,9 +13,9 @@ ! CHECK-LABEL: func @_QPkagf function kagf(findex) ! CHECK: %[[zero:.+]] = arith.constant 0.0 - ! CHECK: %{{.+}} = arith.cmpf olt, %{{.+}}, %[[zero]] : f32 + ! CHECK: %{{.+}} = arith.cmpf olt(%{{.+}}, %[[zero]]) : f32 ! CHECK: cond_br % - ! CHECK: %{{.+}} = arith.cmpf ogt, %{{.+}}, %[[zero]] : f32 + ! CHECK: %{{.+}} = arith.cmpf ogt(%{{.+}}, %[[zero]]) : f32 ! CHECK: cond_br % ! CHECK: br ^ if (findex+findex) 7, 8, 9 diff --git a/flang/test/Lower/array-character.f90 b/flang/test/Lower/array-character.f90 --- a/flang/test/Lower/array-character.f90 +++ b/flang/test/Lower/array-character.f90 @@ -16,13 +16,13 @@ ! CHECK: %[[VAL_12:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: cf.br ^bb1(%[[VAL_6]], %[[VAL_4]] : index, index) ! CHECK: ^bb1(%[[VAL_13:.*]]: index, %[[VAL_14:.*]]: index): - ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt, %[[VAL_14]], %[[VAL_6]] : index + ! CHECK: %[[VAL_15:.*]] = arith.cmpi sgt(%[[VAL_14]], %[[VAL_6]]) : index ! CHECK: cf.cond_br %[[VAL_15]], ^bb2, ^bb6 ! CHECK: ^bb2: ! CHECK: %[[VAL_16:.*]] = arith.addi %[[VAL_13]], %[[VAL_7]] : index ! CHECK: %[[VAL_17:.*]] = fir.array_coor %[[VAL_11]](%[[VAL_12]]) %[[VAL_16]] typeparams %[[VAL_10]]#1 : (!fir.ref>>, !fir.shape<1>, index, index) -> !fir.ref> ! CHECK: %[[VAL_18:.*]] = fir.array_coor %[[VAL_9]](%[[VAL_12]]) %[[VAL_16]] : (!fir.ref>>, !fir.shape<1>, index) -> !fir.ref> - ! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt, %[[VAL_10]]#1, %[[VAL_5]] : index + ! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt(%[[VAL_10]]#1, %[[VAL_5]]) : index ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_19]], %[[VAL_5]], %[[VAL_10]]#1 : index ! CHECK: %[[VAL_21:.*]] = fir.convert %[[VAL_20]] : (index) -> i64 ! CHECK: %[[VAL_22:.*]] = fir.convert %[[VAL_18]] : (!fir.ref>) -> !fir.ref @@ -33,7 +33,7 @@ ! CHECK: %[[VAL_26:.*]] = arith.subi %[[VAL_5]], %[[VAL_20]] : index ! CHECK: cf.br ^bb3(%[[VAL_20]], %[[VAL_26]] : index, index) ! CHECK: ^bb3(%[[VAL_27:.*]]: index, %[[VAL_28:.*]]: index): - ! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt, %[[VAL_28]], %[[VAL_6]] : index + ! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt(%[[VAL_28]], %[[VAL_6]]) : index ! CHECK: cf.cond_br %[[VAL_29]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: %[[VAL_30:.*]] = fir.convert %[[VAL_18]] : (!fir.ref>) -> !fir.ref>> @@ -105,7 +105,7 @@ ! CHECK: %[[VAL_13:.*]] = fir.allocmem !fir.array<4x!fir.char<1,3>> ! CHECK: cf.br ^bb1(%[[VAL_6]], %[[VAL_5]] : index, index) ! CHECK: ^bb1(%[[VAL_14:.*]]: index, %[[VAL_15:.*]]: index): - ! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_6]] : index + ! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_16]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_17:.*]] = arith.addi %[[VAL_14]], %[[VAL_7]] : index @@ -127,7 +127,7 @@ ! CHECK: %[[VAL_29:.*]] = fir.allocmem !fir.array<4x!fir.char<1,3>> ! CHECK: br ^bb4(%[[VAL_6]], %[[VAL_5]] : index, index) ! CHECK: ^bb4(%[[VAL_30:.*]]: index, %[[VAL_31:.*]]: index): - ! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt, %[[VAL_31]], %[[VAL_6]] : index + ! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt(%[[VAL_31]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_32]], ^bb5, ^bb6 ! CHECK: ^bb5: ! CHECK: %[[VAL_33:.*]] = arith.addi %[[VAL_30]], %[[VAL_7]] : index @@ -149,7 +149,7 @@ ! CHECK: %[[VAL_45:.*]] = fir.allocmem !fir.array<4x!fir.char<1,3>> ! CHECK: br ^bb7(%[[VAL_6]], %[[VAL_5]] : index, index) ! CHECK: ^bb7(%[[VAL_46:.*]]: index, %[[VAL_47:.*]]: index): - ! CHECK: %[[VAL_48:.*]] = arith.cmpi sgt, %[[VAL_47]], %[[VAL_6]] : index + ! CHECK: %[[VAL_48:.*]] = arith.cmpi sgt(%[[VAL_47]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_48]], ^bb8, ^bb9 ! CHECK: ^bb8: ! CHECK: %[[VAL_49:.*]] = arith.addi %[[VAL_46]], %[[VAL_7]] : index diff --git a/flang/test/Lower/array-derived-assignments.f90 b/flang/test/Lower/array-derived-assignments.f90 --- a/flang/test/Lower/array-derived-assignments.f90 +++ b/flang/test/Lower/array-derived-assignments.f90 @@ -26,7 +26,7 @@ ! CHECK-DAG: %[[VAL_7:.*]] = fir.shape %[[VAL_3]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_5]], %[[VAL_3]] : index, index) ! CHECK: ^bb1(%[[VAL_8:.*]]: index, %[[VAL_9:.*]]: index): - ! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_5]] : index + ! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_10]], ^bb2, ^bb6 ! CHECK: ^bb2: ! CHECK: %[[VAL_11:.*]] = arith.addi %[[VAL_8]], %[[VAL_6]] : index @@ -42,7 +42,7 @@ ! CHECK: %[[VAL_20:.*]] = fir.coordinate_of %[[VAL_13]], %[[VAL_18]] : (!fir.ref>,p:!fir.box>>}>>, !fir.field) -> !fir.ref>> ! CHECK: br ^bb3(%[[VAL_5]], %[[VAL_2]] : index, index) ! CHECK: ^bb3(%[[VAL_21:.*]]: index, %[[VAL_22:.*]]: index): - ! CHECK: %[[VAL_23:.*]] = arith.cmpi sgt, %[[VAL_22]], %[[VAL_5]] : index + ! CHECK: %[[VAL_23:.*]] = arith.cmpi sgt(%[[VAL_22]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_23]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: %[[VAL_24:.*]] = fir.coordinate_of %[[VAL_20]], %[[VAL_21]] : (!fir.ref>>, index) -> !fir.ref> @@ -79,7 +79,7 @@ ! CHECK: %[[VAL_7:.*]] = fir.shape %[[VAL_3]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_3]] : index, index) ! CHECK: ^bb1(%[[VAL_8:.*]]: index, %[[VAL_9:.*]]: index): - ! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_4]] : index + ! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_10]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_11:.*]] = arith.addi %[[VAL_8]], %[[VAL_5]] : index @@ -100,5 +100,5 @@ ! CHECK: return ! CHECK: } end subroutine - + end module diff --git a/flang/test/Lower/array-derived.f90 b/flang/test/Lower/array-derived.f90 --- a/flang/test/Lower/array-derived.f90 +++ b/flang/test/Lower/array-derived.f90 @@ -43,7 +43,7 @@ ! CHECK: %[[VAL_7:.*]] = fir.field_index d, !fir.type<_QMcsTr{n:i32,d:i32}> ! CHECK: %[[VAL_8:.*]]:3 = fir.box_dims %[[VAL_0]], %[[VAL_4]] : (!fir.box,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}>>>, index) -> (index, index, index) ! CHECK: %[[VAL_9:.*]] = fir.slice %[[VAL_5]], %[[VAL_8]]#1, %[[VAL_5]] path %[[VAL_6]], %[[VAL_7]] : (index, index, index, !fir.field, !fir.field) -> !fir.slice<1> -! CHECK: %[[VAL_8_2:.*]] = arith.cmpi sgt, %[[VAL_8]]#1, %[[VAL_4]] : index +! CHECK: %[[VAL_8_2:.*]] = arith.cmpi sgt(%[[VAL_8]]#1, %[[VAL_4]]) : index ! CHECK: %[[VAL_8_3:.*]] = arith.select %[[VAL_8_2]], %[[VAL_8]]#1, %[[VAL_4]] : index ! CHECK: %[[VAL_10:.*]] = fir.field_index f1, !fir.type<_QMcsTt2{f1:!fir.array<5xi32>,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}> ! CHECK: %[[VAL_11:.*]]:3 = fir.box_dims %[[VAL_1]], %[[VAL_4]] : (!fir.box,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}>>>, index) -> (index, index, index) @@ -52,7 +52,7 @@ ! CHECK: %[[VAL_14:.*]] = fir.slice %[[VAL_5]], %[[VAL_11]]#1, %[[VAL_5]] path %[[VAL_10]], %[[VAL_2]] : (index, index, index, !fir.field, index) -> !fir.slice<1> ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_8_3]] : index, index) ! CHECK: ^bb1(%[[VAL_15:.*]]: index, %[[VAL_16:.*]]: index): -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_4]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_17]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_18:.*]] = arith.addi %[[VAL_15]], %[[VAL_5]] : index @@ -90,14 +90,14 @@ ! CHECK: %[[VAL_9:.*]] = fir.field_index n, !fir.type<_QMcsTr{n:i32,d:i32}> ! CHECK: %[[VAL_10:.*]]:3 = fir.box_dims %[[VAL_0]], %[[VAL_6]] : (!fir.box,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}>>}>>>, index) -> (index, index, index) ! CHECK: %[[VAL_11:.*]] = fir.slice %[[VAL_5]], %[[VAL_10]]#1, %[[VAL_5]] path %[[VAL_7]], %[[VAL_6]], %[[VAL_6]], %[[VAL_8]], %[[VAL_9]] : (index, index, index, !fir.field, index, index, !fir.field, !fir.field) -> !fir.slice<1> -! CHECK: %[[VAL_10_2:.*]] = arith.cmpi sgt, %[[VAL_10]]#1, %[[VAL_6]] : index +! CHECK: %[[VAL_10_2:.*]] = arith.cmpi sgt(%[[VAL_10]]#1, %[[VAL_6]]) : index ! CHECK: %[[VAL_10_3:.*]] = arith.select %[[VAL_10_2]], %[[VAL_10]]#1, %[[VAL_6]] : index ! CHECK: %[[VAL_12:.*]] = fir.field_index f1, !fir.type<_QMcsTt2{f1:!fir.array<5xi32>,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}> ! CHECK: %[[VAL_13:.*]]:3 = fir.box_dims %[[VAL_1]], %[[VAL_6]] : (!fir.box,f2:!fir.type<_QMcsTr{n:i32,d:i32}>}>>}>>>, index) -> (index, index, index) ! CHECK: %[[VAL_14:.*]] = fir.slice %[[VAL_5]], %[[VAL_13]]#1, %[[VAL_5]] path %[[VAL_7]], %[[VAL_5]], %[[VAL_5]], %[[VAL_12]], %[[VAL_3]] : (index, index, index, !fir.field, index, index, !fir.field, index) -> !fir.slice<1> ! CHECK: br ^bb1(%[[VAL_6]], %[[VAL_10_3]] : index, index) ! CHECK: ^bb1(%[[VAL_15:.*]]: index, %[[VAL_16:.*]]: index): -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_6]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_17]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_18:.*]] = arith.addi %[[VAL_15]], %[[VAL_5]] : index @@ -110,13 +110,13 @@ ! CHECK: br ^bb1(%[[VAL_18]], %[[VAL_23]] : index, index) ! CHECK: ^bb3: ! CHECK: %[[VAL_24:.*]] = fir.slice %[[VAL_5]], %[[VAL_13]]#1, %[[VAL_5]] path %[[VAL_7]], %[[VAL_2]], %[[VAL_2]], %[[VAL_12]], %[[VAL_5]] : (index, index, index, !fir.field, index, index, !fir.field, index) -> !fir.slice<1> -! CHECK: %[[VAL_13_2:.*]] = arith.cmpi sgt, %[[VAL_13]]#1, %[[VAL_6]] : index +! CHECK: %[[VAL_13_2:.*]] = arith.cmpi sgt(%[[VAL_13]]#1, %[[VAL_6]]) : index ! CHECK: %[[VAL_13_3:.*]] = arith.select %[[VAL_13_2]], %[[VAL_13]]#1, %[[VAL_6]] : index ! CHECK: %[[VAL_25:.*]] = fir.field_index d, !fir.type<_QMcsTr{n:i32,d:i32}> ! CHECK: %[[VAL_26:.*]] = fir.slice %[[VAL_5]], %[[VAL_10]]#1, %[[VAL_5]] path %[[VAL_7]], %[[VAL_6]], %[[VAL_5]], %[[VAL_8]], %[[VAL_25]] : (index, index, index, !fir.field, index, index, !fir.field, !fir.field) -> !fir.slice<1> ! CHECK: br ^bb4(%[[VAL_6]], %[[VAL_13_3]] : index, index) ! CHECK: ^bb4(%[[VAL_27:.*]]: index, %[[VAL_28:.*]]: index): -! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt, %[[VAL_28]], %[[VAL_6]] : index +! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt(%[[VAL_28]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_29]], ^bb5, ^bb6 ! CHECK: ^bb5: ! CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_27]], %[[VAL_5]] : index diff --git a/flang/test/Lower/array-elemental-calls-2.f90 b/flang/test/Lower/array-elemental-calls-2.f90 --- a/flang/test/Lower/array-elemental-calls-2.f90 +++ b/flang/test/Lower/array-elemental-calls-2.f90 @@ -80,7 +80,7 @@ ! CHECK: fir.do_loop ! CHECK: %[[VAL_25:.*]] = fir.array_fetch %{{.*}}, %{{.*}} : (!fir.array<10xi32>, index) -> i32 ! CHECK: %[[VAL_26:.*]] = fir.array_fetch %{{.*}}, %{{.*}} : (!fir.array<10xi32>, index) -> i32 -! CHECK: %[[VAL_27:.*]] = arith.cmpi slt, %[[VAL_25]], %[[VAL_26]] : i32 +! CHECK: %[[VAL_27:.*]] = arith.cmpi slt(%[[VAL_25]], %[[VAL_26]]) : i32 ! CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_25]], %[[VAL_26]] : i32 ! CHECK: fir.store %[[VAL_28]] to %[[VAL_0]] : !fir.ref ! CHECK: fir.call @_QPelem_func(%[[VAL_0]]) : (!fir.ref) -> i32 @@ -109,7 +109,7 @@ ! CHECK: %[[VAL_26:.*]] = fir.array_fetch %{{.*}}, %{{.*}} : (!fir.array<10x!fir.logical<8>>, index) -> !fir.logical<8> ! CHECK: %[[VAL_27:.*]] = fir.convert %[[VAL_25]] : (!fir.logical<8>) -> i1 ! CHECK: %[[VAL_28:.*]] = fir.convert %[[VAL_26]] : (!fir.logical<8>) -> i1 -! CHECK: %[[VAL_29:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_28]] : i1 +! CHECK: %[[VAL_29:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_28]]) : i1 ! CHECK: %[[VAL_30:.*]] = fir.convert %[[VAL_29]] : (i1) -> !fir.logical<8> ! CHECK: fir.store %[[VAL_30]] to %[[VAL_0]] : !fir.ref> ! CHECK: fir.call @_QPelem_func_logical(%[[VAL_0]]) : (!fir.ref>) -> i32 @@ -122,7 +122,7 @@ ! CHECK: fir.do_loop ! CHECK: %[[VAL_25:.*]] = fir.array_fetch %{{.*}}, %{{.*}} : (!fir.array<10xf64>, index) -> f64 ! CHECK: %[[VAL_26:.*]] = fir.array_fetch %{{.*}}, %{{.*}} : (!fir.array<10xf64>, index) -> f64 -! CHECK: %[[VAL_27:.*]] = arith.cmpf olt, %[[VAL_25]], %[[VAL_26]] : f64 +! CHECK: %[[VAL_27:.*]] = arith.cmpf olt(%[[VAL_25]], %[[VAL_26]]) : f64 ! CHECK: %[[VAL_28:.*]] = fir.convert %[[VAL_27]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[VAL_28]] to %[[VAL_0]] : !fir.ref> ! CHECK: fir.call @_QPelem_func_logical4(%[[VAL_0]]) : (!fir.ref>) -> i32 @@ -178,7 +178,7 @@ subroutine check_parentheses_derived(a) type t integer :: i - end type + end type interface integer elemental function elem_func_derived(x) import :: t diff --git a/flang/test/Lower/array-elemental-calls-char-byval.f90 b/flang/test/Lower/array-elemental-calls-char-byval.f90 --- a/flang/test/Lower/array-elemental-calls-char-byval.f90 +++ b/flang/test/Lower/array-elemental-calls-char-byval.f90 @@ -27,7 +27,7 @@ ! CHECK: %[[VAL_7:.*]] = fir.shape %[[VAL_1]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_2]], %[[VAL_1]] : index, index) ! CHECK: ^bb1(%[[VAL_8:.*]]: index, %[[VAL_9:.*]]: index): -! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt, %[[VAL_9]], %[[VAL_2]] : index +! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt(%[[VAL_9]], %[[VAL_2]]) : index ! CHECK: cond_br %[[VAL_10]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_11:.*]] = arith.addi %[[VAL_8]], %[[VAL_3]] : index @@ -67,7 +67,7 @@ ! CHECK: fir.call @llvm.memmove.p0.p0.i64(%[[VAL_33]], %[[VAL_34]], %[[VAL_32]], %[[VAL_24]]) : (!fir.ref, !fir.ref, i64, i1) -> () ! CHECK: br ^bb1(%[[VAL_26]], %[[VAL_25]] : index, index) ! CHECK: ^bb1(%[[VAL_35:.*]]: index, %[[VAL_36:.*]]: index): -! CHECK: %[[VAL_37:.*]] = arith.cmpi sgt, %[[VAL_36]], %[[VAL_26]] : index +! CHECK: %[[VAL_37:.*]] = arith.cmpi sgt(%[[VAL_36]], %[[VAL_26]]) : index ! CHECK: cond_br %[[VAL_37]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_38:.*]] = fir.emboxchar %[[VAL_31]], %[[VAL_28]]#1 : (!fir.ref>, index) -> !fir.boxchar<1> @@ -93,7 +93,7 @@ ! CHECK: %[[VAL_49:.*]] = fir.shape %[[VAL_46]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_47]], %[[VAL_46]] : index, index) ! CHECK: ^bb1(%[[VAL_50:.*]]: index, %[[VAL_51:.*]]: index): -! CHECK: %[[VAL_52:.*]] = arith.cmpi sgt, %[[VAL_51]], %[[VAL_47]] : index +! CHECK: %[[VAL_52:.*]] = arith.cmpi sgt(%[[VAL_51]], %[[VAL_47]]) : index ! CHECK: cond_br %[[VAL_52]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_53:.*]] = arith.addi %[[VAL_50]], %[[VAL_48]] : index @@ -140,7 +140,7 @@ ! CHECK: fir.call @llvm.memmove.p0.p0.i64(%[[VAL_82]], %[[VAL_83]], %[[VAL_81]], %[[VAL_68]]) : (!fir.ref, !fir.ref, i64, i1) -> () ! CHECK: br ^bb1(%[[VAL_70]], %[[VAL_69]] : index, index) ! CHECK: ^bb1(%[[VAL_84:.*]]: index, %[[VAL_85:.*]]: index): -! CHECK: %[[VAL_86:.*]] = arith.cmpi sgt, %[[VAL_85]], %[[VAL_70]] : index +! CHECK: %[[VAL_86:.*]] = arith.cmpi sgt(%[[VAL_85]], %[[VAL_70]]) : index ! CHECK: cond_br %[[VAL_86]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_87:.*]] = fir.convert %[[VAL_80]] : (!fir.ref>) -> !fir.ref> @@ -178,7 +178,7 @@ ! CHECK: fir.call @llvm.memmove.p0.p0.i64(%[[VAL_104]], %[[VAL_105]], %[[VAL_103]], %[[VAL_96]]) : (!fir.ref, !fir.ref, i64, i1) -> () ! CHECK: br ^bb1(%[[VAL_98]], %[[VAL_97]] : index, index) ! CHECK: ^bb1(%[[VAL_106:.*]]: index, %[[VAL_107:.*]]: index): -! CHECK: %[[VAL_108:.*]] = arith.cmpi sgt, %[[VAL_107]], %[[VAL_98]] : index +! CHECK: %[[VAL_108:.*]] = arith.cmpi sgt(%[[VAL_107]], %[[VAL_98]]) : index ! CHECK: cond_br %[[VAL_108]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_109:.*]] = fir.convert %[[VAL_102]] : (!fir.ref>) -> !fir.ref> diff --git a/flang/test/Lower/array-elemental-calls-char.f90 b/flang/test/Lower/array-elemental-calls-char.f90 --- a/flang/test/Lower/array-elemental-calls-char.f90 +++ b/flang/test/Lower/array-elemental-calls-char.f90 @@ -31,7 +31,7 @@ ! CHECK: %[[VAL_6:.*]] = fir.shape %[[VAL_0]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_1]], %[[VAL_0]] : index, index) ! CHECK: ^bb1(%[[VAL_7:.*]]: index, %[[VAL_8:.*]]: index): -! CHECK: %[[VAL_9:.*]] = arith.cmpi sgt, %[[VAL_8]], %[[VAL_1]] : index +! CHECK: %[[VAL_9:.*]] = arith.cmpi sgt(%[[VAL_8]], %[[VAL_1]]) : index ! CHECK: cond_br %[[VAL_9]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_10:.*]] = arith.addi %[[VAL_7]], %[[VAL_2]] : index @@ -60,7 +60,7 @@ ! CHECK: %[[VAL_23:.*]] = fir.shape %[[VAL_17]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_18]], %[[VAL_17]] : index, index) ! CHECK: ^bb1(%[[VAL_24:.*]]: index, %[[VAL_25:.*]]: index): -! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt, %[[VAL_25]], %[[VAL_18]] : index +! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt(%[[VAL_25]], %[[VAL_18]]) : index ! CHECK: cond_br %[[VAL_26]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_24]], %[[VAL_19]] : index @@ -87,7 +87,7 @@ ! CHECK: %[[VAL_40:.*]] = fir.shape %[[VAL_35]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_36]], %[[VAL_35]] : index, index) ! CHECK: ^bb1(%[[VAL_41:.*]]: index, %[[VAL_42:.*]]: index): -! CHECK: %[[VAL_43:.*]] = arith.cmpi sgt, %[[VAL_42]], %[[VAL_36]] : index +! CHECK: %[[VAL_43:.*]] = arith.cmpi sgt(%[[VAL_42]], %[[VAL_36]]) : index ! CHECK: cond_br %[[VAL_43]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_44:.*]] = fir.emboxchar %[[VAL_38]]#0, %[[VAL_38]]#1 : (!fir.ref>, index) -> !fir.boxchar<1> @@ -117,7 +117,7 @@ ! CHECK: %[[VAL_57:.*]] = fir.shape %[[VAL_52]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_53]], %[[VAL_52]] : index, index) ! CHECK: ^bb1(%[[VAL_58:.*]]: index, %[[VAL_59:.*]]: index): -! CHECK: %[[VAL_60:.*]] = arith.cmpi sgt, %[[VAL_59]], %[[VAL_53]] : index +! CHECK: %[[VAL_60:.*]] = arith.cmpi sgt(%[[VAL_59]], %[[VAL_53]]) : index ! CHECK: cond_br %[[VAL_60]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_61:.*]] = fir.emboxchar %[[VAL_55]]#0, %[[VAL_52]] : (!fir.ref>, index) -> !fir.boxchar<1> @@ -144,7 +144,7 @@ ! CHECK: %[[VAL_73:.*]] = fir.shape %[[VAL_69]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_70]], %[[VAL_69]] : index, index) ! CHECK: ^bb1(%[[VAL_74:.*]]: index, %[[VAL_75:.*]]: index): -! CHECK: %[[VAL_76:.*]] = arith.cmpi sgt, %[[VAL_75]], %[[VAL_70]] : index +! CHECK: %[[VAL_76:.*]] = arith.cmpi sgt(%[[VAL_75]], %[[VAL_70]]) : index ! CHECK: cond_br %[[VAL_76]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_77:.*]] = arith.addi %[[VAL_74]], %[[VAL_71]] : index @@ -178,7 +178,7 @@ ! CHECK: %[[VAL_95:.*]] = fir.address_of(@{{.*}}) : !fir.ref> ! CHECK: br ^bb1(%[[VAL_92]], %[[VAL_91]] : index, index) ! CHECK: ^bb1(%[[VAL_96:.*]]: index, %[[VAL_97:.*]]: index): -! CHECK: %[[VAL_98:.*]] = arith.cmpi sgt, %[[VAL_97]], %[[VAL_92]] : index +! CHECK: %[[VAL_98:.*]] = arith.cmpi sgt(%[[VAL_97]], %[[VAL_92]]) : index ! CHECK: cond_br %[[VAL_98]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_99:.*]] = fir.convert %[[VAL_95]] : (!fir.ref>) -> !fir.ref> @@ -218,7 +218,7 @@ ! CHECK: %[[VAL_8:.*]] = fir.shape %[[VAL_1]] : (index) -> !fir.shape<1> ! CHECK: br ^bb1(%[[VAL_3]], %[[VAL_1]] : index, index) ! CHECK: ^bb1(%[[VAL_9:.*]]: index, %[[VAL_10:.*]]: index): - ! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_10]], %[[VAL_3]] : index + ! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_10]], %[[VAL_3]]) : index ! CHECK: cond_br %[[VAL_11]], ^bb2, ^bb6 ! CHECK: ^bb2: ! CHECK: %[[VAL_12:.*]] = arith.addi %[[VAL_9]], %[[VAL_2]] : index @@ -226,12 +226,12 @@ ! CHECK: %[[VAL_14:.*]] = fir.emboxchar %[[VAL_13]], %[[VAL_6]]#1 : (!fir.ref>, index) -> !fir.boxchar<1> ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_6]]#1 : (index) -> i32 ! CHECK: %[[VAL_16:.*]] = fir.convert %[[VAL_15]] : (i32) -> index - ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_16]], %{{.*}} : index + ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_16]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_16]], %{{.*}} : index ! CHECK: %[[VAL_17:.*]] = fir.call @llvm.stacksave() : () -> !fir.ref ! CHECK: %[[VAL_18:.*]] = fir.alloca !fir.char<1,?>(%[[SELECT]] : index) {bindc_name = ".result"} ! CHECK: %[[VAL_19:.*]] = fir.call @_QMchar_elemPelem_return_char(%[[VAL_18]], %[[SELECT]], %[[VAL_14]]) : (!fir.ref>, index, !fir.boxchar<1>) -> !fir.boxchar<1> - ! CHECK: %[[VAL_20:.*]] = arith.cmpi slt, %[[VAL_6]]#1, %[[SELECT]] : index + ! CHECK: %[[VAL_20:.*]] = arith.cmpi slt(%[[VAL_6]]#1, %[[SELECT]]) : index ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_6]]#1, %[[SELECT]] : index ! CHECK: %[[VAL_22:.*]] = fir.convert %[[VAL_21]] : (index) -> i64 ! CHECK: %[[VAL_23:.*]] = fir.convert %[[VAL_13]] : (!fir.ref>) -> !fir.ref @@ -244,7 +244,7 @@ ! CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_28]], %[[VAL_2]] : index ! CHECK: br ^bb3(%[[VAL_21]], %[[VAL_29]] : index, index) ! CHECK: ^bb3(%[[VAL_30:.*]]: index, %[[VAL_31:.*]]: index): - ! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt, %[[VAL_31]], %[[VAL_3]] : index + ! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt(%[[VAL_31]], %[[VAL_3]]) : index ! CHECK: cond_br %[[VAL_32]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: %[[VAL_33:.*]] = fir.convert %[[VAL_13]] : (!fir.ref>) -> !fir.ref>> diff --git a/flang/test/Lower/array-expression-assumed-size.f90 b/flang/test/Lower/array-expression-assumed-size.f90 --- a/flang/test/Lower/array-expression-assumed-size.f90 +++ b/flang/test/Lower/array-expression-assumed-size.f90 @@ -16,8 +16,8 @@ ! CHECK-LABEL: func @_QPassumed_size_test( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>{{.*}}) { -! CHECK: %[[VAL_1A:.*]] = fir.convert %c10{{.*}} : (i64) -> index -! CHECK: %[[VAL_1B:.*]] = arith.cmpi sgt, %[[VAL_1A]], %c0{{.*}} : index +! CHECK: %[[VAL_1A:.*]] = fir.convert %c10{{.*}} : (i64) -> index +! CHECK: %[[VAL_1B:.*]] = arith.cmpi sgt(%[[VAL_1A]], %c0{{.*}}) : index ! CHECK: %[[VAL_1:.*]] = arith.select %[[VAL_1B]], %[[VAL_1A]], %c0{{.*}} : index ! CHECK: %[[VAL_2:.*]] = fir.undefined index ! CHECK: %[[VAL_3:.*]] = arith.constant 1 : index @@ -29,7 +29,7 @@ ! CHECK: %[[VAL_9:.*]] = arith.subi %[[VAL_7]], %[[VAL_3]] : index ! CHECK: %[[VAL_10:.*]] = arith.addi %[[VAL_9]], %[[VAL_5]] : index ! CHECK: %[[VAL_11:.*]] = arith.divsi %[[VAL_10]], %[[VAL_5]] : index -! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt, %[[VAL_11]], %[[VAL_8]] : index +! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt(%[[VAL_11]], %[[VAL_8]]) : index ! CHECK: %[[VAL_13:.*]] = arith.select %[[VAL_12]], %[[VAL_11]], %[[VAL_8]] : index ! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (i64) -> index @@ -41,7 +41,7 @@ ! CHECK: %[[VAL_21:.*]] = arith.subi %[[VAL_19]], %[[VAL_15]] : index ! CHECK: %[[VAL_22:.*]] = arith.addi %[[VAL_21]], %[[VAL_17]] : index ! CHECK: %[[VAL_23:.*]] = arith.divsi %[[VAL_22]], %[[VAL_17]] : index -! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt, %[[VAL_23]], %[[VAL_20]] : index +! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt(%[[VAL_23]], %[[VAL_20]]) : index ! CHECK: %[[VAL_25:.*]] = arith.select %[[VAL_24]], %[[VAL_23]], %[[VAL_20]] : index ! CHECK: %[[VAL_26:.*]] = fir.shape %[[VAL_1]], %[[VAL_2]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_27:.*]] = fir.slice %[[VAL_3]], %[[VAL_7]], %[[VAL_5]], %[[VAL_15]], %[[VAL_19]], %[[VAL_17]] : (index, index, index, index, index, index) -> !fir.slice<2> @@ -79,8 +79,8 @@ ! CHECK-LABEL: func @_QPassumed_size_forall_test( ! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref>{{.*}}) { ! CHECK: %[[VAL_1:.*]] = fir.alloca i32 {adapt.valuebyref, bindc_name = "i"} -! CHECK: %[[VAL_2A:.*]] = fir.convert %c10{{.*}} : (i64) -> index -! CHECK: %[[VAL_2B:.*]] = arith.cmpi sgt, %[[VAL_2A]], %c0{{.*}} : index +! CHECK: %[[VAL_2A:.*]] = fir.convert %c10{{.*}} : (i64) -> index +! CHECK: %[[VAL_2B:.*]] = arith.cmpi sgt(%[[VAL_2A]], %c0{{.*}}) : index ! CHECK: %[[VAL_2:.*]] = arith.select %[[VAL_2B]], %[[VAL_2A]], %c0{{.*}} : index ! CHECK: %[[VAL_3:.*]] = fir.undefined index ! CHECK: %[[VAL_4:.*]] = arith.constant 2 : i32 @@ -110,7 +110,7 @@ ! CHECK: %[[VAL_29:.*]] = arith.subi %[[VAL_27]], %[[VAL_23]] : index ! CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_29]], %[[VAL_25]] : index ! CHECK: %[[VAL_31:.*]] = arith.divsi %[[VAL_30]], %[[VAL_25]] : index -! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt, %[[VAL_31]], %[[VAL_28]] : index +! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt(%[[VAL_31]], %[[VAL_28]]) : index ! CHECK: %[[VAL_33:.*]] = arith.select %[[VAL_32]], %[[VAL_31]], %[[VAL_28]] : index ! CHECK: %[[VAL_34:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_35:.*]] = fir.load %[[VAL_1]] : !fir.ref @@ -155,10 +155,10 @@ ! PostOpt: %[[VAL_10:.*]] = fir.allocmem !fir.array<10x?xi32>, %[[VAL_3]] ! PostOpt: br ^bb1(%[[VAL_4]], %[[VAL_3]] : index, index) ! PostOpt: ^bb1(%[[VAL_11:.*]]: index, %[[VAL_12:.*]]: index): -! PostOpt: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_4]] : index +! PostOpt: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_13]], ^bb2(%[[VAL_4]], %[[VAL_1]] : index, index), ^bb5 ! PostOpt: ^bb2(%[[VAL_14:.*]]: index, %[[VAL_15:.*]]: index): -! PostOpt: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_4]] : index +! PostOpt: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_16]], ^bb3, ^bb4 ! PostOpt: ^bb3: ! PostOpt: %[[VAL_17:.*]] = arith.addi %[[VAL_14]], %[[VAL_2]] : index @@ -177,10 +177,10 @@ ! PostOpt: %[[VAL_25:.*]] = fir.slice %[[VAL_2]], %[[VAL_1]], %[[VAL_2]], %[[VAL_5]], %[[VAL_6]], %[[VAL_2]] : (index, index, index, index, index, index) -> !fir.slice<2> ! PostOpt: br ^bb6(%[[VAL_4]], %[[VAL_3]] : index, index) ! PostOpt: ^bb6(%[[VAL_26:.*]]: index, %[[VAL_27:.*]]: index): -! PostOpt: %[[VAL_28:.*]] = arith.cmpi sgt, %[[VAL_27]], %[[VAL_4]] : index +! PostOpt: %[[VAL_28:.*]] = arith.cmpi sgt(%[[VAL_27]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_28]], ^bb7(%[[VAL_4]], %[[VAL_1]] : index, index), ^bb10(%[[VAL_4]], %[[VAL_3]] : index, index) ! PostOpt: ^bb7(%[[VAL_29:.*]]: index, %[[VAL_30:.*]]: index): -! PostOpt: %[[VAL_31:.*]] = arith.cmpi sgt, %[[VAL_30]], %[[VAL_4]] : index +! PostOpt: %[[VAL_31:.*]] = arith.cmpi sgt(%[[VAL_30]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_31]], ^bb8, ^bb9 ! PostOpt: ^bb8: ! PostOpt: %[[VAL_32:.*]] = arith.addi %[[VAL_29]], %[[VAL_2]] : index @@ -196,10 +196,10 @@ ! PostOpt: %[[VAL_39:.*]] = arith.subi %[[VAL_27]], %[[VAL_2]] : index ! PostOpt: br ^bb6(%[[VAL_38]], %[[VAL_39]] : index, index) ! PostOpt: ^bb10(%[[VAL_40:.*]]: index, %[[VAL_41:.*]]: index): -! PostOpt: %[[VAL_42:.*]] = arith.cmpi sgt, %[[VAL_41]], %[[VAL_4]] : index +! PostOpt: %[[VAL_42:.*]] = arith.cmpi sgt(%[[VAL_41]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_42]], ^bb11(%[[VAL_4]], %[[VAL_1]] : index, index), ^bb14 ! PostOpt: ^bb11(%[[VAL_43:.*]]: index, %[[VAL_44:.*]]: index): -! PostOpt: %[[VAL_45:.*]] = arith.cmpi sgt, %[[VAL_44]], %[[VAL_4]] : index +! PostOpt: %[[VAL_45:.*]] = arith.cmpi sgt(%[[VAL_44]], %[[VAL_4]]) : index ! PostOpt: cond_br %[[VAL_45]], ^bb12, ^bb13 ! PostOpt: ^bb12: ! PostOpt: %[[VAL_46:.*]] = arith.addi %[[VAL_43]], %[[VAL_2]] : index @@ -233,10 +233,10 @@ ! PostOpt: %[[VAL_10:.*]] = fir.allocmem !fir.array<10x?xi32>, %[[VAL_4]] ! PostOpt: br ^bb1(%[[VAL_5]], %[[VAL_4]] : index, index) ! PostOpt: ^bb1(%[[VAL_11:.*]]: index, %[[VAL_12:.*]]: index): -! PostOpt: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_5]] : index +! PostOpt: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_13]], ^bb2(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb5 ! PostOpt: ^bb2(%[[VAL_14:.*]]: index, %[[VAL_15:.*]]: index): -! PostOpt: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_5]] : index +! PostOpt: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_16]], ^bb3, ^bb4 ! PostOpt: ^bb3: ! PostOpt: %[[VAL_17:.*]] = arith.addi %[[VAL_14]], %[[VAL_4]] : index @@ -254,7 +254,7 @@ ! PostOpt: ^bb5: ! PostOpt: br ^bb6(%[[VAL_3]], %[[VAL_6]] : index, index) ! PostOpt: ^bb6(%[[VAL_25:.*]]: index, %[[VAL_26:.*]]: index): -! PostOpt: %[[VAL_27:.*]] = arith.cmpi sgt, %[[VAL_26]], %[[VAL_5]] : index +! PostOpt: %[[VAL_27:.*]] = arith.cmpi sgt(%[[VAL_26]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_27]], ^bb7, ^bb11(%[[VAL_5]], %[[VAL_4]] : index, index) ! PostOpt: ^bb7: ! PostOpt: %[[VAL_28:.*]] = fir.convert %[[VAL_25]] : (index) -> i32 @@ -263,7 +263,7 @@ ! PostOpt: %[[VAL_30:.*]] = fir.convert %[[VAL_29]] : (i32) -> index ! PostOpt: br ^bb8(%[[VAL_5]], %[[VAL_3]] : index, index) ! PostOpt: ^bb8(%[[VAL_31:.*]]: index, %[[VAL_32:.*]]: index): -! PostOpt: %[[VAL_33:.*]] = arith.cmpi sgt, %[[VAL_32]], %[[VAL_5]] : index +! PostOpt: %[[VAL_33:.*]] = arith.cmpi sgt(%[[VAL_32]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_33]], ^bb9, ^bb10 ! PostOpt: ^bb9: ! PostOpt: %[[VAL_34:.*]] = arith.addi %[[VAL_31]], %[[VAL_1]] : index @@ -279,10 +279,10 @@ ! PostOpt: %[[VAL_41:.*]] = arith.subi %[[VAL_26]], %[[VAL_4]] : index ! PostOpt: br ^bb6(%[[VAL_40]], %[[VAL_41]] : index, index) ! PostOpt: ^bb11(%[[VAL_42:.*]]: index, %[[VAL_43:.*]]: index): -! PostOpt: %[[VAL_44:.*]] = arith.cmpi sgt, %[[VAL_43]], %[[VAL_5]] : index +! PostOpt: %[[VAL_44:.*]] = arith.cmpi sgt(%[[VAL_43]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_44]], ^bb12(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb15 ! PostOpt: ^bb12(%[[VAL_45:.*]]: index, %[[VAL_46:.*]]: index): -! PostOpt: %[[VAL_47:.*]] = arith.cmpi sgt, %[[VAL_46]], %[[VAL_5]] : index +! PostOpt: %[[VAL_47:.*]] = arith.cmpi sgt(%[[VAL_46]], %[[VAL_5]]) : index ! PostOpt: cond_br %[[VAL_47]], ^bb13, ^bb14 ! PostOpt: ^bb13: ! PostOpt: %[[VAL_48:.*]] = arith.addi %[[VAL_45]], %[[VAL_4]] : index diff --git a/flang/test/Lower/array-expression-slice-1.f90 b/flang/test/Lower/array-expression-slice-1.f90 --- a/flang/test/Lower/array-expression-slice-1.f90 +++ b/flang/test/Lower/array-expression-slice-1.f90 @@ -28,13 +28,13 @@ ! CHECK: %[[LB:.*]] = fir.convert %[[VAL_5]] : (index) -> i32 ! CHECK: br ^bb1(%[[LB]], %[[VAL_0]] : i32, index) ! CHECK: ^bb1(%[[VAL_32:.*]]: i32, %[[VAL_33:.*]]: index): -! CHECK: %[[VAL_34:.*]] = arith.cmpi sgt, %[[VAL_33]], %[[VAL_6]] : index +! CHECK: %[[VAL_34:.*]] = arith.cmpi sgt(%[[VAL_33]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_34]], ^bb2, ^bb6 ! CHECK: ^bb2: ! CHECK: fir.store %[[VAL_32]] to %[[VAL_30]] : !fir.ref ! CHECK: br ^bb3(%[[LB]], %[[VAL_0]] : i32, index) ! CHECK: ^bb3(%[[VAL_36:.*]]: i32, %[[VAL_37:.*]]: index): -! CHECK: %[[VAL_38:.*]] = arith.cmpi sgt, %[[VAL_37]], %[[VAL_6]] : index +! CHECK: %[[VAL_38:.*]] = arith.cmpi sgt(%[[VAL_37]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_38]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: fir.store %[[VAL_36]] to %[[VAL_28]] : !fir.ref @@ -76,7 +76,7 @@ ! CHECK: %[[VAL_68:.*]] = fir.slice %[[VAL_16]], %[[VAL_66]], %[[VAL_66]], %[[VAL_4]], %[[VAL_0]], %[[VAL_11]] : (i64, index, index, index, index, index) -> !fir.slice<2> ! CHECK: br ^bb7(%[[VAL_6]], %[[VAL_11]] : index, index) ! CHECK: ^bb7(%[[VAL_69:.*]]: index, %[[VAL_70:.*]]: index): -! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt, %[[VAL_70]], %[[VAL_6]] : index +! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt(%[[VAL_70]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_71]], ^bb8, ^bb9 ! CHECK: ^bb8: ! CHECK: %[[VAL_72:.*]] = arith.addi %[[VAL_69]], %[[VAL_5]] : index @@ -91,7 +91,7 @@ ! CHECK: %[[VAL_78:.*]] = fir.load %[[VAL_77]] : !fir.ref ! CHECK: %[[VAL_79:.*]] = fir.coordinate_of %[[VAL_26]], %[[VAL_19]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_80:.*]] = fir.load %[[VAL_79]] : !fir.ref -! CHECK: %[[VAL_81:.*]] = arith.cmpf une, %[[VAL_78]], %[[VAL_80]] : f32 +! CHECK: %[[VAL_81:.*]] = arith.cmpf une(%[[VAL_78]], %[[VAL_80]]) : f32 ! CHECK: cond_br %[[VAL_81]], ^bb10, ^bb11 ! CHECK: ^bb10: ! CHECK: %[[VAL_82:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_96:.*]] = fir.coordinate_of %[[VAL_26]], %[[VAL_20]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_97:.*]] = fir.load %[[VAL_96]] : !fir.ref -! CHECK: %[[VAL_98:.*]] = arith.cmpf une, %[[VAL_95]], %[[VAL_97]] : f32 +! CHECK: %[[VAL_98:.*]] = arith.cmpf une(%[[VAL_95]], %[[VAL_97]]) : f32 ! CHECK: cond_br %[[VAL_98]], ^bb12, ^bb13 ! CHECK: ^bb12: ! CHECK: %[[VAL_99:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_113:.*]] = fir.coordinate_of %[[VAL_26]], %[[VAL_13]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_114:.*]] = fir.load %[[VAL_113]] : !fir.ref -! CHECK: %[[VAL_115:.*]] = arith.cmpf une, %[[VAL_112]], %[[VAL_114]] : f32 +! CHECK: %[[VAL_115:.*]] = arith.cmpf une(%[[VAL_112]], %[[VAL_114]]) : f32 ! CHECK: cond_br %[[VAL_115]], ^bb14, ^bb15 ! CHECK: ^bb14: ! CHECK: %[[VAL_116:.*]] = fir.address_of(@_QQcl.{{.*}} : !fir.ref !fir.slice<1> ! CHECK: br ^bb16(%[[VAL_6]], %[[VAL_11]] : index, index) ! CHECK: ^bb16(%[[VAL_130:.*]]: index, %[[VAL_131:.*]]: index): -! CHECK: %[[VAL_132:.*]] = arith.cmpi sgt, %[[VAL_131]], %[[VAL_6]] : index +! CHECK: %[[VAL_132:.*]] = arith.cmpi sgt(%[[VAL_131]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_132]], ^bb17, ^bb18 ! CHECK: ^bb17: ! CHECK: %[[VAL_133:.*]] = arith.addi %[[VAL_130]], %[[VAL_5]] : index @@ -168,7 +168,7 @@ ! CHECK: %[[VAL_138:.*]] = fir.load %[[VAL_77]] : !fir.ref ! CHECK: %[[VAL_139:.*]] = fir.coordinate_of %[[VAL_27]], %[[VAL_19]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_140:.*]] = fir.load %[[VAL_139]] : !fir.ref -! CHECK: %[[VAL_141:.*]] = arith.cmpf une, %[[VAL_138]], %[[VAL_140]] : f32 +! CHECK: %[[VAL_141:.*]] = arith.cmpf une(%[[VAL_138]], %[[VAL_140]]) : f32 ! CHECK: cond_br %[[VAL_141]], ^bb19, ^bb20 ! CHECK: ^bb19: ! CHECK: %[[VAL_142:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_155:.*]] = fir.coordinate_of %[[VAL_27]], %[[VAL_16]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_156:.*]] = fir.load %[[VAL_155]] : !fir.ref -! CHECK: %[[VAL_157:.*]] = arith.cmpf une, %[[VAL_154]], %[[VAL_156]] : f32 +! CHECK: %[[VAL_157:.*]] = arith.cmpf une(%[[VAL_154]], %[[VAL_156]]) : f32 ! CHECK: cond_br %[[VAL_157]], ^bb21, ^bb22 ! CHECK: ^bb21: ! CHECK: %[[VAL_158:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_171:.*]] = fir.coordinate_of %[[VAL_27]], %[[VAL_8]] : (!fir.ref>, i64) -> !fir.ref ! CHECK: %[[VAL_172:.*]] = fir.load %[[VAL_171]] : !fir.ref -! CHECK: %[[VAL_173:.*]] = arith.cmpf une, %[[VAL_170]], %[[VAL_172]] : f32 +! CHECK: %[[VAL_173:.*]] = arith.cmpf une(%[[VAL_170]], %[[VAL_172]]) : f32 ! CHECK: cond_br %[[VAL_173]], ^bb23, ^bb24 ! CHECK: ^bb23: ! CHECK: %[[VAL_174:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref> ! CHECK: br ^bb25(%[[VAL_6]], %[[VAL_11]] : index, index) ! CHECK: ^bb25(%[[VAL_187:.*]]: index, %[[VAL_188:.*]]: index): -! CHECK: %[[VAL_189:.*]] = arith.cmpi sgt, %[[VAL_188]], %[[VAL_6]] : index +! CHECK: %[[VAL_189:.*]] = arith.cmpi sgt(%[[VAL_188]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_189]], ^bb26, ^bb27 ! CHECK: ^bb26: ! CHECK: %[[VAL_190:.*]] = arith.addi %[[VAL_187]], %[[VAL_5]] : index @@ -242,7 +242,7 @@ ! CHECK: %[[VAL_195:.*]] = fir.allocmem !fir.array<3xf32> ! CHECK: br ^bb28(%[[VAL_6]], %[[VAL_11]] : index, index) ! CHECK: ^bb28(%[[VAL_196:.*]]: index, %[[VAL_197:.*]]: index): -! CHECK: %[[VAL_198:.*]] = arith.cmpi sgt, %[[VAL_197]], %[[VAL_6]] : index +! CHECK: %[[VAL_198:.*]] = arith.cmpi sgt(%[[VAL_197]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_198]], ^bb29, ^bb30 ! CHECK: ^bb29: ! CHECK: %[[VAL_199:.*]] = arith.addi %[[VAL_196]], %[[VAL_5]] : index @@ -253,7 +253,7 @@ ! CHECK: %[[VAL_203:.*]] = arith.subi %[[VAL_197]], %[[VAL_5]] : index ! CHECK: br ^bb28(%[[VAL_199]], %[[VAL_203]] : index, index) ! CHECK: ^bb30(%[[VAL_205:.*]]: index, %[[VAL_206:.*]]: index): -! CHECK: %[[VAL_207:.*]] = arith.cmpi sgt, %[[VAL_206]], %[[VAL_6]] : index +! CHECK: %[[VAL_207:.*]] = arith.cmpi sgt(%[[VAL_206]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_207]], ^bb31, ^bb32(%[[VAL_6]], %[[VAL_11]] : index, index) ! CHECK: ^bb31: ! CHECK: %[[VAL_208:.*]] = arith.addi %[[VAL_205]], %[[VAL_5]] : index @@ -267,7 +267,7 @@ ! CHECK: %[[VAL_215:.*]] = arith.subi %[[VAL_206]], %[[VAL_5]] : index ! CHECK: br ^bb30(%[[VAL_208]], %[[VAL_215]] : index, index) ! CHECK: ^bb32(%[[VAL_216:.*]]: index, %[[VAL_217:.*]]: index): -! CHECK: %[[VAL_218:.*]] = arith.cmpi sgt, %[[VAL_217]], %[[VAL_6]] : index +! CHECK: %[[VAL_218:.*]] = arith.cmpi sgt(%[[VAL_217]], %[[VAL_6]]) : index ! CHECK: cond_br %[[VAL_218]], ^bb33, ^bb34 ! CHECK: ^bb33: ! CHECK: %[[VAL_219:.*]] = arith.addi %[[VAL_216]], %[[VAL_5]] : index @@ -281,7 +281,7 @@ ! CHECK: fir.freemem %[[VAL_195]] : !fir.heap> ! CHECK: %[[VAL_224:.*]] = fir.load %[[VAL_77]] : !fir.ref ! CHECK: %[[VAL_225:.*]] = fir.load %[[VAL_96]] : !fir.ref -! CHECK: %[[VAL_226:.*]] = arith.cmpf une, %[[VAL_224]], %[[VAL_225]] : f32 +! CHECK: %[[VAL_226:.*]] = arith.cmpf une(%[[VAL_224]], %[[VAL_225]]) : f32 ! CHECK: cond_br %[[VAL_226]], ^bb35, ^bb36 ! CHECK: ^bb35: ! CHECK: %[[VAL_227:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_240:.*]] = fir.load %[[VAL_113]] : !fir.ref -! CHECK: %[[VAL_241:.*]] = arith.cmpf une, %[[VAL_239]], %[[VAL_240]] : f32 +! CHECK: %[[VAL_241:.*]] = arith.cmpf une(%[[VAL_239]], %[[VAL_240]]) : f32 ! CHECK: cond_br %[[VAL_241]], ^bb37, ^bb38 ! CHECK: ^bb37: ! CHECK: %[[VAL_242:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref ! CHECK: %[[VAL_255:.*]] = fir.load %[[VAL_79]] : !fir.ref -! CHECK: %[[VAL_256:.*]] = arith.cmpf une, %[[VAL_254]], %[[VAL_255]] : f32 +! CHECK: %[[VAL_256:.*]] = arith.cmpf une(%[[VAL_254]], %[[VAL_255]]) : f32 ! CHECK: cond_br %[[VAL_256]], ^bb39, ^bb40 ! CHECK: ^bb39: ! CHECK: %[[VAL_257:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref !fir.shape<1> ! CHECK: %[[VAL_22:.*]] = fir.slice %[[VAL_10]], %[[VAL_14]], %[[VAL_12]] : (index, index, index) -> !fir.slice<1> ! CHECK: %[[VAL_23:.*]] = fir.array_load %[[VAL_2]](%[[VAL_21]]) {{\[}}%[[VAL_22]]] : (!fir.ref>, !fir.shape<1>, !fir.slice<1>) -> !fir.array<20xi32> -! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt, %[[VAL_20]], %[[VAL_3]] : index +! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt(%[[VAL_20]], %[[VAL_3]]) : index ! CHECK: %[[VAL_25:.*]] = arith.select %[[VAL_24]], %[[VAL_3]], %[[VAL_20]] : index ! CHECK: %[[VAL_32:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_34:.*]] = fir.array_load %[[VAL_1]](%[[VAL_32]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> @@ -64,12 +64,12 @@ ! CHECK: %[[VAL_14:.*]] = arith.subi %[[VAL_12]], %[[VAL_8]] : index ! CHECK: %[[VAL_15:.*]] = arith.addi %[[VAL_14]], %[[VAL_10]] : index ! CHECK: %[[VAL_16:.*]] = arith.divsi %[[VAL_15]], %[[VAL_10]] : index -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_13]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_13]]) : index ! CHECK: %[[VAL_18:.*]] = arith.select %[[VAL_17]], %[[VAL_16]], %[[VAL_13]] : index ! CHECK: %[[VAL_19:.*]] = fir.shape %[[VAL_5]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_20:.*]] = fir.slice %[[VAL_8]], %[[VAL_12]], %[[VAL_10]] : (index, index, index) -> !fir.slice<1> ! CHECK: %[[VAL_21:.*]] = fir.array_load %[[VAL_2]](%[[VAL_19]]) {{\[}}%[[VAL_20]]] : (!fir.ref>, !fir.shape<1>, !fir.slice<1>) -> !fir.array<20xi32> -! CHECK: %[[VAL_22:.*]] = arith.cmpi sgt, %[[VAL_18]], %[[VAL_4]] : index +! CHECK: %[[VAL_22:.*]] = arith.cmpi sgt(%[[VAL_18]], %[[VAL_4]]) : index ! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_22]], %[[VAL_4]], %[[VAL_18]] : index ! CHECK: %[[VAL_30:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_32:.*]] = fir.array_load %[[VAL_1]](%[[VAL_30]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> @@ -108,11 +108,11 @@ ! CHECK: %[[VAL_11:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_12:.*]] = fir.shape %[[VAL_7]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_13:.*]] = fir.array_load %[[VAL_3]](%[[VAL_12]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> -! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_6]] : index +! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt(%[[VAL_7]], %[[VAL_6]]) : index ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_6]], %[[VAL_7]] : index ! CHECK: %[[VAL_16:.*]] = fir.shape %[[VAL_6]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_18:.*]] = fir.array_load %[[VAL_2]](%[[VAL_16]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> -! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_4]] : index +! CHECK: %[[VAL_19:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_4]]) : index ! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_19]], %[[VAL_4]], %[[VAL_15]] : index ! CHECK: %[[VAL_27:.*]] = fir.shape %[[VAL_5]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_29:.*]] = fir.array_load %[[VAL_1]](%[[VAL_27]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> @@ -150,11 +150,11 @@ ! CHECK: %[[VAL_9:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_10:.*]] = fir.shape %[[VAL_7]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_11:.*]] = fir.array_load %[[VAL_3]](%[[VAL_10]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> -! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[VAL_6]] : index +! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt(%[[VAL_7]], %[[VAL_6]]) : index ! CHECK: %[[VAL_13:.*]] = arith.select %[[VAL_12]], %[[VAL_6]], %[[VAL_7]] : index ! CHECK: %[[VAL_14:.*]] = fir.shape %[[VAL_6]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_16:.*]] = fir.array_load %[[VAL_2]](%[[VAL_14]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_13]], %[[VAL_5]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_13]], %[[VAL_5]]) : index ! CHECK: %[[VAL_18:.*]] = arith.select %[[VAL_17]], %[[VAL_5]], %[[VAL_13]] : index ! CHECK: %[[VAL_25:.*]] = fir.shape %[[VAL_5]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_27:.*]] = fir.array_load %[[VAL_1]](%[[VAL_25]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array<10xi32> diff --git a/flang/test/Lower/array-expression.f90 b/flang/test/Lower/array-expression.f90 --- a/flang/test/Lower/array-expression.f90 +++ b/flang/test/Lower/array-expression.f90 @@ -117,13 +117,13 @@ ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i32) -> i64 ! CHECK: %[[VAL_7A:.*]] = fir.convert %[[VAL_6]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_7A]], %[[C0]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_7A]], %[[C0]]) : index ! CHECK: %[[VAL_7:.*]] = arith.select %[[CMP]], %[[VAL_7A]], %[[C0]] : index ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_4]] : !fir.ref ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]] : (i32) -> i64 ! CHECK: %[[VAL_10A:.*]] = fir.convert %[[VAL_9]] : (i64) -> index ! CHECK: %[[C0_2:.*]] = arith.constant 0 : index -! CHECK: %[[CMP_2:.*]] = arith.cmpi sgt, %[[VAL_10A]], %[[C0_2]] : index +! CHECK: %[[CMP_2:.*]] = arith.cmpi sgt(%[[VAL_10A]], %[[C0_2]]) : index ! CHECK: %[[VAL_10:.*]] = arith.select %[[CMP_2]], %[[VAL_10A]], %[[C0_2]] : index ! CHECK: %[[VAL_11:.*]] = arith.constant 3 : i64 ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_11]] : (i64) -> index @@ -136,7 +136,7 @@ ! CHECK: %[[VAL_19:.*]] = arith.subi %[[VAL_17]], %[[VAL_12]] : index ! CHECK: %[[VAL_20:.*]] = arith.addi %[[VAL_19]], %[[VAL_14]] : index ! CHECK: %[[VAL_21:.*]] = arith.divsi %[[VAL_20]], %[[VAL_14]] : index -! CHECK: %[[VAL_22:.*]] = arith.cmpi sgt, %[[VAL_21]], %[[VAL_18]] : index +! CHECK: %[[VAL_22:.*]] = arith.cmpi sgt(%[[VAL_21]], %[[VAL_18]]) : index ! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_22]], %[[VAL_21]], %[[VAL_18]] : index ! CHECK: %[[VAL_24:.*]] = fir.shape %[[VAL_7]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_25:.*]] = fir.slice %[[VAL_12]], %[[VAL_17]], %[[VAL_14]] : (index, index, index) -> !fir.slice<1> @@ -224,7 +224,7 @@ ! CHECK: %[[VAL_17:.*]] = arith.subi %[[VAL_15]], %[[VAL_11]] : index ! CHECK: %[[VAL_18:.*]] = arith.addi %[[VAL_17]], %[[VAL_13]] : index ! CHECK: %[[VAL_19:.*]] = arith.divsi %[[VAL_18]], %[[VAL_13]] : index -! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt, %[[VAL_19]], %[[VAL_16]] : index +! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt(%[[VAL_19]], %[[VAL_16]]) : index ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_19]], %[[VAL_16]] : index ! CHECK: %[[VAL_22:.*]] = fir.shape %[[VAL_2]], %[[VAL_3]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_23:.*]] = fir.slice %[[VAL_6]], %[[VAL_7]], %[[VAL_7]], %[[VAL_11]], %[[VAL_15]], %[[VAL_13]] : (i64, index, index, index, index, index) -> !fir.slice<2> @@ -256,13 +256,13 @@ ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (i32) -> i64 ! CHECK: %[[VAL_5A:.*]] = fir.convert %[[VAL_4]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_5A]], %[[C0]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_5A]], %[[C0]]) : index ! CHECK: %[[VAL_5:.*]] = arith.select %[[CMP]], %[[VAL_5A]], %[[C0]] : index ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_7:.*]] = fir.convert %[[VAL_6]] : (i32) -> i64 ! CHECK: %[[VAL_8A:.*]] = fir.convert %[[VAL_7]] : (i64) -> index ! CHECK: %[[C0_2:.*]] = arith.constant 0 : index -! CHECK: %[[CMP_2:.*]] = arith.cmpi sgt, %[[VAL_8A]], %[[C0_2]] : index +! CHECK: %[[CMP_2:.*]] = arith.cmpi sgt(%[[VAL_8A]], %[[C0_2]]) : index ! CHECK: %[[VAL_8:.*]] = arith.select %[[CMP_2]], %[[VAL_8A]], %[[C0_2]] : index ! CHECK: %[[VAL_9:.*]] = fir.shape %[[VAL_5]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_10:.*]] = fir.array_load %[[VAL_0]](%[[VAL_9]]) : (!fir.ref>, !fir.shape<1>) -> !fir.array @@ -611,7 +611,7 @@ ! CHECK: %[[VAL_9:.*]] = arith.subi %[[VAL_7]], %[[VAL_1]] : index ! CHECK: %[[VAL_10:.*]] = arith.addi %[[VAL_9]], %[[VAL_3]] : index ! CHECK: %[[VAL_11:.*]] = arith.divsi %[[VAL_10]], %[[VAL_3]] : index -! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt, %[[VAL_11]], %[[VAL_8]] : index +! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt(%[[VAL_11]], %[[VAL_8]]) : index ! CHECK: %[[VAL_13:.*]] = arith.select %[[VAL_12]], %[[VAL_11]], %[[VAL_8]] : index ! CHECK: %[[VAL_14:.*]] = fir.slice %[[VAL_1]], %[[VAL_7]], %[[VAL_3]] : (index, index, index) -> !fir.slice<1> ! CHECK: %[[VAL_15:.*]] = fir.array_load %[[VAL_0]] {{\[}}%[[VAL_14]]] : (!fir.box>, !fir.slice<1>) -> !fir.array @@ -691,7 +691,7 @@ ! CHECK: %[[VAL_19:.*]] = fir.array_access %[[VAL_12]], %[[VAL_17]] : (!fir.array<20x!fir.char<2,10>>, index) -> !fir.ref> ! CHECK: %[[VAL_20:.*]] = fir.array_access %[[VAL_18]], %[[VAL_17]] : (!fir.array<20x!fir.char<2,8>>, index) -> !fir.ref> ! CHECK: %[[VAL_21:.*]] = arith.constant 8 : index -! CHECK: %[[VAL_22:.*]] = arith.cmpi slt, %[[VAL_21]], %[[VAL_6]] : index +! CHECK: %[[VAL_22:.*]] = arith.cmpi slt(%[[VAL_21]], %[[VAL_6]]) : index ! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_22]], %[[VAL_21]], %[[VAL_6]] : index ! CHECK: %[[VAL_24:.*]] = arith.constant 2 : i64 ! CHECK: %[[VAL_25:.*]] = fir.convert %[[VAL_23]] : (index) -> i64 @@ -733,7 +733,7 @@ ! CHECK: %[[VAL_7:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<4>) -> (!fir.ref>, index) ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_9:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt, %[[VAL_8]], %[[VAL_9]] : i32 +! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt(%[[VAL_8]], %[[VAL_9]]) : i32 ! CHECK: %[[VAL_11:.*]] = arith.select %[[VAL_10]], %[[VAL_8]], %[[VAL_9]] : i32 ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_7]]#0 : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_13:.*]] = arith.constant 30 : index @@ -748,7 +748,7 @@ ! CHECK: %[[VAL_24:.*]] = fir.array_access %[[VAL_17]], %[[VAL_22]] : (!fir.array<30x!fir.char<4,10>>, index) -> !fir.ref> ! CHECK: %[[VAL_25:.*]] = fir.array_access %[[VAL_23]], %[[VAL_22]] typeparams %[[VAL_11]] : (!fir.array<30x!fir.char<4,?>>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_11]] : (i32) -> index -! CHECK: %[[VAL_27:.*]] = arith.cmpi slt, %[[VAL_26]], %[[VAL_4]] : index +! CHECK: %[[VAL_27:.*]] = arith.cmpi slt(%[[VAL_26]], %[[VAL_4]]) : index ! CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_26]], %[[VAL_4]] : index ! CHECK: %[[VAL_29:.*]] = arith.constant 4 : i64 ! CHECK: %[[VAL_30:.*]] = fir.convert %[[VAL_28]] : (index) -> i64 @@ -787,14 +787,14 @@ ! CHECK: %[[VAL_4:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt, %[[VAL_5]], %[[VAL_6]] : i32 +! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt(%[[VAL_5]], %[[VAL_6]]) : i32 ! CHECK: %[[VAL_8:.*]] = arith.select %[[VAL_7]], %[[VAL_5]], %[[VAL_6]] : i32 ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_4]]#0 : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_10:.*]] = arith.constant 40 : index ! CHECK: %[[VAL_11:.*]]:2 = fir.unboxchar %[[VAL_1]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_13:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_13]] : i32 +! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_13]]) : i32 ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_12]], %[[VAL_13]] : i32 ! CHECK: %[[VAL_16:.*]] = fir.convert %[[VAL_11]]#0 : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_17:.*]] = arith.constant 40 : index @@ -810,7 +810,7 @@ ! CHECK: %[[VAL_29:.*]] = fir.array_access %[[VAL_27]], %[[VAL_26]] typeparams %[[VAL_8]] : (!fir.array<40x!fir.char<1,?>>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_30:.*]] = fir.convert %[[VAL_8]] : (i32) -> index ! CHECK: %[[VAL_31:.*]] = fir.convert %[[VAL_15]] : (i32) -> index -! CHECK: %[[VAL_32:.*]] = arith.cmpi slt, %[[VAL_30]], %[[VAL_31]] : index +! CHECK: %[[VAL_32:.*]] = arith.cmpi slt(%[[VAL_30]], %[[VAL_31]]) : index ! CHECK: %[[VAL_33:.*]] = arith.select %[[VAL_32]], %[[VAL_30]], %[[VAL_31]] : index ! CHECK: %[[VAL_34:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_35:.*]] = fir.convert %[[VAL_33]] : (index) -> i64 @@ -862,7 +862,7 @@ ! CHECK: %[[VAL_15:.*]] = fir.do_loop %[[VAL_16:.*]] = %[[VAL_13]] to %[[VAL_14]] step %[[VAL_12]] unordered iter_args(%[[VAL_17:.*]] = %[[VAL_9]]) -> (!fir.array<50x!fir.char<1,?>>) { ! CHECK: %[[VAL_18:.*]] = fir.array_access %[[VAL_11]], %[[VAL_16]] typeparams %[[VAL_5]]#1 : (!fir.array<50x!fir.char<1,?>>, index, index) -> !fir.ref> ! CHECK: %[[VAL_19:.*]] = fir.array_access %[[VAL_17]], %[[VAL_16]] typeparams %[[VAL_2]]#1 : (!fir.array<50x!fir.char<1,?>>, index, index) -> !fir.ref> -! CHECK: %[[VAL_20:.*]] = arith.cmpi slt, %[[VAL_2]]#1, %[[VAL_5]]#1 : index +! CHECK: %[[VAL_20:.*]] = arith.cmpi slt(%[[VAL_2]]#1, %[[VAL_5]]#1) : index ! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_20]], %[[VAL_2]]#1, %[[VAL_5]]#1 : index ! CHECK: %[[VAL_22:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_23:.*]] = fir.convert %[[VAL_21]] : (index) -> i64 @@ -935,7 +935,7 @@ ! CHECK: fir.store %[[VAL_35]] to %[[VAL_37]] : !fir.ref> ! CHECK: } ! CHECK: %[[VAL_38:.*]] = fir.array_access %[[VAL_19]], %[[VAL_18]] typeparams %[[VAL_2]]#1 : (!fir.array<60x!fir.char<1,?>>, index, index) -> !fir.ref> -! CHECK: %[[VAL_39:.*]] = arith.cmpi slt, %[[VAL_2]]#1, %[[VAL_21]] : index +! CHECK: %[[VAL_39:.*]] = arith.cmpi slt(%[[VAL_2]]#1, %[[VAL_21]]) : index ! CHECK: %[[VAL_40:.*]] = arith.select %[[VAL_39]], %[[VAL_2]]#1, %[[VAL_21]] : index ! CHECK: %[[VAL_41:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_42:.*]] = fir.convert %[[VAL_40]] : (index) -> i64 @@ -977,7 +977,7 @@ ! CHECK: %[[VAL_7:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<4>) -> (!fir.ref>, index) ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_9:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt, %[[VAL_8]], %[[VAL_9]] : i32 +! CHECK: %[[VAL_10:.*]] = arith.cmpi sgt(%[[VAL_8]], %[[VAL_9]]) : i32 ! CHECK: %[[VAL_11:.*]] = arith.select %[[VAL_10]], %[[VAL_8]], %[[VAL_9]] : i32 ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_7]]#0 : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_13:.*]] = arith.constant 70 : index @@ -1001,7 +1001,7 @@ ! CHECK: %[[VAL_30:.*]] = fir.do_loop %[[VAL_31:.*]] = %[[VAL_28]] to %[[VAL_29]] step %[[VAL_27]] unordered iter_args(%[[VAL_32:.*]] = %[[VAL_15]]) -> (!fir.array<70x!fir.char<4,?>>) { ! CHECK: %[[VAL_33:.*]] = fir.array_access %[[VAL_24]], %[[VAL_31]] : (!fir.array<140x!fir.char<2,13>>, index) -> !fir.ref> ! CHECK: %[[VAL_34:.*]] = fir.alloca !fir.char<4,?>(%[[VAL_4]] : index) -! CHECK: %[[VAL_35:.*]] = arith.cmpi slt, %[[VAL_4]], %[[VAL_4]] : index +! CHECK: %[[VAL_35:.*]] = arith.cmpi slt(%[[VAL_4]], %[[VAL_4]]) : index ! CHECK: %[[VAL_36:.*]] = arith.select %[[VAL_35]], %[[VAL_4]], %[[VAL_4]] : index ! CHECK: fir.char_convert %[[VAL_33]] for %[[VAL_36]] to %[[VAL_34]] : !fir.ref>, index, !fir.ref> ! CHECK: %[[VAL_37:.*]] = arith.constant 1 : index @@ -1018,7 +1018,7 @@ ! CHECK: %[[VAL_46:.*]] = fir.array_access %[[VAL_32]], %[[VAL_31]] typeparams %[[VAL_11]] : (!fir.array<70x!fir.char<4,?>>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_47:.*]] = fir.convert %[[VAL_11]] : (i32) -> index ! CHECK: %[[VAL_48:.*]] = fir.convert %[[VAL_26]] : (i64) -> index -! CHECK: %[[VAL_49:.*]] = arith.cmpi slt, %[[VAL_47]], %[[VAL_48]] : index +! CHECK: %[[VAL_49:.*]] = arith.cmpi slt(%[[VAL_47]], %[[VAL_48]]) : index ! CHECK: %[[VAL_50:.*]] = arith.select %[[VAL_49]], %[[VAL_47]], %[[VAL_48]] : index ! CHECK: %[[VAL_51:.*]] = arith.constant 4 : i64 ! CHECK: %[[VAL_52:.*]] = fir.convert %[[VAL_50]] : (index) -> i64 @@ -1057,7 +1057,7 @@ ! CHECK: %[[VAL_4:.*]]:2 = fir.unboxchar %[[VAL_0]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt, %[[VAL_5]], %[[VAL_6]] : i32 +! CHECK: %[[VAL_7:.*]] = arith.cmpi sgt(%[[VAL_5]], %[[VAL_6]]) : i32 ! CHECK: %[[VAL_8:.*]] = arith.select %[[VAL_7]], %[[VAL_5]], %[[VAL_6]] : i32 ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_4]]#0 : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_10:.*]] = arith.constant 70 : index @@ -1067,7 +1067,7 @@ ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_13]] : (i32) -> i64 ! CHECK: %[[VAL_15A:.*]] = fir.convert %[[VAL_14]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_15A]], %[[C0]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_15A]], %[[C0]]) : index ! CHECK: %[[VAL_15:.*]] = arith.select %[[CMP]], %[[VAL_15A]], %[[C0]] : index ! CHECK: %[[VAL_16:.*]] = fir.shape %[[VAL_10]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_17:.*]] = fir.array_load %[[VAL_9]](%[[VAL_16]]) typeparams %[[VAL_8]] : (!fir.ref>>, !fir.shape<1>, i32) -> !fir.array<70x!fir.char<1,?>> @@ -1087,7 +1087,7 @@ ! CHECK: %[[VAL_33:.*]] = fir.array_access %[[VAL_26]], %[[VAL_31]] typeparams %[[VAL_11]]#1 : (!fir.array>, index, index) -> !fir.ref> ! CHECK: %[[VAL_34:.*]] = fir.array_access %[[VAL_32]], %[[VAL_31]] typeparams %[[VAL_8]] : (!fir.array<70x!fir.char<1,?>>, index, i32) -> !fir.ref> ! CHECK: %[[VAL_35:.*]] = fir.convert %[[VAL_8]] : (i32) -> index -! CHECK: %[[VAL_36:.*]] = arith.cmpi slt, %[[VAL_35]], %[[VAL_11]]#1 : index +! CHECK: %[[VAL_36:.*]] = arith.cmpi slt(%[[VAL_35]], %[[VAL_11]]#1) : index ! CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_36]], %[[VAL_35]], %[[VAL_11]]#1 : index ! CHECK: %[[VAL_38:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_39:.*]] = fir.convert %[[VAL_37]] : (index) -> i64 diff --git a/flang/test/Lower/array-substring.f90 b/flang/test/Lower/array-substring.f90 --- a/flang/test/Lower/array-substring.f90 +++ b/flang/test/Lower/array-substring.f90 @@ -15,7 +15,7 @@ ! CHECK: %[[VAL_11:.*]] = fir.address_of(@_QQ{{.*}}) : !fir.ref>> ! CHECK: br ^bb1(%[[VAL_2]], %[[VAL_1]] : index, index) ! CHECK: ^bb1(%[[VAL_12:.*]]: index, %[[VAL_13:.*]]: index): -! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt, %[[VAL_13]], %[[VAL_2]] : index +! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt(%[[VAL_13]], %[[VAL_2]]) : index ! CHECK: cond_br %[[VAL_14]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_15:.*]] = arith.addi %[[VAL_12]], %[[VAL_1]] : index @@ -28,7 +28,7 @@ ! CHECK: %[[VAL_22:.*]] = fir.convert %[[VAL_20]] : (!fir.ref>) -> !fir.ref ! CHECK: %[[VAL_23:.*]] = fir.convert %[[VAL_4]] : (index) -> i64 ! CHECK: %[[VAL_24:.*]] = fir.call @_FortranACharacterCompareScalar1(%[[VAL_21]], %[[VAL_22]], %[[VAL_23]], %[[VAL_5]]) : (!fir.ref, !fir.ref, i64, i64) -> i32 -! CHECK: %[[VAL_25:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_3]] : i32 +! CHECK: %[[VAL_25:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_3]]) : i32 ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i1) -> !fir.logical<4> ! CHECK: %[[VAL_27:.*]] = fir.array_coor %[[VAL_8]](%[[VAL_9]]) %[[VAL_15]] : (!fir.ref>>, !fir.shape<1>, index) -> !fir.ref> ! CHECK: fir.store %[[VAL_26]] to %[[VAL_27]] : !fir.ref> @@ -44,5 +44,5 @@ logical :: test(1) character*12 C(1) - test = C(1:1)(1:8) == (/'ABCDabcd'/) + test = C(1:1)(1:8) == (/'ABCDabcd'/) end function test diff --git a/flang/test/Lower/array-temp.f90 b/flang/test/Lower/array-temp.f90 --- a/flang/test/Lower/array-temp.f90 +++ b/flang/test/Lower/array-temp.f90 @@ -53,14 +53,14 @@ ! CHECK-DAG: %[[VAL_8:.*]] = arith.constant -1 : i32 ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_11A:.*]] = fir.convert %[[VAL_10]] : (i32) -> index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_11A]], %[[VAL_4]] : index -! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_4]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_11A]], %[[VAL_4]]) : index +! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_4]] : index ! CHECK: %[[VAL_12:.*]] = fir.alloca !fir.array, %[[VAL_11]] {bindc_name = "aa", uniq_name = "_QFss2Eaa"} ! CHECK: %[[VAL_13:.*]] = fir.shape %[[VAL_11]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_2]] : (i32) -> f32 ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_11]] : index, index) ! CHECK: ^bb1(%[[VAL_15:.*]]: index, %[[VAL_16:.*]]: index): -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_4]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_17]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_18:.*]] = arith.addi %[[VAL_15]], %[[VAL_3]] : index @@ -72,13 +72,13 @@ ! CHECK: %[[VAL_21:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_22:.*]] = fir.convert %[[VAL_21]] : (i32) -> index ! CHECK: %[[VAL_23:.*]] = arith.addi %[[VAL_22]], %[[VAL_1]] : index -! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt, %[[VAL_23]], %[[VAL_4]] : index +! CHECK: %[[VAL_24:.*]] = arith.cmpi sgt(%[[VAL_23]], %[[VAL_4]]) : index ! CHECK: %[[VAL_25:.*]] = arith.select %[[VAL_24]], %[[VAL_23]], %[[VAL_4]] : index ! CHECK: %[[VAL_26:.*]] = fir.slice %[[VAL_5]], %[[VAL_22]], %[[VAL_3]] : (index, index, index) -> !fir.slice<1> ! CHECK: %[[VAL_27:.*]] = fir.allocmem !fir.array, %[[VAL_11]] ! CHECK: br ^bb4(%[[VAL_4]], %[[VAL_11]] : index, index) ! CHECK: ^bb4(%[[VAL_28:.*]]: index, %[[VAL_29:.*]]: index): -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_4]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_30]], ^bb5, ^bb6 ! CHECK: ^bb5: ! CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_28]], %[[VAL_3]] : index @@ -94,7 +94,7 @@ ! CHECK: %[[VAL_38:.*]] = fir.slice %[[VAL_3]], %[[VAL_37]], %[[VAL_3]] : (index, index, index) -> !fir.slice<1> ! CHECK: br ^bb7(%[[VAL_4]], %[[VAL_25]] : index, index) ! CHECK: ^bb7(%[[VAL_39:.*]]: index, %[[VAL_40:.*]]: index): -! CHECK: %[[VAL_41:.*]] = arith.cmpi sgt, %[[VAL_40]], %[[VAL_4]] : index +! CHECK: %[[VAL_41:.*]] = arith.cmpi sgt(%[[VAL_40]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_41]], ^bb8, ^bb9(%[[VAL_4]], %[[VAL_11]] : index, index) ! CHECK: ^bb8: ! CHECK: %[[VAL_42:.*]] = arith.addi %[[VAL_39]], %[[VAL_3]] : index @@ -106,7 +106,7 @@ ! CHECK: %[[VAL_47:.*]] = arith.subi %[[VAL_40]], %[[VAL_3]] : index ! CHECK: br ^bb7(%[[VAL_42]], %[[VAL_47]] : index, index) ! CHECK: ^bb9(%[[VAL_48:.*]]: index, %[[VAL_49:.*]]: index): -! CHECK: %[[VAL_50:.*]] = arith.cmpi sgt, %[[VAL_49]], %[[VAL_4]] : index +! CHECK: %[[VAL_50:.*]] = arith.cmpi sgt(%[[VAL_49]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_50]], ^bb10, ^bb11 ! CHECK: ^bb10: ! CHECK: %[[VAL_51:.*]] = arith.addi %[[VAL_48]], %[[VAL_3]] : index @@ -147,17 +147,17 @@ ! CHECK-DAG: %[[VAL_8:.*]] = arith.constant -1 : i32 ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (i32) -> index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_11A]], %[[VAL_5]] : index -! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_5]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_11A]], %[[VAL_5]]) : index +! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_5]] : index ! CHECK: %[[VAL_12:.*]] = fir.alloca !fir.array<2x?xf32>, %[[VAL_11]] {bindc_name = "aa", uniq_name = "_QFss3Eaa"} ! CHECK: %[[VAL_13:.*]] = fir.shape %[[VAL_2]], %[[VAL_11]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_4]] : (i32) -> f32 ! CHECK: br ^bb1(%[[VAL_5]], %[[VAL_11]] : index, index) ! CHECK: ^bb1(%[[VAL_15:.*]]: index, %[[VAL_16:.*]]: index): -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_5]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_17]], ^bb2(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb5 ! CHECK: ^bb2(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): -! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt, %[[VAL_19]], %[[VAL_5]] : index +! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt(%[[VAL_19]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_20]], ^bb3, ^bb4 ! CHECK: ^bb3: ! CHECK: %[[VAL_21:.*]] = arith.addi %[[VAL_18]], %[[VAL_3]] : index @@ -174,16 +174,16 @@ ! CHECK: %[[VAL_27:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_28:.*]] = fir.convert %[[VAL_27]] : (i32) -> index ! CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_28]], %[[VAL_1]] : index -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_5]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_5]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_5]] : index ! CHECK: %[[VAL_32:.*]] = fir.slice %[[VAL_3]], %[[VAL_2]], %[[VAL_3]], %[[VAL_2]], %[[VAL_28]], %[[VAL_3]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: %[[VAL_33:.*]] = fir.allocmem !fir.array<2x?xf32>, %[[VAL_11]] ! CHECK: br ^bb6(%[[VAL_5]], %[[VAL_11]] : index, index) ! CHECK: ^bb6(%[[VAL_34:.*]]: index, %[[VAL_35:.*]]: index): -! CHECK: %[[VAL_36:.*]] = arith.cmpi sgt, %[[VAL_35]], %[[VAL_5]] : index +! CHECK: %[[VAL_36:.*]] = arith.cmpi sgt(%[[VAL_35]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_36]], ^bb7(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb10 ! CHECK: ^bb7(%[[VAL_37:.*]]: index, %[[VAL_38:.*]]: index): -! CHECK: %[[VAL_39:.*]] = arith.cmpi sgt, %[[VAL_38]], %[[VAL_5]] : index +! CHECK: %[[VAL_39:.*]] = arith.cmpi sgt(%[[VAL_38]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_39]], ^bb8, ^bb9 ! CHECK: ^bb8: ! CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_37]], %[[VAL_3]] : index @@ -204,10 +204,10 @@ ! CHECK: %[[VAL_50:.*]] = fir.slice %[[VAL_3]], %[[VAL_2]], %[[VAL_3]], %[[VAL_3]], %[[VAL_49]], %[[VAL_3]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: br ^bb11(%[[VAL_5]], %[[VAL_31]] : index, index) ! CHECK: ^bb11(%[[VAL_51:.*]]: index, %[[VAL_52:.*]]: index): -! CHECK: %[[VAL_53:.*]] = arith.cmpi sgt, %[[VAL_52]], %[[VAL_5]] : index +! CHECK: %[[VAL_53:.*]] = arith.cmpi sgt(%[[VAL_52]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_53]], ^bb12(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb15(%[[VAL_5]], %[[VAL_11]] : index, index) ! CHECK: ^bb12(%[[VAL_54:.*]]: index, %[[VAL_55:.*]]: index): -! CHECK: %[[VAL_56:.*]] = arith.cmpi sgt, %[[VAL_55]], %[[VAL_5]] : index +! CHECK: %[[VAL_56:.*]] = arith.cmpi sgt(%[[VAL_55]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_56]], ^bb13, ^bb14 ! CHECK: ^bb13: ! CHECK: %[[VAL_57:.*]] = arith.addi %[[VAL_54]], %[[VAL_3]] : index @@ -224,10 +224,10 @@ ! CHECK: %[[VAL_65:.*]] = arith.subi %[[VAL_52]], %[[VAL_3]] : index ! CHECK: br ^bb11(%[[VAL_64]], %[[VAL_65]] : index, index) ! CHECK: ^bb15(%[[VAL_66:.*]]: index, %[[VAL_67:.*]]: index): -! CHECK: %[[VAL_68:.*]] = arith.cmpi sgt, %[[VAL_67]], %[[VAL_5]] : index +! CHECK: %[[VAL_68:.*]] = arith.cmpi sgt(%[[VAL_67]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_68]], ^bb16(%[[VAL_5]], %[[VAL_2]] : index, index), ^bb19 ! CHECK: ^bb16(%[[VAL_69:.*]]: index, %[[VAL_70:.*]]: index): -! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt, %[[VAL_70]], %[[VAL_5]] : index +! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt(%[[VAL_70]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_71]], ^bb17, ^bb18 ! CHECK: ^bb17: ! CHECK: %[[VAL_72:.*]] = arith.addi %[[VAL_69]], %[[VAL_3]] : index @@ -273,17 +273,17 @@ ! CHECK-DAG: %[[VAL_8:.*]] = arith.constant -1 : i32 ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_11A:.*]] = fir.convert %[[VAL_10]] : (i32) -> index -! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_11A]], %[[VAL_5]] : index -! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_5]] : index +! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_11A]], %[[VAL_5]]) : index +! CHECK: %[[VAL_11:.*]] = arith.select %[[CMP]], %[[VAL_11A]], %[[VAL_5]] : index ! CHECK: %[[VAL_12:.*]] = fir.alloca !fir.array, %[[VAL_11]] {bindc_name = "aa", uniq_name = "_QFss4Eaa"} ! CHECK: %[[VAL_13:.*]] = fir.shape %[[VAL_11]], %[[VAL_2]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_4]] : (i32) -> f32 ! CHECK: br ^bb1(%[[VAL_5]], %[[VAL_2]] : index, index) ! CHECK: ^bb1(%[[VAL_15:.*]]: index, %[[VAL_16:.*]]: index): -! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_5]] : index +! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_17]], ^bb2(%[[VAL_5]], %[[VAL_11]] : index, index), ^bb5 ! CHECK: ^bb2(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): -! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt, %[[VAL_19]], %[[VAL_5]] : index +! CHECK: %[[VAL_20:.*]] = arith.cmpi sgt(%[[VAL_19]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_20]], ^bb3, ^bb4 ! CHECK: ^bb3: ! CHECK: %[[VAL_21:.*]] = arith.addi %[[VAL_18]], %[[VAL_3]] : index @@ -300,16 +300,16 @@ ! CHECK: %[[VAL_27:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_28:.*]] = fir.convert %[[VAL_27]] : (i32) -> index ! CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_28]], %[[VAL_1]] : index -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_5]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_5]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_5]] : index ! CHECK: %[[VAL_32:.*]] = fir.slice %[[VAL_2]], %[[VAL_28]], %[[VAL_3]], %[[VAL_3]], %[[VAL_2]], %[[VAL_3]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: %[[VAL_33:.*]] = fir.allocmem !fir.array, %[[VAL_11]] ! CHECK: br ^bb6(%[[VAL_5]], %[[VAL_2]] : index, index) ! CHECK: ^bb6(%[[VAL_34:.*]]: index, %[[VAL_35:.*]]: index): -! CHECK: %[[VAL_36:.*]] = arith.cmpi sgt, %[[VAL_35]], %[[VAL_5]] : index +! CHECK: %[[VAL_36:.*]] = arith.cmpi sgt(%[[VAL_35]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_36]], ^bb7(%[[VAL_5]], %[[VAL_11]] : index, index), ^bb10 ! CHECK: ^bb7(%[[VAL_37:.*]]: index, %[[VAL_38:.*]]: index): -! CHECK: %[[VAL_39:.*]] = arith.cmpi sgt, %[[VAL_38]], %[[VAL_5]] : index +! CHECK: %[[VAL_39:.*]] = arith.cmpi sgt(%[[VAL_38]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_39]], ^bb8, ^bb9 ! CHECK: ^bb8: ! CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_37]], %[[VAL_3]] : index @@ -330,10 +330,10 @@ ! CHECK: %[[VAL_50:.*]] = fir.slice %[[VAL_3]], %[[VAL_49]], %[[VAL_3]], %[[VAL_3]], %[[VAL_2]], %[[VAL_3]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: br ^bb11(%[[VAL_5]], %[[VAL_2]] : index, index) ! CHECK: ^bb11(%[[VAL_51:.*]]: index, %[[VAL_52:.*]]: index): -! CHECK: %[[VAL_53:.*]] = arith.cmpi sgt, %[[VAL_52]], %[[VAL_5]] : index +! CHECK: %[[VAL_53:.*]] = arith.cmpi sgt(%[[VAL_52]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_53]], ^bb12(%[[VAL_5]], %[[VAL_31]] : index, index), ^bb15(%[[VAL_5]], %[[VAL_2]] : index, index) ! CHECK: ^bb12(%[[VAL_54:.*]]: index, %[[VAL_55:.*]]: index): -! CHECK: %[[VAL_56:.*]] = arith.cmpi sgt, %[[VAL_55]], %[[VAL_5]] : index +! CHECK: %[[VAL_56:.*]] = arith.cmpi sgt(%[[VAL_55]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_56]], ^bb13, ^bb14 ! CHECK: ^bb13: ! CHECK: %[[VAL_57:.*]] = arith.addi %[[VAL_54]], %[[VAL_3]] : index @@ -350,10 +350,10 @@ ! CHECK: %[[VAL_65:.*]] = arith.subi %[[VAL_52]], %[[VAL_3]] : index ! CHECK: br ^bb11(%[[VAL_64]], %[[VAL_65]] : index, index) ! CHECK: ^bb15(%[[VAL_66:.*]]: index, %[[VAL_67:.*]]: index): -! CHECK: %[[VAL_68:.*]] = arith.cmpi sgt, %[[VAL_67]], %[[VAL_5]] : index +! CHECK: %[[VAL_68:.*]] = arith.cmpi sgt(%[[VAL_67]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_68]], ^bb16(%[[VAL_5]], %[[VAL_11]] : index, index), ^bb19 ! CHECK: ^bb16(%[[VAL_69:.*]]: index, %[[VAL_70:.*]]: index): -! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt, %[[VAL_70]], %[[VAL_5]] : index +! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt(%[[VAL_70]], %[[VAL_5]]) : index ! CHECK: cond_br %[[VAL_71]], ^bb17, ^bb18 ! CHECK: ^bb17: ! CHECK: %[[VAL_72:.*]] = arith.addi %[[VAL_69]], %[[VAL_3]] : index diff --git a/flang/test/Lower/array-user-def-assignments.f90 b/flang/test/Lower/array-user-def-assignments.f90 --- a/flang/test/Lower/array-user-def-assignments.f90 +++ b/flang/test/Lower/array-user-def-assignments.f90 @@ -74,7 +74,7 @@ ! CHECK: %[[VAL_17:.*]] = arith.subi %[[VAL_2]], %[[VAL_15]] : index ! CHECK: %[[VAL_18:.*]] = fir.do_loop %[[VAL_19:.*]] = %[[VAL_16]] to %[[VAL_17]] step %[[VAL_15]] unordered iter_args(%[[VAL_20:.*]] = %[[VAL_4]]) -> (!fir.array<100xf32>) { ! CHECK: %[[VAL_21:.*]] = fir.array_fetch %[[VAL_13]], %[[VAL_19]] : (!fir.array<100xf32>, index) -> f32 -! CHECK: %[[VAL_22:.*]] = arith.cmpf olt, %[[VAL_21]], %[[VAL_14]] : f32 +! CHECK: %[[VAL_22:.*]] = arith.cmpf olt(%[[VAL_21]], %[[VAL_14]]) : f32 ! CHECK: %[[VAL_23:.*]]:2 = fir.array_modify %[[VAL_20]], %[[VAL_19]] : (!fir.array<100xf32>, index) -> (!fir.ref, !fir.array<100xf32>) ! CHECK: %[[VAL_24:.*]] = fir.convert %[[VAL_22]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[VAL_24]] to %[[VAL_1]] : !fir.ref> @@ -262,7 +262,7 @@ ! CHECK: %[[VAL_20:.*]] = arith.subi %[[VAL_19]], %[[VAL_16]] : index ! CHECK-DAG: %[[VAL_21:.*]] = arith.constant 0.000000e+00 : f32 ! CHECK-DAG: %[[VAL_22:.*]] = fir.array_fetch %[[VAL_11]], %[[VAL_20]] : (!fir.array<10xf32>, index) -> f32 -! CHECK: %[[VAL_23:.*]] = arith.cmpf olt, %[[VAL_22]], %[[VAL_21]] : f32 +! CHECK: %[[VAL_23:.*]] = arith.cmpf olt(%[[VAL_22]], %[[VAL_21]]) : f32 ! CHECK: %[[VAL_24:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_25:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_25]] : (i32) -> i64 @@ -366,7 +366,7 @@ ! CHECK: %[[VAL_38:.*]] = fir.convert %[[VAL_37]] : (!fir.logical<4>) -> i1 ! CHECK: %[[VAL_39:.*]] = fir.if %[[VAL_38]] -> (!fir.array<10xf32>) { ! CHECK: %[[VAL_40:.*]] = fir.array_fetch %[[VAL_26]], %[[VAL_32]] : (!fir.array<10xf32>, index) -> f32 -! CHECK: %[[VAL_41:.*]] = arith.cmpf olt, %[[VAL_40]], %[[VAL_27]] : f32 +! CHECK: %[[VAL_41:.*]] = arith.cmpf olt(%[[VAL_40]], %[[VAL_27]]) : f32 ! CHECK: %[[VAL_42:.*]]:2 = fir.array_modify %[[VAL_33]], %[[VAL_32]] : (!fir.array<10xf32>, index) -> (!fir.ref, !fir.array<10xf32>) ! CHECK: %[[VAL_43:.*]] = fir.convert %[[VAL_41]] : (i1) -> !fir.logical<4> ! CHECK: fir.store %[[VAL_43]] to %[[VAL_3]] : !fir.ref> @@ -451,7 +451,7 @@ ! CHECK: %[[VAL_27:.*]] = fir.box_addr %[[VAL_26]] : (!fir.box>) -> !fir.heap ! CHECK: %[[VAL_28:.*]] = fir.convert %[[VAL_27]] : (!fir.heap) -> i64 ! CHECK: %[[VAL_29:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_30:.*]] = arith.cmpi ne, %[[VAL_28]], %[[VAL_29]] : i64 +! CHECK: %[[VAL_30:.*]] = arith.cmpi ne(%[[VAL_28]], %[[VAL_29]]) : i64 ! CHECK: fir.if %[[VAL_30]] { ! CHECK: fir.freemem %[[VAL_27]] : !fir.heap ! CHECK: } @@ -548,7 +548,7 @@ ! CHECK: %[[VAL_27:.*]] = arith.subi %[[VAL_25]], %[[VAL_17]] : index ! CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_27]], %[[VAL_23]] : index ! CHECK: %[[VAL_29:.*]] = arith.divsi %[[VAL_28]], %[[VAL_23]] : index -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_26]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_26]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_26]] : index ! CHECK: %[[VAL_32:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_33:.*]] = fir.load %[[VAL_3]] : !fir.ref @@ -711,7 +711,7 @@ ! CHECK: %[[VAL_26:.*]] = arith.subi %[[VAL_24]], %[[VAL_16]] : index ! CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_26]], %[[VAL_22]] : index ! CHECK: %[[VAL_28:.*]] = arith.divsi %[[VAL_27]], %[[VAL_22]] : index -! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt, %[[VAL_28]], %[[VAL_25]] : index +! CHECK: %[[VAL_29:.*]] = arith.cmpi sgt(%[[VAL_28]], %[[VAL_25]]) : index ! CHECK: %[[VAL_30:.*]] = arith.select %[[VAL_29]], %[[VAL_28]], %[[VAL_25]] : index ! CHECK: %[[VAL_31:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_32:.*]] = fir.load %[[VAL_2]] : !fir.ref @@ -775,7 +775,7 @@ ! CHECK: %[[VAL_27:.*]] = arith.subi %[[VAL_25]], %[[VAL_17]] : index ! CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_27]], %[[VAL_23]] : index ! CHECK: %[[VAL_29:.*]] = arith.divsi %[[VAL_28]], %[[VAL_23]] : index -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_26]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_26]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_26]] : index ! CHECK: %[[VAL_32:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_33:.*]] = fir.load %[[VAL_3]] : !fir.ref diff --git a/flang/test/Lower/associate-construct.f90 b/flang/test/Lower/associate-construct.f90 --- a/flang/test/Lower/associate-construct.f90 +++ b/flang/test/Lower/associate-construct.f90 @@ -43,12 +43,12 @@ associate (x=>i) ! CHECK: [[IVAL:%[0-9]+]] = fir.load [[I]] : !fir.ref ! CHECK: [[TWO:%.*]] = arith.constant 2 : i32 - ! CHECK: arith.cmpi eq, [[IVAL]], [[TWO]] : i32 + ! CHECK: arith.cmpi eq([[IVAL]], [[TWO]]) : i32 ! CHECK: ^bb if (x==2) goto 9 ! CHECK: [[IVAL:%[0-9]+]] = fir.load [[I]] : !fir.ref ! CHECK: [[THREE:%.*]] = arith.constant 3 : i32 - ! CHECK: arith.cmpi eq, [[IVAL]], [[THREE]] : i32 + ! CHECK: arith.cmpi eq([[IVAL]], [[THREE]]) : i32 ! CHECK: ^bb ! CHECK: fir.call @_FortranAStopStatementText ! CHECK: fir.unreachable diff --git a/flang/test/Lower/assumed-shape-caller.f90 b/flang/test/Lower/assumed-shape-caller.f90 --- a/flang/test/Lower/assumed-shape-caller.f90 +++ b/flang/test/Lower/assumed-shape-caller.f90 @@ -59,7 +59,7 @@ end subroutine end interface integer :: v(:) - real :: x(:) + real :: x(:) call takes_box(x(v)) ! CHECK: %[[VAL_2:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_3:.*]] = arith.constant 0 : index @@ -67,7 +67,7 @@ ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_6:.*]]:3 = fir.box_dims %[[VAL_0]], %[[VAL_5]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[VAL_7:.*]] = fir.array_load %[[VAL_0]] : (!fir.box>) -> !fir.array -! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt, %[[VAL_6]]#1, %[[VAL_4]]#1 : index +! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt(%[[VAL_6]]#1, %[[VAL_4]]#1) : index ! CHECK: %[[VAL_9:.*]] = arith.select %[[VAL_8]], %[[VAL_4]]#1, %[[VAL_6]]#1 : index ! CHECK: %[[VAL_10:.*]] = fir.array_load %[[VAL_1]] : (!fir.box>) -> !fir.array ! CHECK: %[[VAL_11:.*]] = fir.allocmem !fir.array, %[[VAL_9]] {uniq_name = ".array.expr"} diff --git a/flang/test/Lower/call-parenthesized-arg.f90 b/flang/test/Lower/call-parenthesized-arg.f90 --- a/flang/test/Lower/call-parenthesized-arg.f90 +++ b/flang/test/Lower/call-parenthesized-arg.f90 @@ -173,8 +173,8 @@ ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> i64 ! CHECK: %[[VAL_6A:.*]] = fir.convert %[[VAL_5]] : (i64) -> index - ! CHECK: %[[C0:.*]] = arith.constant 0 : index - ! CHECK: %[[CMP:.*]] = arith.cmpi sgt, %[[VAL_6A]], %[[C0]] : index + ! CHECK: %[[C0:.*]] = arith.constant 0 : index + ! CHECK: %[[CMP:.*]] = arith.cmpi sgt(%[[VAL_6A]], %[[C0]]) : index ! CHECK: %[[VAL_6:.*]] = arith.select %[[CMP]], %[[VAL_6A]], %[[C0]] : index ! CHECK: %[[VAL_7:.*]] = fir.shape %[[VAL_6]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_8:.*]] = fir.embox %[[VAL_3]](%[[VAL_7]]) : (!fir.ref>>, !fir.shape<1>) -> !fir.box>> diff --git a/flang/test/Lower/character-assignment.f90 b/flang/test/Lower/character-assignment.f90 --- a/flang/test/Lower/character-assignment.f90 +++ b/flang/test/Lower/character-assignment.f90 @@ -8,7 +8,7 @@ ! CHECK: %[[rhs:.*]]:2 = fir.unboxchar %arg1 lhs = rhs ! Compute minimum length - ! CHECK: %[[cmp_len:[0-9]+]] = arith.cmpi slt, %[[lhs:.*]]#1, %[[rhs:.*]]#1 + ! CHECK: %[[cmp_len:[0-9]+]] = arith.cmpi slt(%[[lhs:.*]]#1, %[[rhs:.*]]#1) ! CHECK-NEXT: %[[min_len:[0-9]+]] = arith.select %[[cmp_len]], %[[lhs]]#1, %[[rhs]]#1 ! Copy of rhs into lhs @@ -49,7 +49,7 @@ ! CHECK-DAG: %[[diff:.*]] = arith.subi %[[ubi]], %[[lbi]] ! CHECK-DAG: %[[pre_lhs_len:.*]] = arith.addi %[[diff]], %[[c1]] ! CHECK-DAG: %[[c0:.*]] = arith.constant 0 - ! CHECK-DAG: %[[cmp_len:.*]] = arith.cmpi slt, %[[pre_lhs_len]], %[[c0]] + ! CHECK-DAG: %[[cmp_len:.*]] = arith.cmpi slt(%[[pre_lhs_len]], %[[c0]]) ! CHECK-DAG: %[[lhs_len:.*]] = arith.select %[[cmp_len]], %[[c0]], %[[pre_lhs_len]] @@ -89,7 +89,7 @@ character(n), allocatable :: a(:) ! CHECK: fir.store %{{.*}} to %[[VAL_0]] : !fir.ref>>> ! CHECK: %{{.*}} = fir.load %[[VAL_0]] : !fir.ref>>> - ! CHECK: %[[VAL_1:.*]] = arith.cmpi ne, %{{.*}}, %c0{{.*}} : i64 + ! CHECK: %[[VAL_1:.*]] = arith.cmpi ne(%{{.*}}, %c0{{.*}}) : i64 ! CHECK: %[[VAL_2:.*]]:2 = fir.if %[[VAL_1]] -> (i1, !fir.heap>>) { ! CHECK: %{{.*}} = fir.if %{{.*}} -> (!fir.heap>>) { ! CHECK: %{{.*}} = fir.do_loop %{{.*}} = %c0{{.*}} to %{{.*}} step %c1{{.*}} unordered iter_args(%{{.*}} = %{{.*}}) -> (!fir.array>) { diff --git a/flang/test/Lower/character-compare.f90 b/flang/test/Lower/character-compare.f90 --- a/flang/test/Lower/character-compare.f90 +++ b/flang/test/Lower/character-compare.f90 @@ -5,6 +5,6 @@ character(len=4) c1, c2 logical x ! CHECK: %[[RES:.*]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: cmpi slt, %[[RES]], + ! CHECK: cmpi slt(%[[RES]], x = c1 < c2 end subroutine compare diff --git a/flang/test/Lower/character-elemental.f90 b/flang/test/Lower/character-elemental.f90 --- a/flang/test/Lower/character-elemental.f90 +++ b/flang/test/Lower/character-elemental.f90 @@ -14,7 +14,7 @@ ! CHECK: %[[a4:.*]] = fir.slice {{.*}}, {{.*}}, {{.*}} : (index, index, index) -> !fir.slice<1> ! CHECK: br ^bb1({{.*}}, {{.*}} : index, index) ! CHECK: ^bb1(%[[a5:.*]]: index, %[[a6:.*]]: index): // 2 preds: ^bb0, ^bb2 - ! CHECK: %[[a7:.*]] = arith.cmpi sgt, %[[a6]], {{.*}} : index + ! CHECK: %[[a7:.*]] = arith.cmpi sgt(%[[a6]], {{.*}}) : index ! CHECK: cond_br %[[a7]], ^bb2, ^bb3 ! CHECK: ^bb2: // pred: ^bb1 ! CHECK: %[[a8:.*]] = arith.addi %[[a5]], {{.*}} : index diff --git a/flang/test/Lower/character-local-variables.f90 b/flang/test/Lower/character-local-variables.f90 --- a/flang/test/Lower/character-local-variables.f90 +++ b/flang/test/Lower/character-local-variables.f90 @@ -14,7 +14,7 @@ integer :: l character(l) :: c ! CHECK: %[[lexpr:.*]] = fir.load %[[arg0]] : !fir.ref - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[lexpr]], %c0{{.*}} : i32 + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[lexpr]], %c0{{.*}}) : i32 ! CHECK: %[[l:.*]] = arith.select %[[is_positive]], %[[lexpr]], %c0{{.*}} : i32 ! CHECK: fir.alloca !fir.char<1,?>(%[[l]] : i32) {{{.*}}uniq_name = "_QFscalar_dyn_lenEc"} end subroutine @@ -31,7 +31,7 @@ integer :: l character(l) :: c(10) ! CHECK: %[[lexpr:.*]] = fir.load %[[arg0]] : !fir.ref - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[lexpr]], %c0{{.*}} : i32 + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[lexpr]], %c0{{.*}}) : i32 ! CHECK: %[[l:.*]] = arith.select %[[is_positive]], %[[lexpr]], %c0{{.*}} : i32 ! CHECK: fir.alloca !fir.array<10x!fir.char<1,?>>(%[[l]] : i32) {{{.*}}uniq_name = "_QFcst_array_dyn_lenEc"} end subroutine @@ -43,7 +43,7 @@ character(10) :: c(n) ! CHECK: %[[n:.*]] = fir.load %[[arg0]] : !fir.ref ! CHECK: %[[ni:.*]] = fir.convert %[[n]] : (i32) -> index - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[ni]], %c0{{.*}} : index + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[ni]], %c0{{.*}}) : index ! CHECK: %[[extent:.*]] = arith.select %[[is_positive]], %[[ni]], %c0{{.*}} : index ! CHECK: fir.alloca !fir.array>, %[[extent]] {{{.*}}uniq_name = "_QFdyn_array_cst_lenEc"} end subroutine @@ -54,11 +54,11 @@ integer :: l, n character(l) :: c(n) ! CHECK-DAG: %[[lexpr:.*]] = fir.load %[[arg0]] : !fir.ref - ! CHECK-DAG: %[[is_positive:.*]] = arith.cmpi sgt, %[[lexpr]], %c0{{.*}} : i32 + ! CHECK-DAG: %[[is_positive:.*]] = arith.cmpi sgt(%[[lexpr]], %c0{{.*}}) : i32 ! CHECK-DAG: %[[l:.*]] = arith.select %[[is_positive]], %[[lexpr]], %c0{{.*}} : i32 ! CHECK-DAG: %[[n:.*]] = fir.load %[[arg1]] : !fir.ref ! CHECK: %[[ni:.*]] = fir.convert %[[n]] : (i32) -> index - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[ni]], %c0{{.*}} : index + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[ni]], %c0{{.*}}) : index ! CHECK: %[[extent:.*]] = arith.select %[[is_positive]], %[[ni]], %c0{{.*}} : index ! CHECK: fir.alloca !fir.array>(%[[l]] : i32), %[[extent]] {{{.*}}uniq_name = "_QFdyn_array_dyn_lenEc"} end subroutine @@ -75,7 +75,7 @@ integer(8) :: l character(l) :: c(11:20) ! CHECK: %[[lexpr:.*]] = fir.load %[[arg0]] : !fir.ref - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[lexpr]], %c0{{.*}} : i64 + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[lexpr]], %c0{{.*}}) : i64 ! CHECK: %[[l:.*]] = arith.select %[[is_positive]], %[[lexpr]], %c0{{.*}} : i64 ! CHECK: fir.alloca !fir.array<10x!fir.char<1,?>>(%[[l]] : i64) {{{.*}}uniq_name = "_QFcst_array_dyn_len_lbEc"} end subroutine @@ -89,7 +89,7 @@ ! CHECK-DAG: %[[n:.*]] = fir.load %[[arg0]] : !fir.ref ! CHECK-DAG: %[[ni:.*]] = fir.convert %[[n]] : (i64) -> index ! CHECK: %[[raw_extent:.*]] = arith.addi %[[ni]], %[[cm10]] : index - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[raw_extent]], %c0{{.*}} : index + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[raw_extent]], %c0{{.*}}) : index ! CHECK: %[[extent:.*]] = arith.select %[[is_positive]], %[[raw_extent]], %c0{{.*}} : index ! CHECK: fir.alloca !fir.array>, %[[extent]] {{{.*}}uniq_name = "_QFdyn_array_cst_len_lbEc"} end subroutine @@ -101,12 +101,12 @@ character(l) :: c(11:n) ! CHECK-DAG: %[[cm10:.*]] = arith.constant -10 : index ! CHECK-DAG: %[[lexpr:.*]] = fir.load %[[arg0]] : !fir.ref - ! CHECK-DAG: %[[is_positive:.*]] = arith.cmpi sgt, %[[lexpr]], %c0{{.*}} : i64 + ! CHECK-DAG: %[[is_positive:.*]] = arith.cmpi sgt(%[[lexpr]], %c0{{.*}}) : i64 ! CHECK-DAG: %[[l:.*]] = arith.select %[[is_positive]], %[[lexpr]], %c0{{.*}} : i64 ! CHECK-DAG: %[[n:.*]] = fir.load %[[arg1]] : !fir.ref ! CHECK-DAG: %[[ni:.*]] = fir.convert %[[n]] : (i64) -> index ! CHECK: %[[raw_extent:.*]] = arith.addi %[[ni]], %[[cm10]] : index - ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt, %[[raw_extent]], %c0{{.*}} : index + ! CHECK: %[[is_positive:.*]] = arith.cmpi sgt(%[[raw_extent]], %c0{{.*}}) : index ! CHECK: %[[extent:.*]] = arith.select %[[is_positive]], %[[raw_extent]], %c0{{.*}} : index ! CHECK: fir.alloca !fir.array>(%[[l]] : i64), %[[extent]] {{{.*}}uniq_name = "_QFdyn_array_dyn_len_lbEc"} end subroutine diff --git a/flang/test/Lower/character-substrings.f90 b/flang/test/Lower/character-substrings.f90 --- a/flang/test/Lower/character-substrings.f90 +++ b/flang/test/Lower/character-substrings.f90 @@ -18,7 +18,7 @@ ! CHECK: %[[VAL_12:.*]] = arith.subi %[[VAL_6]], %[[VAL_5]] : index ! CHECK: %[[VAL_13:.*]] = arith.addi %[[VAL_12]], %[[VAL_7]] : index ! CHECK: %[[VAL_14:.*]] = arith.constant 0 : index - ! CHECK: %[[VAL_15:.*]] = arith.cmpi slt, %[[VAL_13]], %[[VAL_14]] : index + ! CHECK: %[[VAL_15:.*]] = arith.cmpi slt(%[[VAL_13]], %[[VAL_14]]) : index ! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_15]], %[[VAL_14]], %[[VAL_13]] : index ! CHECK: %[[VAL_17:.*]] = fir.emboxchar %[[VAL_11]], %[[VAL_16]] : (!fir.ref>, index) -> !fir.boxchar<1> ! CHECK: fir.call @_QPbar(%[[VAL_17]]) : (!fir.boxchar<1>) -> () @@ -45,7 +45,7 @@ ! CHECK: %[[VAL_13:.*]] = arith.subi %[[VAL_10]], %[[VAL_12]] : i64 ! CHECK: %[[VAL_14:.*]] = arith.constant 0 : i64 ! CHECK: %[[VAL_15:.*]] = arith.subi %[[VAL_11]], %[[VAL_13]] : i64 -! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_14]] : i64 +! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_14]]) : i64 ! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_16]], %[[VAL_15]], %[[VAL_14]] : i64 ! CHECK: %[[VAL_18:.*]] = fir.slice %[[VAL_4]], %[[VAL_8]], %[[VAL_6]] substr %[[VAL_13]], %[[VAL_17]] : (index, index, index, i64, i64) -> !fir.slice<1> ! CHECK: %[[VAL_19:.*]] = fir.embox %[[VAL_2]](%[[VAL_9]]) {{\[}}%[[VAL_18]]] : (!fir.ref>>, !fir.shape<1>, !fir.slice<1>) -> !fir.box>> @@ -83,7 +83,7 @@ ! CHECK: %[[VAL_13:.*]] = arith.subi %[[VAL_7]], %[[VAL_6]] : index ! CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_13]], %[[VAL_8]] : index ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : index - ! CHECK: %[[VAL_16:.*]] = arith.cmpi slt, %[[VAL_14]], %[[VAL_15]] : index + ! CHECK: %[[VAL_16:.*]] = arith.cmpi slt(%[[VAL_14]], %[[VAL_15]]) : index ! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_16]], %[[VAL_15]], %[[VAL_14]] : index ! CHECK: %[[VAL_18:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_19:.*]] = arith.constant 2 : i64 @@ -97,9 +97,9 @@ ! CHECK: %[[VAL_27:.*]] = arith.subi %[[VAL_21]], %[[VAL_20]] : index ! CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_27]], %[[VAL_22]] : index ! CHECK: %[[VAL_29:.*]] = arith.constant 0 : index - ! CHECK: %[[VAL_30:.*]] = arith.cmpi slt, %[[VAL_28]], %[[VAL_29]] : index + ! CHECK: %[[VAL_30:.*]] = arith.cmpi slt(%[[VAL_28]], %[[VAL_29]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_28]] : index - ! CHECK: %[[VAL_32:.*]] = arith.cmpi slt, %[[VAL_31]], %[[VAL_17]] : index + ! CHECK: %[[VAL_32:.*]] = arith.cmpi slt(%[[VAL_31]], %[[VAL_17]]) : index ! CHECK: %[[VAL_33:.*]] = arith.select %[[VAL_32]], %[[VAL_31]], %[[VAL_17]] : index ! CHECK: %[[VAL_34:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_35:.*]] = fir.convert %[[VAL_33]] : (index) -> i64 @@ -119,7 +119,7 @@ ! CHECK: %[[VAL_48:.*]] = fir.coordinate_of %[[VAL_47]], %[[VAL_46]] : (!fir.ref>>, index) -> !fir.ref> ! CHECK: fir.store %[[VAL_44]] to %[[VAL_48]] : !fir.ref> ! CHECK: } - + character(4) :: a, b a(1:2) = b(3:4) ! CHECK: return @@ -140,7 +140,7 @@ ! CHECK: %[[VAL_10:.*]] = arith.subi %[[VAL_8]], %[[VAL_4]] : index ! CHECK: %[[VAL_11:.*]] = arith.addi %[[VAL_10]], %[[VAL_6]] : index ! CHECK: %[[VAL_12:.*]] = arith.divsi %[[VAL_11]], %[[VAL_6]] : index -! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_9]] : index +! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_9]]) : index ! CHECK: %[[VAL_14:.*]] = arith.select %[[VAL_13]], %[[VAL_12]], %[[VAL_9]] : index ! CHECK: %[[VAL_15:.*]] = fir.shape %[[VAL_3]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_16:.*]] = fir.slice %[[VAL_4]], %[[VAL_8]], %[[VAL_6]] : (index, index, index) -> !fir.slice<1> @@ -164,7 +164,7 @@ ! CHECK: %[[VAL_36:.*]] = arith.subi %[[VAL_30]], %[[VAL_29]] : index ! CHECK: %[[VAL_37:.*]] = arith.addi %[[VAL_36]], %[[VAL_31]] : index ! CHECK: %[[VAL_38:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_39:.*]] = arith.cmpi slt, %[[VAL_37]], %[[VAL_38]] : index +! CHECK: %[[VAL_39:.*]] = arith.cmpi slt(%[[VAL_37]], %[[VAL_38]]) : index ! CHECK: %[[VAL_40:.*]] = arith.select %[[VAL_39]], %[[VAL_38]], %[[VAL_37]] : index ! CHECK: %[[VAL_41:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_42:.*]] = arith.constant 1 : index @@ -172,7 +172,7 @@ ! CHECK: %[[VAL_44:.*]] = arith.subi %[[VAL_43]], %[[VAL_42]] : index ! CHECK: fir.do_loop %[[VAL_45:.*]] = %[[VAL_41]] to %[[VAL_44]] step %[[VAL_42]] { ! CHECK: %[[VAL_46:.*]] = fir.convert %[[VAL_19]] : (index) -> index -! CHECK: %[[VAL_47:.*]] = arith.cmpi slt, %[[VAL_45]], %[[VAL_46]] : index +! CHECK: %[[VAL_47:.*]] = arith.cmpi slt(%[[VAL_45]], %[[VAL_46]]) : index ! CHECK: fir.if %[[VAL_47]] { ! CHECK: %[[VAL_48:.*]] = fir.convert %[[VAL_18]] : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_49:.*]] = fir.coordinate_of %[[VAL_48]], %[[VAL_45]] : (!fir.ref>>, index) -> !fir.ref> @@ -187,7 +187,7 @@ ! CHECK: fir.store %[[VAL_53]] to %[[VAL_55]] : !fir.ref> ! CHECK: } ! CHECK: } -! CHECK: %[[VAL_56:.*]] = arith.cmpi slt, %[[VAL_40]], %[[VAL_19]] : index +! CHECK: %[[VAL_56:.*]] = arith.cmpi slt(%[[VAL_40]], %[[VAL_19]]) : index ! CHECK: %[[VAL_57:.*]] = arith.select %[[VAL_56]], %[[VAL_40]], %[[VAL_19]] : index ! CHECK: %[[VAL_58:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_59:.*]] = fir.convert %[[VAL_57]] : (index) -> i64 @@ -230,7 +230,7 @@ ! CHECK: %[[sub:.*]] = arith.subi %[[VAL_1]], %[[VAL_4]] : index ! CHECK: %[[add:.*]] = arith.addi %[[sub]], %[[VAL_4]] : index ! CHECK: %[[div:.*]] = arith.divsi %4, %[[VAL_4]] : index -! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[div]], %[[c0]] : index +! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[div]], %[[c0]]) : index ! CHECK: %[[select:.*]] = arith.select %[[cmp]], %[[div]], %[[c0]] : index ! CHECK: %[[VAL_6:.*]] = fir.array_load %[[VAL_0]](%[[VAL_3]]) {{\[}}%[[VAL_5]]] : (!fir.ref}>>>, !fir.shape<1>, !fir.slice<1>) -> !fir.array<8x!fir.char<1,7>> ! CHECK: %[[VAL_7:.*]] = fir.address_of(@_QQcl.6E696365) : !fir.ref> @@ -252,7 +252,7 @@ ! CHECK: %[[VAL_25:.*]] = arith.subi %[[VAL_19]], %[[VAL_18]] : index ! CHECK: %[[VAL_26:.*]] = arith.addi %[[VAL_25]], %[[VAL_20]] : index ! CHECK: %[[VAL_27:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_28:.*]] = arith.cmpi slt, %[[VAL_26]], %[[VAL_27]] : index +! CHECK: %[[VAL_28:.*]] = arith.cmpi slt(%[[VAL_26]], %[[VAL_27]]) : index ! CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_28]], %[[VAL_27]], %[[VAL_26]] : index ! CHECK: %[[VAL_30:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_31:.*]] = arith.constant 1 : index @@ -260,7 +260,7 @@ ! CHECK: %[[VAL_33:.*]] = arith.subi %[[VAL_32]], %[[VAL_31]] : index ! CHECK: fir.do_loop %[[VAL_34:.*]] = %[[VAL_30]] to %[[VAL_33]] step %[[VAL_31]] { ! CHECK: %[[VAL_35:.*]] = fir.convert %[[VAL_8]] : (index) -> index -! CHECK: %[[VAL_36:.*]] = arith.cmpi slt, %[[VAL_34]], %[[VAL_35]] : index +! CHECK: %[[VAL_36:.*]] = arith.cmpi slt(%[[VAL_34]], %[[VAL_35]]) : index ! CHECK: fir.if %[[VAL_36]] { ! CHECK: %[[VAL_37:.*]] = fir.convert %[[VAL_7]] : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_38:.*]] = fir.coordinate_of %[[VAL_37]], %[[VAL_34]] : (!fir.ref>>, index) -> !fir.ref> @@ -275,7 +275,7 @@ ! CHECK: fir.store %[[VAL_42]] to %[[VAL_44]] : !fir.ref> ! CHECK: } ! CHECK: } -! CHECK: %[[VAL_45:.*]] = arith.cmpi slt, %[[VAL_29]], %[[VAL_8]] : index +! CHECK: %[[VAL_45:.*]] = arith.cmpi slt(%[[VAL_29]], %[[VAL_8]]) : index ! CHECK: %[[VAL_46:.*]] = arith.select %[[VAL_45]], %[[VAL_29]], %[[VAL_8]] : index ! CHECK: %[[VAL_47:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_48:.*]] = fir.convert %[[VAL_46]] : (index) -> i64 @@ -322,7 +322,7 @@ ! CHECK: %[[sub:.*]] = arith.subi %[[VAL_2]], %[[VAL_6]] : index ! CHECK: %[[add:.*]] = arith.addi %[[sub]], %[[VAL_6]] : index ! CHECK: %[[div:.*]] = arith.divsi %4, %[[VAL_6]] : index -! CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[div]], %[[c0]] : index +! CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[div]], %[[c0]]) : index ! CHECK: %[[select:.*]] = arith.select %[[cmp]], %[[div]], %[[c0]] : index ! CHECK: %[[VAL_8:.*]] = fir.array_load %[[VAL_0]](%[[VAL_5]]) {{\[}}%[[VAL_7]]] : (!fir.ref}>>>, !fir.shape<1>, !fir.slice<1>) -> !fir.array<8x!fir.char<1,7>> ! CHECK: %[[VAL_9:.*]] = fir.field_index ch, !fir.type<_QFarray_substring_assignment3Tt{ch:!fir.char<1,7>}> @@ -347,7 +347,7 @@ ! CHECK: %[[VAL_30:.*]] = arith.subi %[[VAL_24]], %[[VAL_23]] : index ! CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_30]], %[[VAL_25]] : index ! CHECK: %[[VAL_32:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_33:.*]] = arith.cmpi slt, %[[VAL_31]], %[[VAL_32]] : index +! CHECK: %[[VAL_33:.*]] = arith.cmpi slt(%[[VAL_31]], %[[VAL_32]]) : index ! CHECK: %[[VAL_34:.*]] = arith.select %[[VAL_33]], %[[VAL_32]], %[[VAL_31]] : index ! CHECK: %[[VAL_35:.*]] = fir.array_access %[[VAL_19]], %[[VAL_18]] : (!fir.array<8x!fir.char<1,7>>, index) -> !fir.ref> ! CHECK: %[[VAL_36:.*]] = arith.constant 4 : i64 @@ -362,7 +362,7 @@ ! CHECK: %[[VAL_45:.*]] = arith.subi %[[VAL_39]], %[[VAL_38]] : index ! CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_45]], %[[VAL_40]] : index ! CHECK: %[[VAL_47:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_48:.*]] = arith.cmpi slt, %[[VAL_46]], %[[VAL_47]] : index +! CHECK: %[[VAL_48:.*]] = arith.cmpi slt(%[[VAL_46]], %[[VAL_47]]) : index ! CHECK: %[[VAL_49:.*]] = arith.select %[[VAL_48]], %[[VAL_47]], %[[VAL_46]] : index ! CHECK: %[[VAL_50:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_51:.*]] = arith.constant 1 : index @@ -370,7 +370,7 @@ ! CHECK: %[[VAL_53:.*]] = arith.subi %[[VAL_52]], %[[VAL_51]] : index ! CHECK: fir.do_loop %[[VAL_54:.*]] = %[[VAL_50]] to %[[VAL_53]] step %[[VAL_51]] { ! CHECK: %[[VAL_55:.*]] = fir.convert %[[VAL_34]] : (index) -> index -! CHECK: %[[VAL_56:.*]] = arith.cmpi slt, %[[VAL_54]], %[[VAL_55]] : index +! CHECK: %[[VAL_56:.*]] = arith.cmpi slt(%[[VAL_54]], %[[VAL_55]]) : index ! CHECK: fir.if %[[VAL_56]] { ! CHECK: %[[VAL_57:.*]] = fir.convert %[[VAL_29]] : (!fir.ref>) -> !fir.ref>> ! CHECK: %[[VAL_58:.*]] = fir.coordinate_of %[[VAL_57]], %[[VAL_54]] : (!fir.ref>>, index) -> !fir.ref> @@ -385,7 +385,7 @@ ! CHECK: fir.store %[[VAL_62]] to %[[VAL_64]] : !fir.ref> ! CHECK: } ! CHECK: } -! CHECK: %[[VAL_65:.*]] = arith.cmpi slt, %[[VAL_49]], %[[VAL_34]] : index +! CHECK: %[[VAL_65:.*]] = arith.cmpi slt(%[[VAL_49]], %[[VAL_34]]) : index ! CHECK: %[[VAL_66:.*]] = arith.select %[[VAL_65]], %[[VAL_49]], %[[VAL_34]] : index ! CHECK: %[[VAL_67:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_68:.*]] = fir.convert %[[VAL_66]] : (index) -> i64 diff --git a/flang/test/Lower/components.f90 b/flang/test/Lower/components.f90 --- a/flang/test/Lower/components.f90 +++ b/flang/test/Lower/components.f90 @@ -29,8 +29,8 @@ ! CHECK-DAG: %[[VAL_4:.*]] = arith.constant 2 : i64 ! CHECK: %[[VAL_5:.*]] = fir.address_of(@_QMcomponents_testEinstance) : !fir.ref,r:!fir.array<5xf32>}>>,h2:!fir.array<4x!fir.type<_QMcomponents_testTt2{g1:!fir.array<3x3x!fir.type<_QMcomponents_testTt1{i:!fir.array<6xi32>,r:!fir.array<5xf32>}>>,g2:!fir.array<4x4x4x!fir.type<_QMcomponents_testTt1{i:!fir.array<6xi32>,r:!fir.array<5xf32>}>>,g3:!fir.array<5xi32>}>>}>> ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_7:.*]] : !fir.ref - ! CHECK: %[[VAL_8:.*]] = arith.cmpi sge, %[[VAL_6]], %[[VAL_0]] : i32 - ! CHECK: %[[VAL_9:.*]] = arith.cmpi sle, %[[VAL_6]], %[[VAL_1]] : i32 + ! CHECK: %[[VAL_8:.*]] = arith.cmpi sge(%[[VAL_6]], %[[VAL_0]]) : i32 + ! CHECK: %[[VAL_9:.*]] = arith.cmpi sle(%[[VAL_6]], %[[VAL_1]]) : i32 ! CHECK: %[[VAL_10:.*]] = arith.andi %[[VAL_8]], %[[VAL_9]] : i1 ! CHECK: cond_br %[[VAL_10]], ^bb1, ^bb2 ! CHECK: ^bb1: @@ -70,7 +70,7 @@ ! CHECK: %[[VAL_8:.*]] = fir.slice %[[VAL_1]], %[[VAL_0]], %[[VAL_1]] path %[[VAL_6]] : (index, index, index, !fir.field) -> !fir.slice<1> ! CHECK: br ^bb1(%[[VAL_3]], %[[VAL_0]] : index, index) ! CHECK: ^bb1(%[[VAL_9:.*]]: index, %[[VAL_10:.*]]: index): -! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt, %[[VAL_10]], %[[VAL_3]] : index +! CHECK: %[[VAL_11:.*]] = arith.cmpi sgt(%[[VAL_10]], %[[VAL_3]]) : index ! CHECK: cond_br %[[VAL_11]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_12:.*]] = arith.addi %[[VAL_9]], %[[VAL_1]] : index @@ -136,7 +136,7 @@ ! CHECK: %[[VAL_9:.*]] = fir.address_of(@_QQcl.{{.*}}) : !fir.ref> ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_3]] : index, index) ! CHECK: ^bb1(%[[VAL_10:.*]]: index, %[[VAL_11:.*]]: index): - ! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt, %[[VAL_11]], %[[VAL_4]] : index + ! CHECK: %[[VAL_12:.*]] = arith.cmpi sgt(%[[VAL_11]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_12]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_13:.*]] = arith.addi %[[VAL_10]], %[[VAL_5]] : index @@ -171,7 +171,7 @@ ! CHECK: %[[VAL_10:.*]] = fir.slice %[[VAL_5]], %[[VAL_3]], %[[VAL_5]] path %[[VAL_9]] : (index, index, index, !fir.field) -> !fir.slice<1> ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_3]] : index, index) ! CHECK: ^bb1(%[[VAL_11:.*]]: index, %[[VAL_12:.*]]: index): - ! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_4]] : index + ! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_4]]) : index ! CHECK: cond_br %[[VAL_13]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_11]], %[[VAL_5]] : index @@ -213,7 +213,7 @@ ! CHECK: %[[VAL_42:.*]] = fir.address_of(@{{.*}}) : !fir.ref> ! CHECK: br ^bb1(%[[VAL_37]], %[[VAL_36]] : index, index) ! CHECK:^bb1(%[[VAL_43:.*]]: index, %[[VAL_44:.*]]: index): - ! CHECK: %[[VAL_45:.*]] = arith.cmpi sgt, %[[VAL_44]], %[[VAL_37]] : index + ! CHECK: %[[VAL_45:.*]] = arith.cmpi sgt(%[[VAL_44]], %[[VAL_37]]) : index ! CHECK: cond_br %[[VAL_45]], ^bb2, ^bb3 ! CHECK:^bb2: ! CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_43]], %[[VAL_38]] : index diff --git a/flang/test/Lower/derived-pointer-components.f90 b/flang/test/Lower/derived-pointer-components.f90 --- a/flang/test/Lower/derived-pointer-components.f90 +++ b/flang/test/Lower/derived-pointer-components.f90 @@ -754,7 +754,7 @@ ! CHECK: %[[VAL_13:.*]] = arith.subi %[[VAL_11]], %[[VAL_7]] : index ! CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_13]], %[[VAL_9]] : index ! CHECK: %[[VAL_15:.*]] = arith.divsi %[[VAL_14]], %[[VAL_9]] : index -! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_12]] : index +! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_12]]) : index ! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_16]], %[[VAL_15]], %[[VAL_12]] : index ! CHECK: %[[VAL_18:.*]] = fir.shape %[[VAL_3]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_19:.*]] = fir.slice %[[VAL_7]], %[[VAL_11]], %[[VAL_9]] : (index, index, index) -> !fir.slice<1> diff --git a/flang/test/Lower/do_loop.f90 b/flang/test/Lower/do_loop.f90 --- a/flang/test/Lower/do_loop.f90 +++ b/flang/test/Lower/do_loop.f90 @@ -2,7 +2,7 @@ ! RUN: %flang_fc1 -emit-fir -o - %s | FileCheck %s ! Simple tests for structured ordered loops with loop-control. -! Tests the structure of the loop, storage to index variable and return and +! Tests the structure of the loop, storage to index variable and return and ! storage of the final value of the index variable. ! Test a simple loop with the final value of the index variable read outside the loop @@ -251,7 +251,7 @@ ! CHECK: ^[[HDR]]: // 2 preds: ^{{.*}}, ^[[EXIT:.*]] ! CHECK-DAG: %[[INDEX:.*]] = fir.load %[[INDEX_REF]] : !fir.ref ! CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index - ! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[INDEX]], %[[C0]] : index + ! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[INDEX]], %[[C0]]) : index ! CHECK: cond_br %[[COND]], ^[[BODY:.*]], ^[[EXIT:.*]] do x=s,e,st ! CHECK: ^[[BODY]]: // pred: ^[[HDR]] diff --git a/flang/test/Lower/do_loop_unstructured.f90 b/flang/test/Lower/do_loop_unstructured.f90 --- a/flang/test/Lower/do_loop_unstructured.f90 +++ b/flang/test/Lower/do_loop_unstructured.f90 @@ -29,7 +29,7 @@ ! CHECK: ^[[HEADER]]: ! CHECK: %[[TRIP_VAR:.*]] = fir.load %[[TRIP_VAR_REF]] : !fir.ref ! CHECK: %[[ZERO:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[TRIP_VAR]], %[[ZERO]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[TRIP_VAR]], %[[ZERO]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[BODY:.*]], ^[[EXIT:.*]] ! CHECK: ^[[BODY]]: ! CHECK: %[[TRIP_VAR:.*]] = fir.load %[[TRIP_VAR_REF]] : !fir.ref @@ -67,7 +67,7 @@ ! CHECK: ^[[HEADER]]: ! CHECK: %[[TRIP_VAR:.*]] = fir.load %[[TRIP_VAR_REF]] : !fir.ref ! CHECK: %[[ZERO:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[TRIP_VAR]], %[[ZERO]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[TRIP_VAR]], %[[ZERO]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[BODY:.*]], ^[[EXIT:.*]] ! CHECK: ^[[BODY]]: ! CHECK: %[[TRIP_VAR:.*]] = fir.load %[[TRIP_VAR_REF]] : !fir.ref @@ -113,7 +113,7 @@ ! CHECK: ^[[HEADER_I]]: ! CHECK: %[[TRIP_VAR_I:.*]] = fir.load %[[TRIP_VAR_I_REF]] : !fir.ref ! CHECK: %[[ZERO_1:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND_I:.*]] = arith.cmpi sgt, %[[TRIP_VAR_I]], %[[ZERO_1]] : i32 +! CHECK: %[[COND_I:.*]] = arith.cmpi sgt(%[[TRIP_VAR_I]], %[[ZERO_1]]) : i32 ! CHECK: cf.cond_br %[[COND_I]], ^[[BODY_I:.*]], ^[[EXIT_I:.*]] ! CHECK: ^[[BODY_I]]: ! CHECK: %[[J_START:.*]] = arith.constant 1 : i32 @@ -128,7 +128,7 @@ ! CHECK: ^[[HEADER_J]]: ! CHECK: %[[TRIP_VAR_J:.*]] = fir.load %[[TRIP_VAR_J_REF]] : !fir.ref ! CHECK: %[[ZERO_2:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND_J:.*]] = arith.cmpi sgt, %[[TRIP_VAR_J]], %[[ZERO_2]] : i32 +! CHECK: %[[COND_J:.*]] = arith.cmpi sgt(%[[TRIP_VAR_J]], %[[ZERO_2]]) : i32 ! CHECK: cf.cond_br %[[COND_J]], ^[[BODY_J:.*]], ^[[EXIT_J:.*]] ! CHECK: ^[[BODY_J]]: ! CHECK: %[[K_START:.*]] = arith.constant 1 : i32 @@ -143,7 +143,7 @@ ! CHECK: ^[[HEADER_K]]: ! CHECK: %[[TRIP_VAR_K:.*]] = fir.load %[[TRIP_VAR_K_REF]] : !fir.ref ! CHECK: %[[ZERO_2:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND_K:.*]] = arith.cmpi sgt, %[[TRIP_VAR_K]], %[[ZERO_2]] : i32 +! CHECK: %[[COND_K:.*]] = arith.cmpi sgt(%[[TRIP_VAR_K]], %[[ZERO_2]]) : i32 ! CHECK: cf.cond_br %[[COND_K]], ^[[BODY_K:.*]], ^[[EXIT_K:.*]] ! CHECK: ^[[BODY_K]]: ! CHECK: %[[TRIP_VAR_K:.*]] = fir.load %[[TRIP_VAR_K_REF]] : !fir.ref @@ -202,7 +202,7 @@ ! CHECK: ^[[HEADER]]: ! CHECK: %[[TRIP_VAR:.*]] = fir.load %[[TRIP_VAR_I_REF]] : !fir.ref ! CHECK: %[[ZERO:.*]] = arith.constant 0 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[TRIP_VAR]], %[[ZERO]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[TRIP_VAR]], %[[ZERO]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[BODY:.*]], ^[[EXIT:.*]] ! CHECK: ^[[BODY]]: ! CHECK: %{{.*}} = fir.do_loop %[[J_INDEX:[^ ]*]] = diff --git a/flang/test/Lower/dummy-argument-optional-2.f90 b/flang/test/Lower/dummy-argument-optional-2.f90 --- a/flang/test/Lower/dummy-argument-optional-2.f90 +++ b/flang/test/Lower/dummy-argument-optional-2.f90 @@ -98,7 +98,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi ne, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi ne(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_5]] -> (!fir.heap>) { @@ -132,7 +132,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box>>>) -> !fir.ptr>> ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.ptr>>) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi ne, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi ne(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_0]] : !fir.ref>>>> ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_5]] -> (!fir.heap>>) { ! CHECK: %[[VAL_10:.*]] = arith.constant 0 : index @@ -174,7 +174,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.box_addr %[[VAL_2]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_6:.*]] = arith.cmpi ne, %[[VAL_4]], %[[VAL_5]] : i64 +! CHECK: %[[VAL_6:.*]] = arith.cmpi ne(%[[VAL_4]], %[[VAL_5]]) : i64 ! CHECK: %[[VAL_7:.*]] = fir.if %[[VAL_6]] -> (!fir.heap>) { ! CHECK: %[[VAL_10:.*]] = fir.allocmem !fir.array ! CHECK: fir.do_loop {{.*}} { @@ -226,7 +226,7 @@ ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_27:.*]] : (!fir.heap>) -> !fir.ref> ! CHECK: fir.call @_QPtakes_opt_explicit_shape(%[[VAL_26]]) : (!fir.ref>) -> () ! CHECK: fir.if %[[VAL_1]] { -! CHECK: %[[VAL_36:.*]] = fir.do_loop {{.*}} { +! CHECK: %[[VAL_36:.*]] = fir.do_loop {{.*}} { ! CHECK: } ! CHECK: fir.array_merge_store %{{.*}}, %[[VAL_36]] to %[[VAL_6]] : !fir.array, !fir.array, !fir.box> ! CHECK: fir.freemem %[[VAL_27]] : !fir.heap> diff --git a/flang/test/Lower/dummy-argument-optional.f90 b/flang/test/Lower/dummy-argument-optional.f90 --- a/flang/test/Lower/dummy-argument-optional.f90 +++ b/flang/test/Lower/dummy-argument-optional.f90 @@ -116,7 +116,7 @@ ! CHECK: %[[xboxload:.*]] = fir.load %[[arg0]] : !fir.ref>>> ! CHECK: %[[xptr:.*]] = fir.box_addr %[[xboxload]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[xaddr:.*]] = fir.convert %[[xptr]] : (!fir.heap>) -> i64 - ! CHECK: %[[isAlloc:.*]] = arith.cmpi ne, %[[xaddr]], %c0{{.*}} : i64 + ! CHECK: %[[isAlloc:.*]] = arith.cmpi ne(%[[xaddr]], %c0{{.*}}) : i64 ! CHECK: %[[absent:.*]] = fir.absent !fir.box> ! CHECK: %[[embox:.*]] = fir.embox %{{.*}} ! CHECK: %[[actual:.*]] = arith.select %[[isAlloc]], %[[embox]], %[[absent]] : !fir.box> diff --git a/flang/test/Lower/dummy-procedure-character.f90 b/flang/test/Lower/dummy-procedure-character.f90 --- a/flang/test/Lower/dummy-procedure-character.f90 +++ b/flang/test/Lower/dummy-procedure-character.f90 @@ -63,7 +63,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (i32) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = arith.select %[[VAL_5]], %[[VAL_3]], %[[VAL_4]] : i64 ! CHECK: %[[VAL_7:.*]] = fir.emboxproc %[[VAL_1]] : ((!fir.ref>, index) -> !fir.boxchar<1>) -> !fir.boxproc<() -> ()> ! CHECK: %[[VAL_8:.*]] = fir.undefined tuple ()>, i64> @@ -169,7 +169,7 @@ ! CHECK: %[[VAL_5:.*]] = arith.constant 7 : i64 ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_6]], %[[C0]] : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_6]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_6]], %[[C0]] : index ! CHECK: %[[VAL_8:.*]] = fir.convert %[[WAL_1]] : (() -> ()) -> ((!fir.ref>, index, !fir.ref) -> !fir.boxchar<1>) ! CHECK: fir.call %[[VAL_8]](%[[VAL_1]], %[[SELECT]], %{{.*}}) : (!fir.ref>, index, !fir.ref) -> !fir.boxchar<1> @@ -193,7 +193,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[COMPI:.*]] = arith.cmpi sgt, %[[VAL_5]], %[[C0]] : index +! CHECK: %[[COMPI:.*]] = arith.cmpi sgt(%[[VAL_5]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_5]], %[[C0]] : index ! CHECK: %[[VAL_6:.*]] = fir.call @llvm.stacksave() : () -> !fir.ref ! CHECK: %[[VAL_7:.*]] = fir.alloca !fir.char<1,?>(%[[SELECT]] : index) {bindc_name = ".result"} @@ -234,7 +234,7 @@ ! CHECK-SAME: %[[VAL_0:.*]]: tuple ()>, i64> {fir.char_proc}) subroutine host2(f) ! Test that dummy length is overridden by local length even when used - ! in the internal procedure. + ! in the internal procedure. character*(42) :: f external :: f ! CHECK: %[[VAL_3:.*]] = fir.coordinate_of %[[VAL_1:.*]], %{{.*}} : (!fir.ref ()>, i64>>>, i32) -> !fir.ref ()>, i64>> @@ -254,7 +254,7 @@ ! CHECK: %[[VAL_6:.*]] = arith.constant 42 : i64 ! CHECK: %[[VAL_7:.*]] = fir.convert %[[VAL_6]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index - ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_7]], %[[C0]] : index + ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_7]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_7]], %[[C0]] : index ! CHECK: %[[VAL_9:.*]] = fir.convert %[[WAL_1]] : (() -> ()) -> ((!fir.ref>, index) -> !fir.boxchar<1>) ! CHECK: fir.call %[[VAL_9]](%[[VAL_1]], %[[SELECT]]) : (!fir.ref>, index) -> !fir.boxchar<1> diff --git a/flang/test/Lower/entry-statement.f90 b/flang/test/Lower/entry-statement.f90 --- a/flang/test/Lower/entry-statement.f90 +++ b/flang/test/Lower/entry-statement.f90 @@ -262,7 +262,7 @@ ! CHECK: br ^bb1 ! CHECK: ^bb1: // pred: ^bb0 ! CHECK: %[[V_7:[0-9]+]] = fir.address_of(@_QQcl.6120612061) : !fir.ref> - ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi slt, %c5{{.*}}, %c5{{.*}} : index + ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi slt(%c5{{.*}}, %c5{{.*}}) : index ! CHECK: %[[V_9:[0-9]+]] = arith.select %[[V_8]], %c5{{.*}}, %c5{{.*}} : index ! CHECK: %[[V_10:[0-9]+]] = fir.convert %[[V_9]] : (index) -> i64 ! CHECK: %[[V_11:[0-9]+]] = arith.muli %c1{{.*}}_i64, %[[V_10]] : i64 @@ -278,18 +278,18 @@ ! CHECK: fir.store %[[V_16]] to %[[V_33]] : !fir.ref> ! CHECK: } ! CHECK: %[[V_17:[0-9]+]] = fir.load %arg2 : !fir.ref - ! CHECK: %[[V_18:[0-9]+]] = arith.cmpi eq, %[[V_17]], %c1{{.*}}_i32_4 : i32 + ! CHECK: %[[V_18:[0-9]+]] = arith.cmpi eq(%[[V_17]], %c1{{.*}}_i32_4) : i32 ! CHECK: cond_br %[[V_18]], ^bb2, ^bb3 ! CHECK: ^bb2: // 2 preds: ^bb1, ^bb3 ! CHECK: br ^bb5 ! CHECK: ^bb3: // pred: ^bb1 ! CHECK: fir.call @_QFf1Ps2(%[[V_2]]) : (!fir.ref, !fir.boxchar<1>>>) -> () ! CHECK: %[[V_19:[0-9]+]] = fir.load %[[V_1]] : !fir.ref - ! CHECK: %[[V_20:[0-9]+]] = arith.cmpi eq, %[[V_19]], %c2{{.*}}_i32 : i32 + ! CHECK: %[[V_20:[0-9]+]] = arith.cmpi eq(%[[V_19]], %c2{{.*}}_i32) : i32 ! CHECK: cond_br %[[V_20]], ^bb2, ^bb4 ! CHECK: ^bb4: // pred: ^bb3 ! CHECK: %[[V_21:[0-9]+]] = fir.address_of(@_QQcl.4320432043) : !fir.ref> - ! CHECK: %[[V_22:[0-9]+]] = arith.cmpi slt, %c5{{.*}}, %c5{{.*}} : index + ! CHECK: %[[V_22:[0-9]+]] = arith.cmpi slt(%c5{{.*}}, %c5{{.*}}) : index ! CHECK: %[[V_23:[0-9]+]] = arith.select %[[V_22]], %c5{{.*}}, %c5{{.*}} : index ! CHECK: %[[V_24:[0-9]+]] = fir.convert %[[V_23]] : (index) -> i64 ! CHECK: %[[V_25:[0-9]+]] = arith.muli %c1{{.*}}_i64_6, %[[V_24]] : i64 @@ -329,13 +329,13 @@ ! CHECK: ^bb1: // pred: ^bb0 ! CHECK: fir.call @_QFf1Ps2(%[[V_2]]) : (!fir.ref, !fir.boxchar<1>>>) -> () ! CHECK: %[[V_7:[0-9]+]] = fir.load %arg2 : !fir.ref - ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi eq, %[[V_7]], %c2{{.*}}_i32 : i32 + ! CHECK: %[[V_8:[0-9]+]] = arith.cmpi eq(%[[V_7]], %c2{{.*}}_i32) : i32 ! CHECK: cond_br %[[V_8]], ^bb2, ^bb3 ! CHECK: ^bb2: // pred: ^bb1 ! CHECK: br ^bb4 ! CHECK: ^bb3: // pred: ^bb1 ! CHECK: %[[V_9:[0-9]+]] = fir.address_of(@_QQcl.4320432043) : !fir.ref> - ! CHECK: %[[V_10:[0-9]+]] = arith.cmpi slt, %c5{{.*}}, %c5{{.*}} : index + ! CHECK: %[[V_10:[0-9]+]] = arith.cmpi slt(%c5{{.*}}, %c5{{.*}}) : index ! CHECK: %[[V_11:[0-9]+]] = arith.select %[[V_10]], %c5{{.*}}, %c5{{.*}} : index ! CHECK: %[[V_12:[0-9]+]] = fir.convert %[[V_11]] : (index) -> i64 ! CHECK: %[[V_13:[0-9]+]] = arith.muli %c1{{.*}}_i64, %[[V_12]] : i64 @@ -374,7 +374,7 @@ ! CHECK: br ^bb1 ! CHECK: ^bb1: // pred: ^bb0 ! CHECK: %[[V_8:[0-9]+]] = fir.address_of(@_QQcl.4320432043) : !fir.ref> - ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi slt, %c5{{.*}}, %c5{{.*}} : index + ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi slt(%c5{{.*}}, %c5{{.*}}) : index ! CHECK: %[[V_10:[0-9]+]] = arith.select %[[V_9]], %c5{{.*}}, %c5{{.*}} : index ! CHECK: %[[V_11:[0-9]+]] = fir.convert %[[V_10]] : (index) -> i64 ! CHECK: %[[V_12:[0-9]+]] = arith.muli %c1{{.*}}_i64, %[[V_11]] : i64 @@ -404,7 +404,7 @@ ! CHECK: %[[V_1:[0-9]+]] = fir.load %[[V_0]] : !fir.ref> ! CHECK: %[[V_2:[0-9]+]]:2 = fir.unboxchar %[[V_1]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[V_3:[0-9]+]] = fir.address_of(@_QQcl.6220622062) : !fir.ref> - ! CHECK: %[[V_4:[0-9]+]] = arith.cmpi slt, %[[V_2]]#1, %c5{{.*}} : index + ! CHECK: %[[V_4:[0-9]+]] = arith.cmpi slt(%[[V_2]]#1, %c5{{.*}}) : index ! CHECK: %[[V_5:[0-9]+]] = arith.select %[[V_4]], %[[V_2]]#1, %c5{{.*}} : index ! CHECK: %[[V_6:[0-9]+]] = fir.convert %[[V_5]] : (index) -> i64 ! CHECK: %[[V_7:[0-9]+]] = arith.muli %c1{{.*}}_i64, %[[V_6]] : i64 @@ -430,7 +430,7 @@ ! CHECK: %[[V_1:[0-9]+]] = fir.load %[[V_0]] : !fir.ref> ! CHECK: %[[V_2:[0-9]+]]:2 = fir.unboxchar %[[V_1]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[V_3:[0-9]+]] = fir.address_of(@_QQcl.6320632063) : !fir.ref> - ! CHECK: %[[V_4:[0-9]+]] = arith.cmpi slt, %[[V_2]]#1, %c5{{.*}} : index + ! CHECK: %[[V_4:[0-9]+]] = arith.cmpi slt(%[[V_2]]#1, %c5{{.*}}) : index ! CHECK: %[[V_5:[0-9]+]] = arith.select %[[V_4]], %[[V_2]]#1, %c5{{.*}} : index ! CHECK: %[[V_6:[0-9]+]] = fir.convert %[[V_5]] : (index) -> i64 ! CHECK: %[[V_7:[0-9]+]] = arith.muli %c1{{.*}}_i64, %[[V_6]] : i64 diff --git a/flang/test/Lower/explicit-interface-results-2.f90 b/flang/test/Lower/explicit-interface-results-2.f90 --- a/flang/test/Lower/explicit-interface-results-2.f90 +++ b/flang/test/Lower/explicit-interface-results-2.f90 @@ -17,7 +17,7 @@ call takes_array(return_array()) ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_5]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_5]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_5]], %{{.*}} : index ! CHECK: %[[VAL_6:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} contains @@ -35,7 +35,7 @@ ! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QMsome_moduleEn_module) : !fir.ref ! CHECK: %[[VAL_1:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_2]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_2]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_2]], %{{.*}} : index ! CHECK: %[[VAL_3:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} contains @@ -52,7 +52,7 @@ ! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QMsome_moduleEn_module) : !fir.ref ! CHECK: %[[VAL_1:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_2]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_2]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_2]], %{{.*}} : index ! CHECK: %[[VAL_3:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} contains @@ -78,7 +78,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_2]] : !fir.llvm_ptr> ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_5]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_5]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_5]], %{{.*}} : index ! CHECK: %[[VAL_6:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} end subroutine @@ -100,7 +100,7 @@ ! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QMsome_moduleEn_module) : !fir.ref ! CHECK: %[[VAL_1:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_2]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_2]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_2]], %{{.*}} : index ! CHECK: %[[VAL_3:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} end subroutine @@ -121,7 +121,7 @@ ! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QMsome_moduleEn_module) : !fir.ref ! CHECK: %[[VAL_1:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_1]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_2]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_2]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_2]], %{{.*}} : index ! CHECK: %[[VAL_3:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} end subroutine @@ -146,7 +146,7 @@ ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (!fir.ref) -> !fir.ref ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_5]] : !fir.ref ! CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_9]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_9]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_9]], %{{.*}} : index ! CHECK: %[[VAL_10:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} contains @@ -168,7 +168,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.ref) -> !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_4]] : !fir.ref ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_6]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_6]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_6]], %{{.*}} : index ! CHECK: %[[VAL_7:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} contains @@ -197,7 +197,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.load %[[VAL_2]] : !fir.llvm_ptr> ! CHECK: %[[VAL_4:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_5]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_5]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_5]], %{{.*}} : index ! CHECK: %[[VAL_6:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} call takes_array(return_array()) @@ -224,7 +224,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.ref) -> !fir.ref ! CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_4]] : !fir.ref ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i32) -> index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_6]], %{{.*}} : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_6]], %{{.*}}) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_6]], %{{.*}} : index ! CHECK: %[[VAL_7:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} end subroutine diff --git a/flang/test/Lower/explicit-interface-results.f90 b/flang/test/Lower/explicit-interface-results.f90 --- a/flang/test/Lower/explicit-interface-results.f90 +++ b/flang/test/Lower/explicit-interface-results.f90 @@ -186,14 +186,14 @@ ! CHECK-DAG: %[[msub:.*]] = arith.subi %[[mcast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[madd:.*]] = arith.addi %[[msub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[mcast2:.*]] = fir.convert %[[madd]] : (i64) -> index - ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt, %[[mcast2]], %{{.*}} : index + ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt(%[[mcast2]], %{{.*}}) : index ! CHECK-DAG: %[[mselect:.*]] = arith.select %[[mcmpi]], %[[mcast2]], %{{.*}} : index ! CHECK-DAG: %[[nload:.*]] = fir.load %[[n]] : !fir.ref ! CHECK-DAG: %[[ncast:.*]] = fir.convert %[[nload]] : (i32) -> i64 ! CHECK-DAG: %[[nsub:.*]] = arith.subi %[[ncast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[nadd:.*]] = arith.addi %[[nsub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[ncast2:.*]] = fir.convert %[[nadd]] : (i64) -> index - ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt, %[[ncast2]], %{{.*}} : index + ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt(%[[ncast2]], %{{.*}}) : index ! CHECK-DAG: %[[nselect:.*]] = arith.select %[[ncmpi]], %[[ncast2]], %{{.*}} : index ! CHECK: %[[tmp:.*]] = fir.alloca !fir.array, %[[mselect]], %[[nselect]] ! CHECK: %[[shape:.*]] = fir.shape %[[mselect]], %[[nselect]] : (index, index) -> !fir.shape<2> @@ -209,7 +209,7 @@ ! CHECK: %[[lload:.*]] = fir.load %[[l]] : !fir.ref ! CHECK: %[[lcast:.*]] = fir.convert %[[lload]] : (i32) -> i64 ! CHECK: %[[lcast2:.*]] = fir.convert %[[lcast]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[lcast2]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[lcast2]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[lcast2]], %{{.*}} : index ! CHECK: %[[tmp:.*]] = fir.alloca !fir.array<20x30x!fir.char<1,?>>(%[[select]] : index) ! CHECK: %[[shape:.*]] = fir.shape %{{.*}}, %{{.*}} : (index, index) -> !fir.shape<2> @@ -227,14 +227,14 @@ ! CHECK-DAG: %[[msub:.*]] = arith.subi %[[mcast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[madd:.*]] = arith.addi %[[msub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[mcast2:.*]] = fir.convert %[[madd]] : (i64) -> index - ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt, %[[mcast2]], %{{.*}} : index + ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt(%[[mcast2]], %{{.*}}) : index ! CHECK-DAG: %[[mselect:.*]] = arith.select %[[mcmpi]], %[[mcast2]], %{{.*}} : index ! CHECK-DAG: %[[nload:.*]] = fir.load %[[n]] : !fir.ref ! CHECK-DAG: %[[ncast:.*]] = fir.convert %[[nload]] : (i32) -> i64 ! CHECK-DAG: %[[nsub:.*]] = arith.subi %[[ncast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[nadd:.*]] = arith.addi %[[nsub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[ncast2:.*]] = fir.convert %[[nadd]] : (i64) -> index - ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt, %[[ncast2]], %{{.*}} : index + ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt(%[[ncast2]], %{{.*}}) : index ! CHECK-DAG: %[[nselect:.*]] = arith.select %[[ncmpi]], %[[ncast2]], %{{.*}} : index ! CHECK: %[[tmp:.*]] = fir.alloca !fir.array>, %[[mselect]], %[[nselect]] ! CHECK: %[[shape:.*]] = fir.shape %[[mselect]], %[[nselect]] : (index, index) -> !fir.shape<2> @@ -251,7 +251,7 @@ ! CHECK-DAG: %[[msub:.*]] = arith.subi %[[mcast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[madd:.*]] = arith.addi %[[msub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[mcast2:.*]] = fir.convert %[[madd]] : (i64) -> index - ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt, %[[mcast2]], %{{.*}} : index + ! CHECK-DAG: %[[mcmpi:.*]] = arith.cmpi sgt(%[[mcast2]], %{{.*}}) : index ! CHECK-DAG: %[[mselect:.*]] = arith.select %[[mcmpi]], %[[mcast2]], %{{.*}} : index ! CHECK-DAG: %[[nload:.*]] = fir.load %[[n]] : !fir.ref @@ -259,13 +259,13 @@ ! CHECK-DAG: %[[nsub:.*]] = arith.subi %[[ncast]], %c1{{.*}} : i64 ! CHECK-DAG: %[[nadd:.*]] = arith.addi %[[nsub]], %c1{{.*}} : i64 ! CHECK-DAG: %[[ncast2:.*]] = fir.convert %[[nadd]] : (i64) -> index - ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt, %[[ncast2]], %{{.*}} : index + ! CHECK-DAG: %[[ncmpi:.*]] = arith.cmpi sgt(%[[ncast2]], %{{.*}}) : index ! CHECK-DAG: %[[nselect:.*]] = arith.select %[[ncmpi]], %[[ncast2]], %{{.*}} : index ! CHECK-DAG: %[[lload:.*]] = fir.load %[[l]] : !fir.ref ! CHECK-DAG: %[[lcast:.*]] = fir.convert %[[lload]] : (i32) -> i64 ! CHECK-DAG: %[[lcast2:.*]] = fir.convert %[[lcast]] : (i64) -> index - ! CHECK-DAG: %[[lcmpi:.*]] = arith.cmpi sgt, %[[lcast2]], %{{.*}} : index + ! CHECK-DAG: %[[lcmpi:.*]] = arith.cmpi sgt(%[[lcast2]], %{{.*}}) : index ! CHECK-DAG: %[[lselect:.*]] = arith.select %[[lcmpi]], %[[lcast2]], %{{.*}} : index ! CHECK: %[[tmp:.*]] = fir.alloca !fir.array>(%[[lselect]] : index), %[[mselect]], %[[nselect]] ! CHECK: %[[shape:.*]] = fir.shape %[[mselect]], %[[nselect]] : (index, index) -> !fir.shape<2> @@ -313,7 +313,7 @@ function result_depends_on_equiv_sym() character(l) :: result_depends_on_equiv_sym call set_result_with_some_value(result_depends_on_equiv_sym) - end function + end function end module ! CHECK-LABEL: func @_QPtest_result_depends_on_equiv_sym @@ -324,7 +324,7 @@ ! CHECK: %[[l:.*]] = fir.convert %[[coor]] : (!fir.ref) -> !fir.ptr ! CHECK: %[[load:.*]] = fir.load %[[l]] : !fir.ptr ! CHECK: %[[lcast:.*]] = fir.convert %[[load]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[lcast]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[lcast]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[lcast]], %{{.*}} : index ! CHECK: fir.alloca !fir.char<1,?>(%[[select]] : index) print *, result_depends_on_equiv_sym() @@ -343,7 +343,7 @@ ! CHECK: %[[dims:.*]]:3 = fir.box_dims %arg0, %c0 : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[extentCast:.*]] = fir.convert %[[dims]]#1 : (index) -> i64 ! CHECK: %[[extent:.*]] = fir.convert %[[extentCast]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[extent]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[extent]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[extent]], %{{.*}} : index ! CHECK: fir.alloca !fir.char<1,?>(%[[select]] : index) print *, depends_on_descriptor(x) @@ -363,10 +363,10 @@ character(n) :: c ! CHECK: BeginExternalListOutput ! CHECK: %[[nload:.*]] = fir.load %[[n]] : !fir.ref - ! CHECK: %[[n_is_positive:.*]] = arith.cmpi sgt, %[[nload]], %c0{{.*}} : i64 + ! CHECK: %[[n_is_positive:.*]] = arith.cmpi sgt(%[[nload]], %c0{{.*}}) : i64 ! CHECK: %[[len:.*]] = arith.select %[[n_is_positive]], %[[nload]], %c0{{.*}} : i64 ! CHECK: %[[len_cast:.*]] = fir.convert %[[len]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[len_cast]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[len_cast]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[len_cast]], %{{.*}} : index ! CHECK: fir.alloca !fir.char<1,?>(%[[select]] : index) print *, symbol_indirection(c, n) @@ -387,7 +387,7 @@ if (n.eq.1) then res = char(some_local(0)) ! CHECK: else - else + else ! CHECK-NOT: fir.alloca !fir.array ! verify that the actual argument for symbol n ("n-1") is used to allocate @@ -401,7 +401,7 @@ ! CHECK: %[[nInCallLoad:.*]] = fir.load %[[nInCall]] : !fir.ref ! CHECK: %[[nInCallCast:.*]] = fir.convert %[[nInCallLoad]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[nInCallCast]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[nInCallCast]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[nInCallCast]], %{{.*}} : index ! CHECK: %[[tmp:.*]] = fir.alloca !fir.char<1,?>(%[[select]] : index) @@ -427,7 +427,7 @@ print *, return_dyn_char_2(10) ! CHECK: %[[n:.*]] = fir.load %[[n_arg]] : !fir.ref ! CHECK: %[[len:.*]] = fir.convert %[[n]] : (i64) -> index - ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt, %[[len]], %{{.*}} : index + ! CHECK: %[[cmpi:.*]] = arith.cmpi sgt(%[[len]], %{{.*}}) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[len]], %{{.*}} : index ! CHECK: %[[result:.*]] = fir.alloca !fir.char<1,?>(%[[select]] : index) {bindc_name = ".result"} ! CHECK: fir.call @_QPreturn_dyn_char_2(%[[result]], %[[select]], %{{.*}}) : (!fir.ref>, index, !fir.ref) -> !fir.boxchar<1> diff --git a/flang/test/Lower/forall/array-constructor.f90 b/flang/test/Lower/forall/array-constructor.f90 --- a/flang/test/Lower/forall/array-constructor.f90 +++ b/flang/test/Lower/forall/array-constructor.f90 @@ -43,7 +43,7 @@ ! CHECK: %[[VAL_28:.*]] = arith.subi %[[VAL_26]], %[[VAL_19]] : index ! CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_28]], %[[VAL_21]] : index ! CHECK: %[[VAL_30:.*]] = arith.divsi %[[VAL_29]], %[[VAL_21]] : index -! CHECK: %[[VAL_31:.*]] = arith.cmpi sgt, %[[VAL_30]], %[[VAL_27]] : index +! CHECK: %[[VAL_31:.*]] = arith.cmpi sgt(%[[VAL_30]], %[[VAL_27]]) : index ! CHECK: %[[VAL_32:.*]] = arith.select %[[VAL_31]], %[[VAL_30]], %[[VAL_27]] : index ! CHECK: %[[VAL_33:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_34:.*]] = arith.constant 0 : index @@ -60,7 +60,7 @@ ! CHECK: %[[VAL_43:.*]] = fir.load %[[VAL_3]] : !fir.ref ! CHECK: %[[VAL_44:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_45:.*]] = arith.addi %[[VAL_42]], %[[VAL_44]] : index -! CHECK: %[[VAL_46:.*]] = arith.cmpi sle, %[[VAL_43]], %[[VAL_45]] : index +! CHECK: %[[VAL_46:.*]] = arith.cmpi sle(%[[VAL_43]], %[[VAL_45]]) : index ! CHECK: %[[VAL_47:.*]] = fir.if %[[VAL_46]] -> (!fir.heap>) { ! CHECK: %[[VAL_48:.*]] = arith.constant 2 : index ! CHECK: %[[VAL_49:.*]] = arith.muli %[[VAL_45]], %[[VAL_48]] : index @@ -172,7 +172,7 @@ ! CHECK: %[[VAL_29:.*]] = arith.subi %[[VAL_27]], %[[VAL_20]] : index ! CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_29]], %[[VAL_22]] : index ! CHECK: %[[VAL_31:.*]] = arith.divsi %[[VAL_30]], %[[VAL_22]] : index -! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt, %[[VAL_31]], %[[VAL_28]] : index +! CHECK: %[[VAL_32:.*]] = arith.cmpi sgt(%[[VAL_31]], %[[VAL_28]]) : index ! CHECK: %[[VAL_33:.*]] = arith.select %[[VAL_32]], %[[VAL_31]], %[[VAL_28]] : index ! CHECK: %[[VAL_34:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_35:.*]] = arith.constant 0 : index @@ -189,7 +189,7 @@ ! CHECK: %[[VAL_44:.*]] = fir.load %[[VAL_4]] : !fir.ref ! CHECK: %[[VAL_45:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_43]], %[[VAL_45]] : index -! CHECK: %[[VAL_47:.*]] = arith.cmpi sle, %[[VAL_44]], %[[VAL_46]] : index +! CHECK: %[[VAL_47:.*]] = arith.cmpi sle(%[[VAL_44]], %[[VAL_46]]) : index ! CHECK: %[[VAL_48:.*]] = fir.if %[[VAL_47]] -> (!fir.heap>) { ! CHECK: %[[VAL_49:.*]] = arith.constant 2 : index ! CHECK: %[[VAL_50:.*]] = arith.muli %[[VAL_46]], %[[VAL_49]] : index @@ -230,7 +230,7 @@ ! CHECK: %[[VAL_79:.*]] = arith.addi %[[VAL_77]], %[[VAL_78]] : i64 ! CHECK: %[[VAL_80:.*]] = fir.convert %[[VAL_79]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_80]], %[[C0]] : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_80]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_80]], %[[C0]] : index ! CHECK: %[[VAL_81:.*]] = fir.call @llvm.stacksave() : () -> !fir.ref ! CHECK: %[[VAL_82:.*]] = fir.shape %[[SELECT]] : (index) -> !fir.shape<1> diff --git a/flang/test/Lower/forall/forall-2.f90 b/flang/test/Lower/forall/forall-2.f90 --- a/flang/test/Lower/forall/forall-2.f90 +++ b/flang/test/Lower/forall/forall-2.f90 @@ -16,7 +16,7 @@ end type t type(t) :: thing(:) integer :: i - + forall (i=5:13) ! commenting out this test for the moment (hits assert) ! thing(i)%arr = a1 @@ -32,7 +32,7 @@ end type t type(t) :: thing(:) integer :: i - + forall (i = lo:hi) ! commenting out this test for the moment (hits assert) ! thing(i)%arr = thing(hi-i)%arr @@ -125,7 +125,7 @@ ! CHECK: %[[VAL_24:.*]] = arith.subi %[[VAL_22]], %[[VAL_17]] : index ! CHECK: %[[VAL_25:.*]] = arith.addi %[[VAL_24]], %[[VAL_19]] : index ! CHECK: %[[VAL_26:.*]] = arith.divsi %[[VAL_25]], %[[VAL_19]] : index -! CHECK: %[[VAL_27:.*]] = arith.cmpi sgt, %[[VAL_26]], %[[VAL_23]] : index +! CHECK: %[[VAL_27:.*]] = arith.cmpi sgt(%[[VAL_26]], %[[VAL_23]]) : index ! CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_26]], %[[VAL_23]] : index ! CHECK: %[[VAL_29:.*]] = fir.load %[[VAL_0]] : !fir.ref ! CHECK: %[[VAL_30:.*]] = fir.convert %[[VAL_29]] : (i32) -> i64 diff --git a/flang/test/Lower/forall/forall-construct.f90 b/flang/test/Lower/forall/forall-construct.f90 --- a/flang/test/Lower/forall/forall-construct.f90 +++ b/flang/test/Lower/forall/forall-construct.f90 @@ -60,7 +60,7 @@ ! CHECK: %[[VAL_48:.*]] = fir.coordinate_of %[[VAL_1]], %[[VAL_43]], %[[VAL_47]] : (!fir.box>, i64, i64) -> !fir.ref ! CHECK: %[[VAL_49:.*]] = fir.load %[[VAL_48]] : !fir.ref ! CHECK: %[[VAL_50:.*]] = arith.constant 0.000000e+00 : f32 -! CHECK: %[[VAL_51:.*]] = arith.cmpf ogt, %[[VAL_49]], %[[VAL_50]] : f32 +! CHECK: %[[VAL_51:.*]] = arith.cmpf ogt(%[[VAL_49]], %[[VAL_50]]) : f32 ! CHECK: %[[VAL_52:.*]] = fir.if %[[VAL_51]] -> (!fir.array) { ! CHECK: %[[VAL_53:.*]] = arith.constant 1 : index ! CHECK: %[[VAL_54:.*]] = fir.load %[[VAL_2]] : !fir.ref diff --git a/flang/test/Lower/forall/forall-ranked.f90 b/flang/test/Lower/forall/forall-ranked.f90 --- a/flang/test/Lower/forall/forall-ranked.f90 +++ b/flang/test/Lower/forall/forall-ranked.f90 @@ -31,7 +31,7 @@ ! CHECK: %[[VAL_27:.*]] = arith.subi %[[VAL_25]], %[[VAL_17]] : index ! CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_27]], %[[VAL_23]] : index ! CHECK: %[[VAL_29:.*]] = arith.divsi %[[VAL_28]], %[[VAL_23]] : index -! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt, %[[VAL_29]], %[[VAL_26]] : index +! CHECK: %[[VAL_30:.*]] = arith.cmpi sgt(%[[VAL_29]], %[[VAL_26]]) : index ! CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_26]] : index ! CHECK: %[[VAL_32:.*]] = fir.field_index arr, !fir.type<_QFtest_forall_with_ranked_dimensionTt{arr:!fir.array<11xi32>}> ! CHECK-DAG: %[[VAL_33:.*]] = fir.load %[[VAL_0]] : !fir.ref @@ -68,7 +68,7 @@ integer :: arr(11) end type t type(t) :: a(10,10) - + forall (i=1:5) a(i,:)%arr(i+4) = f(i) end forall diff --git a/flang/test/Lower/forall/forall-slice.f90 b/flang/test/Lower/forall/forall-slice.f90 --- a/flang/test/Lower/forall/forall-slice.f90 +++ b/flang/test/Lower/forall/forall-slice.f90 @@ -51,7 +51,7 @@ ! CHECK: %[[VAL_48:.*]] = arith.subi %[[VAL_46]], %[[VAL_40]] : index ! CHECK: %[[VAL_49:.*]] = arith.addi %[[VAL_48]], %[[VAL_43]] : index ! CHECK: %[[VAL_50:.*]] = arith.divsi %[[VAL_49]], %[[VAL_43]] : index -! CHECK: %[[VAL_51:.*]] = arith.cmpi sgt, %[[VAL_50]], %[[VAL_47]] : index +! CHECK: %[[VAL_51:.*]] = arith.cmpi sgt(%[[VAL_50]], %[[VAL_47]]) : index ! CHECK: %[[VAL_52:.*]] = arith.select %[[VAL_51]], %[[VAL_50]], %[[VAL_47]] : index ! CHECK: %[[VAL_59:.*]] = fir.call @_QPf(%[[VAL_3]]) : (!fir.ref) -> i32 ! CHECK: %[[VAL_53:.*]] = arith.constant 1 : index diff --git a/flang/test/Lower/forall/forall-where.f90 b/flang/test/Lower/forall/forall-where.f90 --- a/flang/test/Lower/forall/forall-where.f90 +++ b/flang/test/Lower/forall/forall-where.f90 @@ -6,7 +6,7 @@ ! This has both an explicit and implicit iteration space. The WHERE construct ! makes the assignments conditional and the where mask evaluation must happen ! prior to evaluating the array assignment statement. -subroutine test_nested_forall_where(a,b) +subroutine test_nested_forall_where(a,b) type t real data(100) end type t @@ -83,7 +83,7 @@ ! CHECK: %[[VAL_59:.*]] = arith.subi %[[VAL_57]], %[[VAL_56]] : i64 ! CHECK: %[[VAL_60:.*]] = arith.addi %[[VAL_59]], %[[VAL_58]] : i64 ! CHECK: %[[VAL_61:.*]] = arith.divsi %[[VAL_60]], %[[VAL_58]] : i64 -! CHECK: %[[VAL_62:.*]] = arith.cmpi sgt, %[[VAL_61]], %[[VAL_55]] : i64 +! CHECK: %[[VAL_62:.*]] = arith.cmpi sgt(%[[VAL_61]], %[[VAL_55]]) : i64 ! CHECK: %[[VAL_63:.*]] = arith.select %[[VAL_62]], %[[VAL_61]], %[[VAL_55]] : i64 ! CHECK: %[[VAL_64:.*]] = arith.constant 0 : i64 ! CHECK: %[[VAL_65:.*]] = fir.convert %[[VAL_32]] : (index) -> i64 @@ -92,14 +92,14 @@ ! CHECK: %[[VAL_68:.*]] = arith.subi %[[VAL_66]], %[[VAL_65]] : i64 ! CHECK: %[[VAL_69:.*]] = arith.addi %[[VAL_68]], %[[VAL_67]] : i64 ! CHECK: %[[VAL_70:.*]] = arith.divsi %[[VAL_69]], %[[VAL_67]] : i64 -! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt, %[[VAL_70]], %[[VAL_64]] : i64 +! CHECK: %[[VAL_71:.*]] = arith.cmpi sgt(%[[VAL_70]], %[[VAL_64]]) : i64 ! CHECK: %[[VAL_72:.*]] = arith.select %[[VAL_71]], %[[VAL_70]], %[[VAL_64]] : i64 ! CHECK: %[[VAL_73:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_74:.*]] = fir.coordinate_of %[[VAL_8]], %[[VAL_73]] : (!fir.ref>, !fir.heap>>>, i32) -> !fir.ref>> ! CHECK: %[[VAL_75:.*]] = fir.load %[[VAL_74]] : !fir.ref>> ! CHECK: %[[VAL_76:.*]] = fir.convert %[[VAL_75]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_77:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_78:.*]] = arith.cmpi eq, %[[VAL_76]], %[[VAL_77]] : i64 +! CHECK: %[[VAL_78:.*]] = arith.cmpi eq(%[[VAL_76]], %[[VAL_77]]) : i64 ! CHECK: fir.if %[[VAL_78]] { ! CHECK: %[[VAL_79:.*]] = arith.constant true ! CHECK: %[[VAL_80:.*]] = arith.constant 2 : i64 @@ -154,7 +154,7 @@ ! CHECK: %[[VAL_126:.*]] = fir.load %[[VAL_125]] : !fir.ref>> ! CHECK: %[[VAL_127:.*]] = fir.convert %[[VAL_126]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_128:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_129:.*]] = arith.cmpi eq, %[[VAL_127]], %[[VAL_128]] : i64 +! CHECK: %[[VAL_129:.*]] = arith.cmpi eq(%[[VAL_127]], %[[VAL_128]]) : i64 ! CHECK: fir.if %[[VAL_129]] { ! CHECK: %[[VAL_130:.*]] = arith.constant false ! CHECK: %[[VAL_131:.*]] = arith.constant 1 : i64 @@ -172,7 +172,7 @@ ! CHECK: %[[VAL_141:.*]] = arith.subi %[[VAL_114]], %[[VAL_139]] : index ! CHECK: %[[VAL_142:.*]] = fir.do_loop %[[VAL_143:.*]] = %[[VAL_140]] to %[[VAL_141]] step %[[VAL_139]] unordered iter_args(%[[VAL_144:.*]] = %[[VAL_122]]) -> (!fir.array) { ! CHECK: %[[VAL_145:.*]] = fir.array_fetch %[[VAL_116]], %[[VAL_143]] : (!fir.array<100xf32>, index) -> f32 -! CHECK: %[[VAL_146:.*]] = arith.cmpf ogt, %[[VAL_145]], %[[VAL_117]] : f32 +! CHECK: %[[VAL_146:.*]] = arith.cmpf ogt(%[[VAL_145]], %[[VAL_117]]) : f32 ! CHECK: %[[VAL_147:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_148:.*]] = fir.coordinate_of %[[VAL_102]], %[[VAL_147]] : (!fir.ref>, !fir.heap>>>, i32) -> !fir.ref>> ! CHECK: %[[VAL_149:.*]] = fir.load %[[VAL_148]] : !fir.ref>> @@ -201,7 +201,7 @@ ! CHECK: %[[VAL_168:.*]] = arith.subi %[[VAL_166]], %[[VAL_165]] : i64 ! CHECK: %[[VAL_169:.*]] = arith.addi %[[VAL_168]], %[[VAL_167]] : i64 ! CHECK: %[[VAL_170:.*]] = arith.divsi %[[VAL_169]], %[[VAL_167]] : i64 -! CHECK: %[[VAL_171:.*]] = arith.cmpi sgt, %[[VAL_170]], %[[VAL_164]] : i64 +! CHECK: %[[VAL_171:.*]] = arith.cmpi sgt(%[[VAL_170]], %[[VAL_164]]) : i64 ! CHECK: %[[VAL_172:.*]] = arith.select %[[VAL_171]], %[[VAL_170]], %[[VAL_164]] : i64 ! CHECK: %[[VAL_173:.*]] = arith.constant 0 : i64 ! CHECK: %[[VAL_174:.*]] = fir.convert %[[VAL_32]] : (index) -> i64 @@ -210,7 +210,7 @@ ! CHECK: %[[VAL_177:.*]] = arith.subi %[[VAL_175]], %[[VAL_174]] : i64 ! CHECK: %[[VAL_178:.*]] = arith.addi %[[VAL_177]], %[[VAL_176]] : i64 ! CHECK: %[[VAL_179:.*]] = arith.divsi %[[VAL_178]], %[[VAL_176]] : i64 -! CHECK: %[[VAL_180:.*]] = arith.cmpi sgt, %[[VAL_179]], %[[VAL_173]] : i64 +! CHECK: %[[VAL_180:.*]] = arith.cmpi sgt(%[[VAL_179]], %[[VAL_173]]) : i64 ! CHECK: %[[VAL_181:.*]] = arith.select %[[VAL_180]], %[[VAL_179]], %[[VAL_173]] : i64 ! CHECK: %[[VAL_182:.*]] = arith.subi %[[VAL_157]], %[[VAL_19]] : index ! CHECK: %[[VAL_183:.*]] = arith.divsi %[[VAL_182]], %[[VAL_30]] : index @@ -298,7 +298,7 @@ ! CHECK: %[[VAL_262:.*]] = arith.subi %[[VAL_260]], %[[VAL_259]] : i64 ! CHECK: %[[VAL_263:.*]] = arith.addi %[[VAL_262]], %[[VAL_261]] : i64 ! CHECK: %[[VAL_264:.*]] = arith.divsi %[[VAL_263]], %[[VAL_261]] : i64 -! CHECK: %[[VAL_265:.*]] = arith.cmpi sgt, %[[VAL_264]], %[[VAL_258]] : i64 +! CHECK: %[[VAL_265:.*]] = arith.cmpi sgt(%[[VAL_264]], %[[VAL_258]]) : i64 ! CHECK: %[[VAL_266:.*]] = arith.select %[[VAL_265]], %[[VAL_264]], %[[VAL_258]] : i64 ! CHECK: %[[VAL_267:.*]] = arith.constant 0 : i64 ! CHECK: %[[VAL_268:.*]] = fir.convert %[[VAL_32]] : (index) -> i64 @@ -307,7 +307,7 @@ ! CHECK: %[[VAL_271:.*]] = arith.subi %[[VAL_269]], %[[VAL_268]] : i64 ! CHECK: %[[VAL_272:.*]] = arith.addi %[[VAL_271]], %[[VAL_270]] : i64 ! CHECK: %[[VAL_273:.*]] = arith.divsi %[[VAL_272]], %[[VAL_270]] : i64 -! CHECK: %[[VAL_274:.*]] = arith.cmpi sgt, %[[VAL_273]], %[[VAL_267]] : i64 +! CHECK: %[[VAL_274:.*]] = arith.cmpi sgt(%[[VAL_273]], %[[VAL_267]]) : i64 ! CHECK: %[[VAL_275:.*]] = arith.select %[[VAL_274]], %[[VAL_273]], %[[VAL_267]] : i64 ! CHECK: %[[VAL_276:.*]] = arith.subi %[[VAL_251]], %[[VAL_19]] : index ! CHECK: %[[VAL_277:.*]] = arith.divsi %[[VAL_276]], %[[VAL_30]] : index diff --git a/flang/test/Lower/forall/scalar-substring.f90 b/flang/test/Lower/forall/scalar-substring.f90 --- a/flang/test/Lower/forall/scalar-substring.f90 +++ b/flang/test/Lower/forall/scalar-substring.f90 @@ -37,7 +37,7 @@ ! CHECK: %[[VAL_25:.*]] = arith.subi %[[VAL_19]], %[[VAL_18]] : index ! CHECK: %[[VAL_26:.*]] = arith.addi %[[VAL_25]], %[[VAL_20]] : index ! CHECK: %[[VAL_27:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_28:.*]] = arith.cmpi slt, %[[VAL_26]], %[[VAL_27]] : index +! CHECK: %[[VAL_28:.*]] = arith.cmpi slt(%[[VAL_26]], %[[VAL_27]]) : index ! CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_28]], %[[VAL_27]], %[[VAL_26]] : index ! CHECK: %[[VAL_30:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_31:.*]] = fir.convert %[[VAL_30]] : (i32) -> i64 @@ -53,9 +53,9 @@ ! CHECK: %[[VAL_41:.*]] = arith.subi %[[VAL_35]], %[[VAL_34]] : index ! CHECK: %[[VAL_42:.*]] = arith.addi %[[VAL_41]], %[[VAL_36]] : index ! CHECK: %[[VAL_43:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_44:.*]] = arith.cmpi slt, %[[VAL_42]], %[[VAL_43]] : index +! CHECK: %[[VAL_44:.*]] = arith.cmpi slt(%[[VAL_42]], %[[VAL_43]]) : index ! CHECK: %[[VAL_45:.*]] = arith.select %[[VAL_44]], %[[VAL_43]], %[[VAL_42]] : index -! CHECK: %[[VAL_46:.*]] = arith.cmpi slt, %[[VAL_45]], %[[VAL_29]] : index +! CHECK: %[[VAL_46:.*]] = arith.cmpi slt(%[[VAL_45]], %[[VAL_29]]) : index ! CHECK: %[[VAL_47:.*]] = arith.select %[[VAL_46]], %[[VAL_45]], %[[VAL_29]] : index ! CHECK: %[[VAL_48:.*]] = arith.constant 1 : i64 ! CHECK: %[[VAL_49:.*]] = fir.convert %[[VAL_47]] : (index) -> i64 @@ -78,4 +78,3 @@ ! CHECK: } ! CHECK: return ! CHECK: } - diff --git a/flang/test/Lower/forall/test9.f90 b/flang/test/Lower/forall/test9.f90 --- a/flang/test/Lower/forall/test9.f90 +++ b/flang/test/Lower/forall/test9.f90 @@ -24,13 +24,13 @@ ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> i64 ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i64) -> index ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt, %[[VAL_6]], %[[VAL_7]] : index +! CHECK: %[[VAL_8:.*]] = arith.cmpi sgt(%[[VAL_6]], %[[VAL_7]]) : index ! CHECK: %[[VAL_9:.*]] = arith.select %[[VAL_8]], %[[VAL_6]], %[[VAL_7]] : index ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_2]] : !fir.ref ! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (i32) -> i64 ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_11]] : (i64) -> index ! CHECK: %[[VAL_13:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt, %[[VAL_12]], %[[VAL_13]] : index +! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt(%[[VAL_12]], %[[VAL_13]]) : index ! CHECK: %[[VAL_15:.*]] = arith.select %[[VAL_14]], %[[VAL_12]], %[[VAL_13]] : index ! CHECK: %[[VAL_16:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_17:.*]] = fir.convert %[[VAL_16]] : (i32) -> index diff --git a/flang/test/Lower/host-associated-functions.f90 b/flang/test/Lower/host-associated-functions.f90 --- a/flang/test/Lower/host-associated-functions.f90 +++ b/flang/test/Lower/host-associated-functions.f90 @@ -34,7 +34,7 @@ ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (i32) -> i64 ! CHECK: %[[VAL_16:.*]] = fir.convert %[[VAL_15]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index - ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[C0]] : index + ! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_16]], %[[C0]] : index ! CHECK: %[[VAL_17:.*]] = fir.call @llvm.stacksave() : () -> !fir.ref ! CHECK: %[[VAL_18:.*]] = fir.alloca !fir.char<1,?>(%[[SELECT]] : index) {bindc_name = ".result"} @@ -122,7 +122,7 @@ ! CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_12]], %[[VAL_13]] : i64 ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (i64) -> index ! CHECK: %[[C0:.*]] = arith.constant 0 : index -! CHECK: %[[CMPI:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[C0]] : index +! CHECK: %[[CMPI:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[C0]]) : index ! CHECK: %[[SELECT:.*]] = arith.select %[[CMPI]], %[[VAL_15]], %[[C0]] : index ! CHECK: %[[VAL_16:.*]] = fir.call @llvm.stacksave() : () -> !fir.ref ! CHECK: %[[VAL_17:.*]] = fir.alloca !fir.array, %[[SELECT]] {bindc_name = ".result"} diff --git a/flang/test/Lower/host-associated.f90 b/flang/test/Lower/host-associated.f90 --- a/flang/test/Lower/host-associated.f90 +++ b/flang/test/Lower/host-associated.f90 @@ -70,7 +70,7 @@ ! CHECK: %[[bb:.*]] = fir.load %[[b]] : !fir.llvm_ptr> ! CHECK-DAG: %[[bd:.*]] = fir.load %[[bb]] : !fir.ref ! CHECK-DAG: %[[ad:.*]] = fir.load %[[aa]] : !fir.ref - ! CHECK: %{{.*}} = arith.cmpf ogt, %[[ad]], %[[bd]] : f32 + ! CHECK: %{{.*}} = arith.cmpf ogt(%[[ad]], %[[bd]]) : f32 if (a > b) then b = b + 2.0 end if @@ -135,7 +135,7 @@ if (p(2) .ne. -42.0) then print *, "failed" end if - + contains ! CHECK-LABEL: func @_QFtest3Ptest3_inner( ! CHECK-SAME: %[[tup:.*]]: !fir.ref>, !fir.box>>> {fir.host_assoc}) { @@ -182,7 +182,7 @@ if (p(1) .ne. -42.0) then print *, "failed" end if - + contains ! CHECK: func @_QFtest3aPtest3a_inner( ! CHECK-SAME: %[[tup:.*]]: !fir.ref>, !fir.box>>> {fir.host_assoc}) { @@ -226,7 +226,7 @@ if (p .ne. -42.0) then print *, "failed" end if - + contains ! CHECK-LABEL: func @_QFtest4Ptest4_inner( ! CHECK-SAME:%[[tup:.*]]: !fir.ref>>, !fir.ref>>>> {fir.host_assoc}) { @@ -268,7 +268,7 @@ if (p(1) .ne. -42.0) then print *, "failed" end if - + contains ! CHECK-LABEL: func @_QFtest5Ptest5_inner( ! CHECK-SAME:%[[tup:.*]]: !fir.ref>>>, !fir.ref>>>>> {fir.host_assoc}) { @@ -420,7 +420,7 @@ subroutine bar() ! CHECK: %[[tupAddr:.*]] = fir.coordinate_of %[[tup]], %c0{{.*}} : (!fir.ref>>>>>, i32) -> !fir.llvm_ptr>>>> ! CHECK: fir.load %[[tupAddr]] : !fir.llvm_ptr>>>> - read (88, NML = a_namelist) + read (88, NML = a_namelist) end subroutine end subroutine @@ -498,7 +498,7 @@ ! CHECK: %[[VAL_22:.*]] = fir.insert_value %[[VAL_21]], %[[VAL_5]], [0 : index] : (!fir.char<1>, i8) -> !fir.char<1> ! CHECK: br ^bb1(%[[VAL_2]], %[[VAL_4]] : index, index) ! CHECK: ^bb1(%[[VAL_23:.*]]: index, %[[VAL_24:.*]]: index): -! CHECK: %[[VAL_25:.*]] = arith.cmpi sgt, %[[VAL_24]], %[[VAL_10]] : index +! CHECK: %[[VAL_25:.*]] = arith.cmpi sgt(%[[VAL_24]], %[[VAL_10]]) : index ! CHECK: cond_br %[[VAL_25]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_26:.*]] = fir.convert %[[VAL_12]] : (!fir.ref>) -> !fir.ref>> @@ -540,7 +540,7 @@ ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_9]] : !fir.ref> ! CHECK: %[[VAL_11:.*]]:2 = fir.unboxchar %[[VAL_10]] : (!fir.boxchar<1>) -> (!fir.ref>, index) ! CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_0]] : (!fir.ref>) -> !fir.ref> -! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt, %[[VAL_11]]#1, %[[VAL_4]] : index +! CHECK: %[[VAL_13:.*]] = arith.cmpi sgt(%[[VAL_11]]#1, %[[VAL_4]]) : index ! CHECK: %[[VAL_14:.*]] = arith.select %[[VAL_13]], %[[VAL_4]], %[[VAL_11]]#1 : index ! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (index) -> i64 ! CHECK: %[[VAL_16:.*]] = fir.convert %[[VAL_12]] : (!fir.ref>) -> !fir.ref @@ -551,7 +551,7 @@ ! CHECK: %[[VAL_20:.*]] = arith.subi %[[VAL_4]], %[[VAL_14]] : index ! CHECK: br ^bb1(%[[VAL_14]], %[[VAL_20]] : index, index) ! CHECK: ^bb1(%[[VAL_21:.*]]: index, %[[VAL_22:.*]]: index): -! CHECK: %[[VAL_23:.*]] = arith.cmpi sgt, %[[VAL_22]], %[[VAL_8]] : index +! CHECK: %[[VAL_23:.*]] = arith.cmpi sgt(%[[VAL_22]], %[[VAL_8]]) : index ! CHECK: cond_br %[[VAL_23]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_24:.*]] = fir.convert %[[VAL_12]] : (!fir.ref>) -> !fir.ref>> @@ -593,7 +593,7 @@ ! CHECK: fir.call @llvm.memmove.p0.p0.i64(%[[VAL_22]], %[[VAL_23]], %[[VAL_21]], %[[VAL_5]]) : (!fir.ref, !fir.ref, i64, i1) -> () ! CHECK: br ^bb1(%[[VAL_4]], %[[VAL_17]] : index, index) ! CHECK: ^bb1(%[[VAL_24:.*]]: index, %[[VAL_25:.*]]: index): -! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt, %[[VAL_25]], %[[VAL_8]] : index +! CHECK: %[[VAL_26:.*]] = arith.cmpi sgt(%[[VAL_25]], %[[VAL_8]]) : index ! CHECK: cond_br %[[VAL_26]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_27:.*]] = arith.subi %[[VAL_24]], %[[VAL_4]] : index @@ -607,7 +607,7 @@ ! CHECK: %[[VAL_34:.*]] = arith.subi %[[VAL_25]], %[[VAL_6]] : index ! CHECK: br ^bb1(%[[VAL_33]], %[[VAL_34]] : index, index) ! CHECK: ^bb3: -! CHECK: %[[VAL_35:.*]] = arith.cmpi sgt, %[[VAL_19]], %[[VAL_3]] : index +! CHECK: %[[VAL_35:.*]] = arith.cmpi sgt(%[[VAL_19]], %[[VAL_3]]) : index ! CHECK: %[[VAL_36:.*]] = arith.select %[[VAL_35]], %[[VAL_3]], %[[VAL_19]] : index ! CHECK: %[[VAL_37:.*]] = fir.convert %[[VAL_36]] : (index) -> i64 ! CHECK: %[[VAL_38:.*]] = fir.convert %[[VAL_9]] : (!fir.ref>) -> !fir.ref @@ -617,7 +617,7 @@ ! CHECK: %[[VAL_41:.*]] = arith.subi %[[VAL_3]], %[[VAL_36]] : index ! CHECK: br ^bb4(%[[VAL_36]], %[[VAL_41]] : index, index) ! CHECK: ^bb4(%[[VAL_42:.*]]: index, %[[VAL_43:.*]]: index): -! CHECK: %[[VAL_44:.*]] = arith.cmpi sgt, %[[VAL_43]], %[[VAL_8]] : index +! CHECK: %[[VAL_44:.*]] = arith.cmpi sgt(%[[VAL_43]], %[[VAL_8]]) : index ! CHECK: cond_br %[[VAL_44]], ^bb5, ^bb6 ! CHECK: ^bb5: ! CHECK: %[[VAL_45:.*]] = fir.convert %[[VAL_9]] : (!fir.ref>) -> !fir.ref>> @@ -648,7 +648,7 @@ function get_message(a) character(40) :: get_message character(*) :: a - get_message = "message is: " // a() + get_message = "message is: " // a() end function get_message ! CHECK-LABEL: func @_QPtest_11a() { diff --git a/flang/test/Lower/identical-block-merge-disable.f90 b/flang/test/Lower/identical-block-merge-disable.f90 --- a/flang/test/Lower/identical-block-merge-disable.f90 +++ b/flang/test/Lower/identical-block-merge-disable.f90 @@ -6,7 +6,7 @@ IMPLICIT NONE TYPE BLR_STRUC_T - INTEGER, DIMENSION(:), POINTER :: PANELS_L + INTEGER, DIMENSION(:), POINTER :: PANELS_L INTEGER, DIMENSION(:), POINTER :: PANELS_U INTEGER, DIMENSION(:), POINTER :: BEGS_BLR_STATIC END TYPE BLR_STRUC_T @@ -32,7 +32,7 @@ ENDIF ENDIF -END SUBROUTINE DMUMPS_SOL_FWD_LR_SU +END SUBROUTINE DMUMPS_SOL_FWD_LR_SU END MODULE DMUMPS_SOL_LR @@ -45,7 +45,7 @@ ! CHECK: %[[VAL_6:.*]] = fir.alloca i32 {bindc_name = "nb_blr", uniq_name = "_QMdmumps_sol_lrFdmumps_sol_fwd_lr_suEnb_blr"} ! CHECK: %[[VAL_7:.*]] = fir.alloca i32 {bindc_name = "npartsass", uniq_name = "_QMdmumps_sol_lrFdmumps_sol_fwd_lr_suEnpartsass"} ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_1]] : !fir.ref -! CHECK: %[[VAL_9:.*]] = arith.cmpi eq, %[[VAL_8]], %[[VAL_4]] : i32 +! CHECK: %[[VAL_9:.*]] = arith.cmpi eq(%[[VAL_8]], %[[VAL_4]]) : i32 ! CHECK: cond_br %[[VAL_9]], ^bb1, ^bb3 ! CHECK: ^bb1: ! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_5]] : !fir.ref>>,panels_u:!fir.box>>,begs_blr_static:!fir.box>>}>>>>> @@ -60,7 +60,7 @@ ! CHECK: %[[VAL_19:.*]] = fir.load %[[VAL_18]] : !fir.ref>>> ! CHECK: %[[VAL_20:.*]] = fir.box_addr %[[VAL_19]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_21:.*]] = fir.convert %[[VAL_20]] : (!fir.ptr>) -> i64 -! CHECK: %[[VAL_22:.*]] = arith.cmpi ne, %[[VAL_21]], %[[VAL_2]] : i64 +! CHECK: %[[VAL_22:.*]] = arith.cmpi ne(%[[VAL_21]], %[[VAL_2]]) : i64 ! CHECK: cond_br %[[VAL_22]], ^bb2, ^bb5 ! CHECK: ^bb2: ! CHECK: %[[VAL_23:.*]] = fir.load %[[VAL_5]] : !fir.ref>>,panels_u:!fir.box>>,begs_blr_static:!fir.box>>}>>>>> @@ -103,7 +103,7 @@ ! CHECK: %[[VAL_56:.*]] = fir.load %[[VAL_55]] : !fir.ref>>> ! CHECK: %[[VAL_57:.*]] = fir.box_addr %[[VAL_56]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_58:.*]] = fir.convert %[[VAL_57]] : (!fir.ptr>) -> i64 -! CHECK: %[[VAL_59:.*]] = arith.cmpi ne, %[[VAL_58]], %[[VAL_2]] : i64 +! CHECK: %[[VAL_59:.*]] = arith.cmpi ne(%[[VAL_58]], %[[VAL_2]]) : i64 ! CHECK: cond_br %[[VAL_59]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: %[[VAL_60:.*]] = fir.load %[[VAL_5]] : !fir.ref>>,panels_u:!fir.box>>,begs_blr_static:!fir.box>>}>>>>> @@ -136,4 +136,3 @@ ! CHECK: ^bb5: ! CHECK: return ! CHECK: } - diff --git a/flang/test/Lower/infinite_loop.f90 b/flang/test/Lower/infinite_loop.f90 --- a/flang/test/Lower/infinite_loop.f90 +++ b/flang/test/Lower/infinite_loop.f90 @@ -24,7 +24,7 @@ ! CHECK: ^[[BODY1]]: ! CHECK: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK: %[[C100:.*]] = arith.constant 100 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C100]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C100]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[EXIT:.*]], ^[[BODY1:.*]] ! CHECK: ^[[EXIT]]: ! CHECK: cf.br ^[[RETURN:.*]] @@ -50,7 +50,7 @@ ! CHECK: fir.store %[[I_NEXT]] to %[[I_REF]] : !fir.ref ! CHECK: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK: %[[C100:.*]] = arith.constant 100 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C100]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C100]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[EXIT:.*]], ^[[BODY2:.*]] ! CHECK: ^[[EXIT]]: ! CHECK: cf.br ^[[RETURN:.*]] @@ -80,7 +80,7 @@ ! CHECK: ^[[BODY1]]: ! CHECK: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK: %[[C100:.*]] = arith.constant 100 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C100]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C100]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[EXIT:.*]], ^[[BODY2:.*]] ! CHECK: ^[[EXIT]]: ! CHECK: cf.br ^[[RETURN:.*]] @@ -119,7 +119,7 @@ ! CHECK: ^bb1: ! CHECK: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK: %[[C50:.*]] = arith.constant 50 : i32 -! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C50]] : i32 +! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C50]]) : i32 ! CHECK: cf.cond_br %[[COND]], ^[[INF_HEADER:.*]], ^[[EXIT:.*]] ! CHECK: ^[[INF_HEADER]]: ! CHECK: cf.br ^[[INF_BODY:.*]] diff --git a/flang/test/Lower/integer-operations.f90 b/flang/test/Lower/integer-operations.f90 --- a/flang/test/Lower/integer-operations.f90 +++ b/flang/test/Lower/integer-operations.f90 @@ -8,7 +8,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi eq, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi eq([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> eq0_test = x0 .EQ. x1 END FUNCTION @@ -19,7 +19,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi ne, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi ne([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> ne1_test = x0 .NE. x1 END FUNCTION @@ -30,7 +30,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi slt, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi slt([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> lt2_test = x0 .LT. x1 END FUNCTION @@ -41,7 +41,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sle, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sle([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> le3_test = x0 .LE. x1 END FUNCTION @@ -52,7 +52,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sgt, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sgt([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> gt4_test = x0 .GT. x1 END FUNCTION @@ -63,7 +63,7 @@ INTEGER(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sge, [[reg1]], [[reg2]] : i32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpi sge([[reg1]], [[reg2]]) : i32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> ge5_test = x0 .GE. x1 END FUNCTION diff --git a/flang/test/Lower/io-statement-big-unit-checks.f90 b/flang/test/Lower/io-statement-big-unit-checks.f90 --- a/flang/test/Lower/io-statement-big-unit-checks.f90 +++ b/flang/test/Lower/io-statement-big-unit-checks.f90 @@ -168,7 +168,7 @@ ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 ! CHECK: %[[VAL_9:.*]] = fir.call @_FortranAioCheckUnitNumberInRange64(%[[VAL_2]], %[[VAL_3]], %[[VAL_4]], %[[VAL_5]], %{{.*}}, %{{.*}}) : (i64, i1, !fir.ref, i64, !fir.ref, i32) -> i32 ! CHECK: %[[VAL_10:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_11:.*]] = arith.cmpi eq, %[[VAL_9]], %[[VAL_10]] : i32 +! CHECK: %[[VAL_11:.*]] = arith.cmpi eq(%[[VAL_9]], %[[VAL_10]]) : i32 ! CHECK: %[[VAL_12:.*]] = fir.if %[[VAL_11]] -> (i32) { ! CHECK: %[[VAL_13:.*]] = fir.convert %[[VAL_2]] : (i64) -> i32 ! CHECK: %[[VAL_17:.*]] = fir.call @_FortranAioBeginOpenUnit(%[[VAL_13]], %{{.*}}, {{.*}}) : (i32, !fir.ref, i32) -> !fir.ref @@ -200,7 +200,7 @@ ! CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_2]]#1 : (index) -> i64 ! CHECK: %[[VAL_10:.*]] = fir.call @_FortranAioCheckUnitNumberInRange64(%[[VAL_3]], %[[VAL_4]], %[[VAL_5]], %[[VAL_6]], %{{.*}}, %{{.*}}) : (i64, i1, !fir.ref, i64, !fir.ref, i32) -> i32 ! CHECK: %[[VAL_11:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_12:.*]] = arith.cmpi eq, %[[VAL_10]], %[[VAL_11]] : i32 +! CHECK: %[[VAL_12:.*]] = arith.cmpi eq(%[[VAL_10]], %[[VAL_11]]) : i32 ! CHECK: %[[VAL_13:.*]] = fir.if %[[VAL_12]] -> (i32) { ! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_3]] : (i64) -> i32 ! CHECK: %[[VAL_18:.*]] = fir.call @_FortranAioBeginOpenUnit(%[[VAL_14]], %{{.*}}, %{{.*}}) : (i32, !fir.ref, i32) -> !fir.ref @@ -278,7 +278,7 @@ ! CHECK: fir.save_result %[[VAL_42]] to %[[VAL_6:.*]] : !fir.box>, !fir.ref>> ! CHECK: %[[VAL_57:.*]] = fir.call @_FortranAioCheckUnitNumberInRange64( ! CHECK: %[[VAL_58:.*]] = arith.constant 0 : i32 -! CHECK: %[[VAL_59:.*]] = arith.cmpi eq, %[[VAL_57]], %[[VAL_58]] : i32 +! CHECK: %[[VAL_59:.*]] = arith.cmpi eq(%[[VAL_57]], %[[VAL_58]]) : i32 ! CHECK: %[[VAL_60:.*]] = fir.if %[[VAL_59]] -> (i32) { ! CHECK: fir.call @_FortranAioBeginUnformattedOutput( ! CHECK: fir.call @_FortranAioEnableHandlers( diff --git a/flang/test/Lower/logical-operations.f90 b/flang/test/Lower/logical-operations.f90 --- a/flang/test/Lower/logical-operations.f90 +++ b/flang/test/Lower/logical-operations.f90 @@ -10,7 +10,7 @@ ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 ! CHECK-DAG:[[reg3:%[0-9]+]] = fir.convert [[reg1]] {{.*}} -> i1 ! CHECK-DAG:[[reg4:%[0-9]+]] = fir.convert [[reg2]] {{.*}} -> i1 -! CHECK:[[reg5:%[0-9]+]] = arith.cmpi eq, [[reg3]], [[reg4]] +! CHECK:[[reg5:%[0-9]+]] = arith.cmpi eq([[reg3]], [[reg4]]) ! CHECK:fir.convert [[reg5]] {{.*}} -> !fir.logical<1> eqv0_test = x0 .EQV. x1 END FUNCTION @@ -23,7 +23,7 @@ ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 ! CHECK-DAG:[[reg3:%[0-9]+]] = fir.convert [[reg1]] {{.*}} -> i1 ! CHECK-DAG:[[reg4:%[0-9]+]] = fir.convert [[reg2]] {{.*}} -> i1 -! CHECK:[[reg5:%[0-9]+]] = arith.cmpi ne, [[reg3]], [[reg4]] +! CHECK:[[reg5:%[0-9]+]] = arith.cmpi ne([[reg3]], [[reg4]]) ! CHECK:fir.convert [[reg5]] {{.*}} -> !fir.logical<1> neqv1_test = x0 .NEQV. x1 END FUNCTION diff --git a/flang/test/Lower/mixed_loops.f90 b/flang/test/Lower/mixed_loops.f90 --- a/flang/test/Lower/mixed_loops.f90 +++ b/flang/test/Lower/mixed_loops.f90 @@ -22,7 +22,7 @@ ! CHECK: ^[[HDR1]]: // 2 preds: ^{{.*}}, ^[[EXIT2:.*]] ! CHECK-DAG: %[[T:.*]] = fir.load %[[T_REF]] : !fir.ref ! CHECK-DAG: %[[C0:.*]] = arith.constant 0 : i32 - ! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[T]], %[[C0]] : i32 + ! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[T]], %[[C0]]) : i32 ! CHECK: cond_br %[[COND]], ^[[BODY1:.*]], ^[[EXIT1:.*]] do i=8,13 ! CHECK: ^[[BODY1]]: // pred: ^[[HDR1]] @@ -34,7 +34,7 @@ ! CHECK: ^[[HDR2]]: // 2 preds: ^[[BODY1]], ^[[BODY2:.*]] ! CHECK-DAG: %[[J:.*]] = fir.load %[[J_REF]] : !fir.ref ! CHECK-DAG: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref - ! CHECK: %[[COND2:.*]] = arith.cmpi slt, %[[J]], %[[I]] : i32 + ! CHECK: %[[COND2:.*]] = arith.cmpi slt(%[[J]], %[[I]]) : i32 ! CHECK: cond_br %[[COND2]], ^[[BODY2]], ^[[EXIT2]] do while (j .lt. i) ! CHECK: ^[[BODY2]]: // pred: ^[[HDR2]] @@ -80,7 +80,7 @@ ! CHECK: ^[[HDR1]]: // 2 preds: ^{{.*}}, ^[[BODY1:.*]] ! CHECK-DAG: %[[J:.*]] = fir.load %[[J_REF]] : !fir.ref ! CHECK-DAG: %[[UL:.*]] = arith.constant 21 : i32 - ! CHECK: %[[COND:.*]] = arith.cmpi slt, %[[J]], %[[UL]] : i32 + ! CHECK: %[[COND:.*]] = arith.cmpi slt(%[[J]], %[[UL]]) : i32 ! CHECK: cond_br %[[COND]], ^[[BODY1]], ^[[EXIT1:.*]] do while (j .lt. 21) ! CHECK: ^[[BODY1]]: // pred: ^[[HDR1]] diff --git a/flang/test/Lower/nested-where.f90 b/flang/test/Lower/nested-where.f90 --- a/flang/test/Lower/nested-where.f90 +++ b/flang/test/Lower/nested-where.f90 @@ -56,14 +56,14 @@ ! CHECK: %[[VAL_45:.*]] = arith.subi %[[VAL_43]], %[[VAL_42]] : i64 ! CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_45]], %[[VAL_44]] : i64 ! CHECK: %[[VAL_47:.*]] = arith.divsi %[[VAL_46]], %[[VAL_44]] : i64 - ! CHECK: %[[VAL_48:.*]] = arith.cmpi sgt, %[[VAL_47]], %[[VAL_41]] : i64 + ! CHECK: %[[VAL_48:.*]] = arith.cmpi sgt(%[[VAL_47]], %[[VAL_41]]) : i64 ! CHECK: %[[VAL_49:.*]] = arith.select %[[VAL_48]], %[[VAL_47]], %[[VAL_41]] : i64 ! CHECK: %[[VAL_50:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_51:.*]] = fir.coordinate_of %[[VAL_4]], %[[VAL_50]] : (!fir.ref>, !fir.heap>>>, i32) -> !fir.ref>> ! CHECK: %[[VAL_52:.*]] = fir.load %[[VAL_51]] : !fir.ref>> ! CHECK: %[[VAL_53:.*]] = fir.convert %[[VAL_52]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_54:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_55:.*]] = arith.cmpi eq, %[[VAL_53]], %[[VAL_54]] : i64 + ! CHECK: %[[VAL_55:.*]] = arith.cmpi eq(%[[VAL_53]], %[[VAL_54]]) : i64 ! CHECK: fir.if %[[VAL_55]] { ! CHECK: %[[VAL_56:.*]] = arith.constant true ! CHECK: %[[VAL_57:.*]] = arith.constant 1 : i64 @@ -98,7 +98,7 @@ ! CHECK: %[[VAL_84:.*]] = fir.load %[[VAL_83]] : !fir.ref>> ! CHECK: %[[VAL_85:.*]] = fir.convert %[[VAL_84]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_86:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_87:.*]] = arith.cmpi eq, %[[VAL_85]], %[[VAL_86]] : i64 + ! CHECK: %[[VAL_87:.*]] = arith.cmpi eq(%[[VAL_85]], %[[VAL_86]]) : i64 ! CHECK: fir.if %[[VAL_87]] { ! CHECK: %[[VAL_88:.*]] = arith.constant false ! CHECK: %[[VAL_89:.*]] = arith.constant 1 : i64 @@ -140,14 +140,14 @@ ! CHECK: %[[VAL_121:.*]] = arith.subi %[[VAL_119]], %[[VAL_118]] : i64 ! CHECK: %[[VAL_122:.*]] = arith.addi %[[VAL_121]], %[[VAL_120]] : i64 ! CHECK: %[[VAL_123:.*]] = arith.divsi %[[VAL_122]], %[[VAL_120]] : i64 - ! CHECK: %[[VAL_124:.*]] = arith.cmpi sgt, %[[VAL_123]], %[[VAL_117]] : i64 + ! CHECK: %[[VAL_124:.*]] = arith.cmpi sgt(%[[VAL_123]], %[[VAL_117]]) : i64 ! CHECK: %[[VAL_125:.*]] = arith.select %[[VAL_124]], %[[VAL_123]], %[[VAL_117]] : i64 ! CHECK: %[[VAL_126:.*]] = arith.constant 1 : i32 ! CHECK: %[[VAL_127:.*]] = fir.coordinate_of %[[VAL_3]], %[[VAL_126]] : (!fir.ref>, !fir.heap>>>, i32) -> !fir.ref>> ! CHECK: %[[VAL_128:.*]] = fir.load %[[VAL_127]] : !fir.ref>> ! CHECK: %[[VAL_129:.*]] = fir.convert %[[VAL_128]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_130:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_131:.*]] = arith.cmpi eq, %[[VAL_129]], %[[VAL_130]] : i64 + ! CHECK: %[[VAL_131:.*]] = arith.cmpi eq(%[[VAL_129]], %[[VAL_130]]) : i64 ! CHECK: fir.if %[[VAL_131]] { ! CHECK: %[[VAL_132:.*]] = arith.constant true ! CHECK: %[[VAL_133:.*]] = arith.constant 1 : i64 @@ -182,7 +182,7 @@ ! CHECK: %[[VAL_160:.*]] = fir.load %[[VAL_159]] : !fir.ref>> ! CHECK: %[[VAL_161:.*]] = fir.convert %[[VAL_160]] : (!fir.heap>) -> i64 ! CHECK: %[[VAL_162:.*]] = arith.constant 0 : i64 - ! CHECK: %[[VAL_163:.*]] = arith.cmpi eq, %[[VAL_161]], %[[VAL_162]] : i64 + ! CHECK: %[[VAL_163:.*]] = arith.cmpi eq(%[[VAL_161]], %[[VAL_162]]) : i64 ! CHECK: fir.if %[[VAL_163]] { ! CHECK: %[[VAL_164:.*]] = arith.constant false ! CHECK: %[[VAL_165:.*]] = arith.constant 1 : i64 @@ -223,7 +223,7 @@ ! CHECK: %[[VAL_196:.*]] = arith.subi %[[VAL_194]], %[[VAL_193]] : i64 ! CHECK: %[[VAL_197:.*]] = arith.addi %[[VAL_196]], %[[VAL_195]] : i64 ! CHECK: %[[VAL_198:.*]] = arith.divsi %[[VAL_197]], %[[VAL_195]] : i64 - ! CHECK: %[[VAL_199:.*]] = arith.cmpi sgt, %[[VAL_198]], %[[VAL_192]] : i64 + ! CHECK: %[[VAL_199:.*]] = arith.cmpi sgt(%[[VAL_198]], %[[VAL_192]]) : i64 ! CHECK: %[[VAL_200:.*]] = arith.select %[[VAL_199]], %[[VAL_198]], %[[VAL_192]] : i64 ! CHECK: %[[VAL_201:.*]] = arith.subi %[[VAL_189]], %[[VAL_30]] : index ! CHECK: %[[VAL_202:.*]] = arith.divsi %[[VAL_201]], %[[VAL_33]] : index @@ -254,7 +254,7 @@ ! CHECK: %[[VAL_227:.*]] = arith.subi %[[VAL_225]], %[[VAL_224]] : i64 ! CHECK: %[[VAL_228:.*]] = arith.addi %[[VAL_227]], %[[VAL_226]] : i64 ! CHECK: %[[VAL_229:.*]] = arith.divsi %[[VAL_228]], %[[VAL_226]] : i64 - ! CHECK: %[[VAL_230:.*]] = arith.cmpi sgt, %[[VAL_229]], %[[VAL_223]] : i64 + ! CHECK: %[[VAL_230:.*]] = arith.cmpi sgt(%[[VAL_229]], %[[VAL_223]]) : i64 ! CHECK: %[[VAL_231:.*]] = arith.select %[[VAL_230]], %[[VAL_229]], %[[VAL_223]] : i64 ! CHECK: %[[VAL_232:.*]] = arith.subi %[[VAL_189]], %[[VAL_30]] : index ! CHECK: %[[VAL_233:.*]] = arith.divsi %[[VAL_232]], %[[VAL_33]] : index @@ -313,7 +313,7 @@ ! CHECK: %[[VAL_279:.*]] = fir.call @_FortranARaggedArrayDeallocate(%[[VAL_278]]) : (!fir.llvm_ptr) -> none ! CHECK: %[[VAL_280:.*]] = fir.convert %[[VAL_4]] : (!fir.ref>, !fir.heap>>>) -> !fir.llvm_ptr ! CHECK: %[[VAL_281:.*]] = fir.call @_FortranARaggedArrayDeallocate(%[[VAL_280]]) : (!fir.llvm_ptr) -> none - + integer :: a(3) = 0 logical :: mask1(3) = (/ .true.,.false.,.true. /) logical :: mask2(3) = (/ .true.,.true.,.false. /) diff --git a/flang/test/Lower/optional-value-caller.f90 b/flang/test/Lower/optional-value-caller.f90 --- a/flang/test/Lower/optional-value-caller.f90 +++ b/flang/test/Lower/optional-value-caller.f90 @@ -99,7 +99,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.box_addr %[[VAL_2]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_6:.*]] = arith.cmpi ne, %[[VAL_4]], %[[VAL_5]] : i64 +! CHECK: %[[VAL_6:.*]] = arith.cmpi ne(%[[VAL_4]], %[[VAL_5]]) : i64 ! CHECK: %[[VAL_7:.*]] = fir.load %[[VAL_0]] : !fir.ref>> ! CHECK: %[[VAL_8:.*]] = fir.box_addr %[[VAL_7]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_6]] -> (!fir.ref) { @@ -135,7 +135,7 @@ ! CHECK: %[[VAL_3:.*]] = fir.box_addr %[[VAL_2]] : (!fir.box>) -> !fir.heap ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.heap) -> i64 ! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_6:.*]] = arith.cmpi ne, %[[VAL_4]], %[[VAL_5]] : i64 +! CHECK: %[[VAL_6:.*]] = arith.cmpi ne(%[[VAL_4]], %[[VAL_5]]) : i64 ! CHECK: %[[VAL_7:.*]] = fir.load %[[VAL_0]] : !fir.ref>> ! CHECK: %[[VAL_8:.*]] = fir.box_addr %[[VAL_7]] : (!fir.box>) -> !fir.heap ! CHECK: %[[VAL_9:.*]] = fir.if %[[VAL_6]] -> (!fir.ref) { @@ -160,7 +160,7 @@ ! CHECK: %[[VAL_4:.*]] = fir.box_addr %[[VAL_3]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (!fir.ptr) -> i64 ! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_7:.*]] = arith.cmpi ne, %[[VAL_5]], %[[VAL_6]] : i64 +! CHECK: %[[VAL_7:.*]] = arith.cmpi ne(%[[VAL_5]], %[[VAL_6]]) : i64 ! CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_1]] : !fir.ref>> ! CHECK: %[[VAL_9:.*]] = fir.box_addr %[[VAL_8]] : (!fir.box>) -> !fir.ptr ! CHECK: %[[VAL_10:.*]] = fir.if %[[VAL_7]] -> (!fir.ref) { @@ -218,7 +218,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (i64) -> index ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[VAL_4]] : index +! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[VAL_4]]) : index ! CHECK: %[[VAL_6:.*]] = arith.select %[[VAL_5]], %[[VAL_3]], %[[VAL_4]] : index ! CHECK: %[[VAL_7:.*]] = fir.is_present %[[VAL_0]] : (!fir.ref>) -> i1 ! CHECK: %[[VAL_8:.*]] = fir.if %[[VAL_7]] -> (!fir.heap>) { @@ -248,7 +248,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.load %[[VAL_1]] : !fir.ref ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (i64) -> index ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : index -! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt, %[[VAL_3]], %[[VAL_4]] : index +! CHECK: %[[VAL_5:.*]] = arith.cmpi sgt(%[[VAL_3]], %[[VAL_4]]) : index ! CHECK: %[[VAL_6:.*]] = arith.select %[[VAL_5]], %[[VAL_3]], %[[VAL_4]] : index ! CHECK: %[[VAL_7:.*]] = fir.is_present %[[VAL_0]] : (!fir.ref>) -> i1 ! CHECK: %[[VAL_8:.*]] = fir.if %[[VAL_7]] -> (!fir.heap>) { @@ -309,7 +309,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi ne, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi ne(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_7:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_8:.*]]:3 = fir.box_dims %[[VAL_6]], %[[VAL_7]] : (!fir.box>>, index) -> (index, index, index) @@ -364,7 +364,7 @@ ! CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box>>) -> !fir.ptr> ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (!fir.ptr>) -> i64 ! CHECK: %[[VAL_4:.*]] = arith.constant 0 : i64 -! CHECK: %[[VAL_5:.*]] = arith.cmpi ne, %[[VAL_3]], %[[VAL_4]] : i64 +! CHECK: %[[VAL_5:.*]] = arith.cmpi ne(%[[VAL_3]], %[[VAL_4]]) : i64 ! CHECK: %[[VAL_6:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> ! CHECK: %[[VAL_7:.*]] = fir.box_elesize %[[VAL_6]] : (!fir.box>>) -> index ! CHECK: %[[VAL_8:.*]] = fir.box_addr %[[VAL_6]] : (!fir.box>>) -> !fir.ptr> diff --git a/flang/test/Lower/pointer-initial-target.f90 b/flang/test/Lower/pointer-initial-target.f90 --- a/flang/test/Lower/pointer-initial-target.f90 +++ b/flang/test/Lower/pointer-initial-target.f90 @@ -175,7 +175,7 @@ ! CHECK: %[[VAL_18:.*]] = arith.subi %[[VAL_16]], %[[VAL_12]] : index ! CHECK: %[[VAL_19:.*]] = arith.addi %[[VAL_18]], %[[VAL_14]] : index ! CHECK: %[[VAL_20:.*]] = arith.divsi %[[VAL_19]], %[[VAL_14]] : index -! CHECK: %[[VAL_21:.*]] = arith.cmpi sgt, %[[VAL_20]], %[[VAL_17]] : index +! CHECK: %[[VAL_21:.*]] = arith.cmpi sgt(%[[VAL_20]], %[[VAL_17]]) : index ! CHECK: %[[VAL_22:.*]] = arith.select %[[VAL_21]], %[[VAL_20]], %[[VAL_17]] : index ! CHECK: %[[VAL_23:.*]] = fir.shape_shift %[[VAL_1]], %[[VAL_2]], %[[VAL_3]], %[[VAL_4]] : (index, index, index, index) -> !fir.shapeshift<2> ! CHECK: %[[VAL_24:.*]] = fir.slice %[[VAL_7]], %[[VAL_8]], %[[VAL_8]], %[[VAL_12]], %[[VAL_16]], %[[VAL_14]] : (i64, index, index, index, index, index) -> !fir.slice<2> diff --git a/flang/test/Lower/pointer-references.f90 b/flang/test/Lower/pointer-references.f90 --- a/flang/test/Lower/pointer-references.f90 +++ b/flang/test/Lower/pointer-references.f90 @@ -92,7 +92,7 @@ ! CHECK: %[[VAL_13:.*]] = arith.subi %[[VAL_11]], %[[VAL_7]] : index ! CHECK: %[[VAL_14:.*]] = arith.addi %[[VAL_13]], %[[VAL_9]] : index ! CHECK: %[[VAL_15:.*]] = arith.divsi %[[VAL_14]], %[[VAL_9]] : index - ! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt, %[[VAL_15]], %[[VAL_12]] : index + ! CHECK: %[[VAL_16:.*]] = arith.cmpi sgt(%[[VAL_15]], %[[VAL_12]]) : index ! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_16]], %[[VAL_15]], %[[VAL_12]] : index ! CHECK: %[[VAL_18:.*]] = fir.shift %[[VAL_5]]#0 : (index) -> !fir.shift<1> ! CHECK: %[[VAL_19:.*]] = fir.slice %[[VAL_7]], %[[VAL_11]], %[[VAL_9]] : (index, index, index) -> !fir.slice<1> @@ -137,7 +137,7 @@ ! CHECK: %[[VAL_14:.*]] = arith.subi %[[VAL_12]], %[[VAL_8]] : index ! CHECK: %[[VAL_15:.*]] = arith.addi %[[VAL_14]], %[[VAL_10]] : index ! CHECK: %[[VAL_16:.*]] = arith.divsi %[[VAL_15]], %[[VAL_10]] : index - ! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt, %[[VAL_16]], %[[VAL_13]] : index + ! CHECK: %[[VAL_17:.*]] = arith.cmpi sgt(%[[VAL_16]], %[[VAL_13]]) : index ! CHECK: %[[VAL_18:.*]] = arith.select %[[VAL_17]], %[[VAL_16]], %[[VAL_13]] : index ! CHECK: %[[VAL_19:.*]] = fir.shape_shift %[[VAL_5]]#0, %[[VAL_5]]#1 : (index, index) -> !fir.shapeshift<1> ! CHECK: %[[VAL_20:.*]] = fir.slice %[[VAL_8]], %[[VAL_12]], %[[VAL_10]] : (index, index, index) -> !fir.slice<1> diff --git a/flang/test/Lower/real-operations-2.f90 b/flang/test/Lower/real-operations-2.f90 --- a/flang/test/Lower/real-operations-2.f90 +++ b/flang/test/Lower/real-operations-2.f90 @@ -8,7 +8,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf oeq, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf oeq([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> eq0_test = x0 .EQ. x1 END FUNCTION @@ -19,7 +19,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf une, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf une([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> ne1_test = x0 .NE. x1 END FUNCTION @@ -30,7 +30,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf olt, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf olt([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> lt2_test = x0 .LT. x1 END FUNCTION @@ -41,7 +41,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf ole, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf ole([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> le3_test = x0 .LE. x1 END FUNCTION @@ -52,7 +52,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf ogt, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf ogt([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> gt4_test = x0 .GT. x1 END FUNCTION @@ -63,7 +63,7 @@ REAL(4) :: x1 ! CHECK-DAG:[[reg1:%[0-9]+]] = fir.load %arg0 ! CHECK-DAG:[[reg2:%[0-9]+]] = fir.load %arg1 -! CHECK:[[reg3:%[0-9]+]] = arith.cmpf oge, [[reg1]], [[reg2]] : f32 +! CHECK:[[reg3:%[0-9]+]] = arith.cmpf oge([[reg1]], [[reg2]]) : f32 ! CHECK:fir.convert [[reg3]] {{.*}} -> !fir.logical<4> ge5_test = x0 .GE. x1 END FUNCTION diff --git a/flang/test/Lower/select-case-statement.f90 b/flang/test/Lower/select-case-statement.f90 --- a/flang/test/Lower/select-case-statement.f90 +++ b/flang/test/Lower/select-case-statement.f90 @@ -49,14 +49,14 @@ end select select case (L) - ! CHECK: cmpi eq, {{.*}} %false + ! CHECK: cmpi eq{{.*}} %false ! CHECK: cond_br case (.false.) n2 = 1 end select select case (L) - ! CHECK: cmpi eq, {{.*}} %true + ! CHECK: cmpi eq{{.*}} %true ! CHECK: cond_br case (.true.) n3 = 2 @@ -68,18 +68,18 @@ end select select case (L) - ! CHECK: cmpi eq, {{.*}} %false + ! CHECK: cmpi eq{{.*}} %false ! CHECK: cond_br case (.false.) n5 = 1 - ! CHECK: cmpi eq, {{.*}} %true + ! CHECK: cmpi eq{{.*}} %true ! CHECK: cond_br case (.true.) n5 = 2 end select select case (L) - ! CHECK: cmpi eq, {{.*}} %false + ! CHECK: cmpi eq{{.*}} %false ! CHECK: cond_br case (.false.) n6 = 1 @@ -88,7 +88,7 @@ end select select case (L) - ! CHECK: cmpi eq, {{.*}} %true + ! CHECK: cmpi eq{{.*}} %true ! CHECK: cond_br case (.true.) n7 = 2 @@ -97,11 +97,11 @@ end select select case (L) - ! CHECK: cmpi eq, {{.*}} %false + ! CHECK: cmpi eq{{.*}} %false ! CHECK: cond_br case (.false.) n8 = 1 - ! CHECK: cmpi eq, {{.*}} %true + ! CHECK: cmpi eq{{.*}} %true ! CHECK: cond_br case (.true.) n8 = 2 @@ -122,35 +122,35 @@ nn = -1 ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi sle, {{.*}} %c0 + ! CHECK-NEXT: cmpi sle{{.*}} %c0 ! CHECK-NEXT: cond_br case (:'d') nn = 10 ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi sge, {{.*}} %c0 + ! CHECK-NEXT: cmpi sge{{.*}} %c0 ! CHECK-NEXT: cond_br ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi sle, {{.*}} %c0 + ! CHECK-NEXT: cmpi sle{{.*}} %c0 ! CHECK-NEXT: cond_br case ('ff':'ffff') nn = 20 ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi eq, {{.*}} %c0 + ! CHECK-NEXT: cmpi eq{{.*}} %c0 ! CHECK-NEXT: cond_br case ('m') nn = 30 ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi eq, {{.*}} %c0 + ! CHECK-NEXT: cmpi eq{{.*}} %c0 ! CHECK-NEXT: cond_br case ('qq') nn = 40 ! CHECK: CharacterCompareScalar1 ! CHECK-NEXT: constant 0 - ! CHECK-NEXT: cmpi sge, {{.*}} %c0 + ! CHECK-NEXT: cmpi sge{{.*}} %c0 ! CHECK-NEXT: cond_br case ('x':) nn = 50 @@ -167,7 +167,7 @@ n = 0 ! CHECK: %[[V_8:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi sge, %[[V_8]], %c0{{.*}} : i32 + ! CHECK: %[[V_9:[0-9]+]] = arith.cmpi sge(%[[V_8]], %c0{{.*}}) : i32 ! CHECK: cond_br %[[V_9]], ^bb1, ^bb15 ! CHECK: ^bb1: // pred: ^bb0 if (lge(s,'00')) then @@ -175,7 +175,7 @@ ! CHECK: %[[V_18:[0-9]+]] = fir.load %[[V_0]] : !fir.ref>>> ! CHECK: %[[V_20:[0-9]+]] = fir.box_addr %[[V_18]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[V_42:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_43:[0-9]+]] = arith.cmpi eq, %[[V_42]], %c0{{.*}} : i32 + ! CHECK: %[[V_43:[0-9]+]] = arith.cmpi eq(%[[V_42]], %c0{{.*}}) : i32 ! CHECK: fir.if %[[V_43]] { ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: } @@ -189,7 +189,7 @@ continue ! CHECK: %[[V_48:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_49:[0-9]+]] = arith.cmpi eq, %[[V_48]], %c0{{.*}} : i32 + ! CHECK: %[[V_49:[0-9]+]] = arith.cmpi eq(%[[V_48]], %c0{{.*}}) : i32 ! CHECK: fir.if %[[V_49]] { ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: } @@ -202,7 +202,7 @@ n = 2 ! CHECK: %[[V_54:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_55:[0-9]+]] = arith.cmpi eq, %[[V_54]], %c0{{.*}} : i32 + ! CHECK: %[[V_55:[0-9]+]] = arith.cmpi eq(%[[V_54]], %c0{{.*}}) : i32 ! CHECK: fir.if %[[V_55]] { ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: } @@ -216,30 +216,30 @@ case('44':'55','66':'77','88':) n = 4 ! CHECK: %[[V_60:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_61:[0-9]+]] = arith.cmpi sge, %[[V_60]], %c0{{.*}} : i32 + ! CHECK: %[[V_61:[0-9]+]] = arith.cmpi sge(%[[V_60]], %c0{{.*}}) : i32 ! CHECK: cond_br %[[V_61]], ^bb9, ^bb10 ! CHECK: ^bb8: // pred: ^bb5 ! CHECK: fir.store %c3{{.*}} to %[[V_1]] : !fir.ref ! CHECK: ^bb9: // pred: ^bb7 ! CHECK: %[[V_66:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_67:[0-9]+]] = arith.cmpi sle, %[[V_66]], %c0{{.*}} : i32 + ! CHECK: %[[V_67:[0-9]+]] = arith.cmpi sle(%[[V_66]], %c0{{.*}}) : i32 ! CHECK: fir.if %[[V_67]] { ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: } ! CHECK: cond_br %[[V_67]], ^bb14, ^bb10 ! CHECK: ^bb10: // 2 preds: ^bb7, ^bb9 ! CHECK: %[[V_72:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_73:[0-9]+]] = arith.cmpi sge, %[[V_72]], %c0{{.*}} : i32 + ! CHECK: %[[V_73:[0-9]+]] = arith.cmpi sge(%[[V_72]], %c0{{.*}}) : i32 ! CHECK: cond_br %[[V_73]], ^bb11, ^bb12 ! CHECK: ^bb11: // pred: ^bb10 ! CHECK: %[[V_78:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_79:[0-9]+]] = arith.cmpi sle, %[[V_78]], %c0{{.*}} : i32 + ! CHECK: %[[V_79:[0-9]+]] = arith.cmpi sle(%[[V_78]], %c0{{.*}}) : i32 ! CHECK: fir.if %[[V_79]] { ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: } ! CHECK: ^bb12: // 2 preds: ^bb10, ^bb11 ! CHECK: %[[V_84:[0-9]+]] = fir.call @_FortranACharacterCompareScalar1 - ! CHECK: %[[V_85:[0-9]+]] = arith.cmpi sge, %[[V_84]], %c0{{.*}} : i32 + ! CHECK: %[[V_85:[0-9]+]] = arith.cmpi sge(%[[V_84]], %c0{{.*}}) : i32 ! CHECK: fir.freemem %[[V_20]] : !fir.heap> ! CHECK: cond_br %[[V_85]], ^bb14, ^bb13 ! CHECK: ^bb13: // pred: ^bb12 @@ -386,7 +386,7 @@ call scharacter1('00 ') ! expected output: 0 call scharacter1('. ') ! expected output: 0 call scharacter1(' ') ! expected output: 0 - + print* call scharacter2('99 ') ! expected output: 9 -2 call scharacter2('22 ') ! expected output: 9 -2 diff --git a/flang/test/Lower/statement-function.f90 b/flang/test/Lower/statement-function.f90 --- a/flang/test/Lower/statement-function.f90 +++ b/flang/test/Lower/statement-function.f90 @@ -21,7 +21,7 @@ ! Check this is not lowered as a simple macro: e.g. argument is only ! evaluated once even if it appears in several placed inside the -! statement function expression +! statement function expression ! CHECK-LABEL: func @_QPtest_stmt_only_eval_arg_once() -> f32 real(4) function test_stmt_only_eval_arg_once() real(4) :: only_once, x1 @@ -129,7 +129,7 @@ ! CHECK: %[[unboxed:.*]]:2 = fir.unboxchar %[[arg0]] : ! CHECK: fir.load %[[arg1]] : !fir.ref ! CHECK: %[[n:.*]] = fir.load %[[arg1]] : !fir.ref - ! CHECK: %[[n_is_positive:.*]] = arith.cmpi sgt, %[[n]], %c0{{.*}} : i32 + ! CHECK: %[[n_is_positive:.*]] = arith.cmpi sgt(%[[n]], %c0{{.*}}) : i32 ! CHECK: %[[len:.*]] = arith.select %[[n_is_positive]], %[[n]], %c0{{.*}} : i32 ! CHECK: %[[lenCast:.*]] = fir.convert %[[len]] : (i32) -> index ! CHECK: %[[argc:.*]] = fir.emboxchar %[[unboxed]]#0, %[[lenCast]] : (!fir.ref>, index) -> !fir.boxchar<1> @@ -163,7 +163,7 @@ ! CHECK: %[[temp:.*]] = fir.alloca !fir.char<1,10> {bindc_name = ".chrtmp"} ! CHECK: %[[c10_index:.*]] = fir.convert %[[c10]] : (i64) -> index ! CHECK: %[[c4_index:.*]] = fir.convert %[[c4]] : (i32) -> index -! CHECK: %[[cmpi:.*]] = arith.cmpi slt, %[[c10_index]], %[[c4_index]] : index +! CHECK: %[[cmpi:.*]] = arith.cmpi slt(%[[c10_index]], %[[c4_index]]) : index ! CHECK: %[[select:.*]] = arith.select %[[cmpi]], %[[c10_index]], %[[c4_index]] : index ! CHECK: %[[c1:.*]] = arith.constant 1 : i64 ! CHECK: %[[select_i64:.*]] = fir.convert %[[select]] : (index) -> i64 diff --git a/flang/test/Lower/transformational-intrinsics.f90 b/flang/test/Lower/transformational-intrinsics.f90 --- a/flang/test/Lower/transformational-intrinsics.f90 +++ b/flang/test/Lower/transformational-intrinsics.f90 @@ -112,7 +112,7 @@ ! CHECK-DAG: %[[res_elt:.*]] = fir.array_fetch %[[res_load]], %[[idx]] : (!fir.array>, index) -> !fir.logical<1> ! CHECK-DAG: %[[y_elt_i1:.*]] = fir.convert %[[y_elt]] : (!fir.logical<1>) -> i1 ! CHECK-DAG: %[[res_elt_i1:.*]] = fir.convert %[[res_elt]] : (!fir.logical<1>) -> i1 - ! CHECK: %[[neqv_i1:.*]] = arith.cmpi ne, %[[y_elt_i1]], %[[res_elt_i1]] : i1 + ! CHECK: %[[neqv_i1:.*]] = arith.cmpi ne(%[[y_elt_i1]], %[[res_elt_i1]]) : i1 ! CHECK: %[[neqv:.*]] = fir.convert %[[neqv_i1]] : (i1) -> !fir.logical<1> ! CHECK: fir.array_update %{{.*}} %[[neqv]], %[[idx]] : (!fir.array>, !fir.logical<1>, index) -> !fir.array> ! CHECK: } diff --git a/flang/test/Lower/vector-subscript-io.f90 b/flang/test/Lower/vector-subscript-io.f90 --- a/flang/test/Lower/vector-subscript-io.f90 +++ b/flang/test/Lower/vector-subscript-io.f90 @@ -21,7 +21,7 @@ ! CHECK: %[[VAL_11:.*]] = fir.slice %[[VAL_6]], %[[VAL_4]], %[[VAL_6]] : (index, index, index) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_5]], %[[VAL_4]] : index, index) ! CHECK: ^bb1(%[[VAL_12:.*]]: index, %[[VAL_13:.*]]: index): -! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt, %[[VAL_13]], %[[VAL_5]] : index +! CHECK: %[[VAL_14:.*]] = arith.cmpi sgt(%[[VAL_13]], %[[VAL_5]]) : index ! CHECK: cf.cond_br %[[VAL_14]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_15:.*]] = fir.coordinate_of %[[VAL_16]], %[[VAL_12]] : (!fir.ref>, index) -> !fir.ref @@ -70,7 +70,7 @@ ! CHECK: %[[VAL_42:.*]] = fir.slice %[[VAL_36]], %[[VAL_41]], %[[VAL_41]], %[[VAL_30]], %[[VAL_39]]#1, %[[VAL_30]] : (i64, index, index, index, index, index) -> !fir.slice<2> ! CHECK: cf.br ^bb1(%[[VAL_29]], %[[VAL_39]]#1 : index, index) ! CHECK: ^bb1(%[[VAL_43:.*]]: index, %[[VAL_44:.*]]: index): -! CHECK: %[[VAL_45:.*]] = arith.cmpi sgt, %[[VAL_44]], %[[VAL_29]] : index +! CHECK: %[[VAL_45:.*]] = arith.cmpi sgt(%[[VAL_44]], %[[VAL_29]]) : index ! CHECK: cf.cond_br %[[VAL_45]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_46:.*]] = fir.convert %[[VAL_35]] : (i32) -> index @@ -86,7 +86,7 @@ ! CHECK: %[[VAL_55:.*]] = fir.load %[[VAL_31]] : !fir.ref>>> ! CHECK: %[[VAL_56:.*]] = fir.box_addr %[[VAL_55]] : (!fir.box>>) -> !fir.heap> ! CHECK: %[[VAL_57:.*]] = fir.convert %[[VAL_56]] : (!fir.heap>) -> i64 -! CHECK: %[[VAL_58:.*]] = arith.cmpi ne, %[[VAL_57]], %[[VAL_28]] : i64 +! CHECK: %[[VAL_58:.*]] = arith.cmpi ne(%[[VAL_57]], %[[VAL_28]]) : i64 ! CHECK: cf.cond_br %[[VAL_58]], ^bb4, ^bb5 ! CHECK: ^bb4: ! CHECK: fir.freemem %[[VAL_56]] : !fir.heap> @@ -113,7 +113,7 @@ ! CHECK: %[[VAL_70:.*]] = fir.slice %[[VAL_64]], %[[VAL_68]]#1, %[[VAL_64]] : (index, index, index) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_63]], %[[VAL_68]]#1 : index, index) ! CHECK: ^bb1(%[[VAL_71:.*]]: index, %[[VAL_72:.*]]: index): -! CHECK: %[[VAL_73:.*]] = arith.cmpi sgt, %[[VAL_72]], %[[VAL_63]] : index +! CHECK: %[[VAL_73:.*]] = arith.cmpi sgt(%[[VAL_72]], %[[VAL_63]]) : index ! CHECK: cf.cond_br %[[VAL_73]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_74:.*]] = fir.coordinate_of %[[VAL_69]], %[[VAL_71]] : (!fir.box>, index) -> !fir.ref @@ -153,7 +153,7 @@ ! CHECK: %[[VAL_99:.*]] = fir.slice %[[VAL_88]], %[[VAL_98]], %[[VAL_98]], %[[VAL_93]], %[[VAL_91]], %[[VAL_93]] : (i64, index, index, index, index, index) -> !fir.slice<2> ! CHECK: cf.br ^bb1(%[[VAL_92]], %[[VAL_91]] : index, index) ! CHECK: ^bb1(%[[VAL_100:.*]]: index, %[[VAL_101:.*]]: index): -! CHECK: %[[VAL_102:.*]] = arith.cmpi sgt, %[[VAL_101]], %[[VAL_92]] : index +! CHECK: %[[VAL_102:.*]] = arith.cmpi sgt(%[[VAL_101]], %[[VAL_92]]) : index ! CHECK: cf.cond_br %[[VAL_102]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_103:.*]] = fir.coordinate_of %[[VAL_104]], %[[VAL_100]] : (!fir.ref>, index) -> !fir.ref @@ -188,10 +188,10 @@ ! CHECK: %[[VAL_124:.*]] = fir.slice %[[VAL_119]], %[[VAL_117]], %[[VAL_119]], %[[VAL_119]], %[[VAL_117]], %[[VAL_119]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: cf.br ^bb1(%[[VAL_118]], %[[VAL_117]] : index, index) ! CHECK: ^bb1(%[[VAL_125:.*]]: index, %[[VAL_126:.*]]: index): -! CHECK: %[[VAL_127:.*]] = arith.cmpi sgt, %[[VAL_126]], %[[VAL_118]] : index +! CHECK: %[[VAL_127:.*]] = arith.cmpi sgt(%[[VAL_126]], %[[VAL_118]]) : index ! CHECK: cf.cond_br %[[VAL_127]], ^bb2(%[[VAL_118]], %[[VAL_117]] : index, index), ^bb5 ! CHECK: ^bb2(%[[VAL_128:.*]]: index, %[[VAL_129:.*]]: index): -! CHECK: %[[VAL_130:.*]] = arith.cmpi sgt, %[[VAL_129]], %[[VAL_118]] : index +! CHECK: %[[VAL_130:.*]] = arith.cmpi sgt(%[[VAL_129]], %[[VAL_118]]) : index ! CHECK: cf.cond_br %[[VAL_130]], ^bb3, ^bb4 ! CHECK: ^bb3: ! CHECK: %[[VAL_131:.*]] = fir.coordinate_of %[[VAL_132]], %[[VAL_128]] : (!fir.ref>, index) -> !fir.ref @@ -233,10 +233,10 @@ ! CHECK: %[[VAL_158:.*]] = fir.slice %[[VAL_153]], %[[VAL_149]], %[[VAL_151]], %[[VAL_153]], %[[VAL_150]], %[[VAL_153]] : (index, index, index, index, index, index) -> !fir.slice<2> ! CHECK: cf.br ^bb1(%[[VAL_152]], %[[VAL_150]] : index, index) ! CHECK: ^bb1(%[[VAL_159:.*]]: index, %[[VAL_160:.*]]: index): -! CHECK: %[[VAL_161:.*]] = arith.cmpi sgt, %[[VAL_160]], %[[VAL_152]] : index +! CHECK: %[[VAL_161:.*]] = arith.cmpi sgt(%[[VAL_160]], %[[VAL_152]]) : index ! CHECK: cf.cond_br %[[VAL_161]], ^bb2(%[[VAL_153]], %[[VAL_151]] : index, index), ^bb5 ! CHECK: ^bb2(%[[VAL_162:.*]]: index, %[[VAL_163:.*]]: index): -! CHECK: %[[VAL_164:.*]] = arith.cmpi sgt, %[[VAL_163]], %[[VAL_152]] : index +! CHECK: %[[VAL_164:.*]] = arith.cmpi sgt(%[[VAL_163]], %[[VAL_152]]) : index ! CHECK: cf.cond_br %[[VAL_164]], ^bb3, ^bb4 ! CHECK: ^bb3: ! CHECK: %[[VAL_165:.*]] = fir.coordinate_of %[[VAL_166]], %[[VAL_159]] : (!fir.ref>, index) -> !fir.ref @@ -277,7 +277,7 @@ ! CHECK: %[[VAL_191:.*]] = fir.slice %[[VAL_183]], %[[VAL_181]], %[[VAL_183]] : (index, index, index) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_182]], %[[VAL_181]] : index, index) ! CHECK: ^bb1(%[[VAL_192:.*]]: index, %[[VAL_193:.*]]: index): -! CHECK: %[[VAL_194:.*]] = arith.cmpi sgt, %[[VAL_193]], %[[VAL_182]] : index +! CHECK: %[[VAL_194:.*]] = arith.cmpi sgt(%[[VAL_193]], %[[VAL_182]]) : index ! CHECK: cf.cond_br %[[VAL_194]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_195:.*]] = fir.coordinate_of %[[VAL_196]], %[[VAL_192]] : (!fir.ref>, index) -> !fir.ref @@ -315,7 +315,7 @@ ! CHECK: %[[VAL_220:.*]] = fir.slice %[[VAL_210]], %[[VAL_208]], %[[VAL_210]] : (index, index, index) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_209]], %[[VAL_208]] : index, index) ! CHECK: ^bb1(%[[VAL_221:.*]]: index, %[[VAL_222:.*]]: index): -! CHECK: %[[VAL_223:.*]] = arith.cmpi sgt, %[[VAL_222]], %[[VAL_209]] : index +! CHECK: %[[VAL_223:.*]] = arith.cmpi sgt(%[[VAL_222]], %[[VAL_209]]) : index ! CHECK: cf.cond_br %[[VAL_223]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_224:.*]] = fir.coordinate_of %[[VAL_225]], %[[VAL_221]] : (!fir.ref>, index) -> !fir.ref @@ -328,7 +328,7 @@ ! CHECK: %[[VAL_233:.*]] = fir.convert %[[VAL_232]] : (!fir.ref>) -> !fir.ref> ! CHECK: %[[VAL_234:.*]] = arith.subi %[[VAL_219]], %[[VAL_216]] : index ! CHECK: %[[VAL_235:.*]] = arith.addi %[[VAL_234]], %[[VAL_210]] : index -! CHECK: %[[VAL_236:.*]] = arith.cmpi slt, %[[VAL_235]], %[[VAL_209]] : index +! CHECK: %[[VAL_236:.*]] = arith.cmpi slt(%[[VAL_235]], %[[VAL_209]]) : index ! CHECK: %[[VAL_237:.*]] = arith.select %[[VAL_236]], %[[VAL_209]], %[[VAL_235]] : index ! CHECK: %[[VAL_238:.*]] = fir.convert %[[VAL_233]] : (!fir.ref>) -> !fir.ref ! CHECK: %[[VAL_239:.*]] = fir.convert %[[VAL_237]] : (index) -> i64 @@ -358,7 +358,7 @@ ! CHECK: %[[VAL_254:.*]] = fir.slice %[[VAL_248]], %[[VAL_252]]#1, %[[VAL_248]] path %[[VAL_246]] : (index, index, index, i32) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_247]], %[[VAL_252]]#1 : index, index) ! CHECK: ^bb1(%[[VAL_255:.*]]: index, %[[VAL_256:.*]]: index): -! CHECK: %[[VAL_257:.*]] = arith.cmpi sgt, %[[VAL_256]], %[[VAL_247]] : index +! CHECK: %[[VAL_257:.*]] = arith.cmpi sgt(%[[VAL_256]], %[[VAL_247]]) : index ! CHECK: cf.cond_br %[[VAL_257]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_258:.*]] = fir.coordinate_of %[[VAL_253]], %[[VAL_255]] : (!fir.box>, index) -> !fir.ref @@ -404,7 +404,7 @@ ! CHECK: %[[VAL_278:.*]] = fir.slice %[[VAL_273]], %[[VAL_271]], %[[VAL_273]] : (index, index, index) -> !fir.slice<1> ! CHECK: cf.br ^bb1(%[[VAL_272]], %[[VAL_271]] : index, index) ! CHECK: ^bb1(%[[VAL_279:.*]]: index, %[[VAL_280:.*]]: index): -! CHECK: %[[VAL_281:.*]] = arith.cmpi sgt, %[[VAL_280]], %[[VAL_272]] : index +! CHECK: %[[VAL_281:.*]] = arith.cmpi sgt(%[[VAL_280]], %[[VAL_272]]) : index ! CHECK: cf.cond_br %[[VAL_281]], ^bb2, ^bb3 ! CHECK: ^bb2: ! CHECK: %[[VAL_282:.*]] = fir.coordinate_of %[[VAL_283]], %[[VAL_279]] : (!fir.ref>, index) -> !fir.ref @@ -451,10 +451,10 @@ ! CHECK: %[[VAL_315:.*]] = fir.slice %[[VAL_300]], %[[VAL_314]], %[[VAL_314]], %[[VAL_305]], %[[VAL_309]]#1, %[[VAL_305]], %[[VAL_297]], %[[VAL_298]], %[[VAL_305]] path %[[VAL_311]], %[[VAL_299]], %[[VAL_300]], %[[VAL_312]] : (i64, index, index, index, index, index, index, index, index, !fir.field, i64, i64, !fir.field) -> !fir.slice<3> ! CHECK: cf.br ^bb1(%[[VAL_294]], %[[VAL_303]] : index, index) ! CHECK: ^bb1(%[[VAL_316:.*]]: index, %[[VAL_317:.*]]: index): -! CHECK: %[[VAL_318:.*]] = arith.cmpi sgt, %[[VAL_317]], %[[VAL_304]] : index +! CHECK: %[[VAL_318:.*]] = arith.cmpi sgt(%[[VAL_317]], %[[VAL_304]]) : index ! CHECK: cf.cond_br %[[VAL_318]], ^bb2(%[[VAL_304]], %[[VAL_309]]#1 : index, index), ^bb5 ! CHECK: ^bb2(%[[VAL_319:.*]]: index, %[[VAL_320:.*]]: index): -! CHECK: %[[VAL_321:.*]] = arith.cmpi sgt, %[[VAL_320]], %[[VAL_304]] : index +! CHECK: %[[VAL_321:.*]] = arith.cmpi sgt(%[[VAL_320]], %[[VAL_304]]) : index ! CHECK: cf.cond_br %[[VAL_321]], ^bb3, ^bb4 ! CHECK: ^bb3: ! CHECK: %[[VAL_322:.*]] = fir.coordinate_of %[[VAL_310]], %[[VAL_319]] : (!fir.box>, index) -> !fir.ref @@ -496,7 +496,7 @@ ! CHECK: %[[VAL_348:.*]] = arith.subi %[[VAL_345]]#1, %[[VAL_338]] : index ! CHECK: cf.br ^bb1(%[[VAL_339]], %[[VAL_337]] : index, i1) ! CHECK: ^bb1(%[[VAL_349:.*]]: index, %[[VAL_350:.*]]: i1): -! CHECK: %[[VAL_351:.*]] = arith.cmpi sle, %[[VAL_349]], %[[VAL_348]] : index +! CHECK: %[[VAL_351:.*]] = arith.cmpi sle(%[[VAL_349]], %[[VAL_348]]) : index ! CHECK: %[[VAL_352:.*]] = arith.andi %[[VAL_350]], %[[VAL_351]] : i1 ! CHECK: cf.cond_br %[[VAL_352]], ^bb2, ^bb3 ! CHECK: ^bb2: @@ -542,7 +542,7 @@ ! CHECK: %[[VAL_379:.*]] = fir.call @_FortranAioEnableHandlers(%[[VAL_378]], %[[VAL_369]], %[[VAL_370]], %[[VAL_370]], %[[VAL_370]], %[[VAL_370]]) : (!fir.ref, i1, i1, i1, i1, i1) -> none ! CHECK: cf.br ^bb1(%[[VAL_371]], %[[VAL_369]] : index, i1) ! CHECK: ^bb1(%[[VAL_380:.*]]: index, %[[VAL_381:.*]]: i1): -! CHECK: %[[VAL_382:.*]] = arith.cmpi sle, %[[VAL_380]], %[[VAL_368]] : index +! CHECK: %[[VAL_382:.*]] = arith.cmpi sle(%[[VAL_380]], %[[VAL_368]]) : index ! CHECK: %[[VAL_383:.*]] = arith.andi %[[VAL_381]], %[[VAL_382]] : i1 ! CHECK: cf.cond_br %[[VAL_383]], ^bb2, ^bb7 ! CHECK: ^bb2: @@ -557,7 +557,7 @@ ! CHECK: %[[VAL_389:.*]] = fir.slice %[[VAL_386]], %[[VAL_388]], %[[VAL_388]], %[[VAL_371]], %[[VAL_368]], %[[VAL_371]] : (i64, index, index, index, index, index) -> !fir.slice<2> ! CHECK: cf.br ^bb4(%[[VAL_372]], %[[VAL_369]] : index, i1) ! CHECK: ^bb4(%[[VAL_390:.*]]: index, %[[VAL_391:.*]]: i1): -! CHECK: %[[VAL_392:.*]] = arith.cmpi sle, %[[VAL_390]], %[[VAL_373]] : index +! CHECK: %[[VAL_392:.*]] = arith.cmpi sle(%[[VAL_390]], %[[VAL_373]]) : index ! CHECK: %[[VAL_393:.*]] = arith.andi %[[VAL_391]], %[[VAL_392]] : i1 ! CHECK: cf.cond_br %[[VAL_393]], ^bb5, ^bb6(%[[VAL_391]] : i1) ! CHECK: ^bb5: diff --git a/flang/test/Lower/where.f90 b/flang/test/Lower/where.f90 --- a/flang/test/Lower/where.f90 +++ b/flang/test/Lower/where.f90 @@ -17,7 +17,7 @@ ! CHECK: %[[VAL_14:.*]] = arith.subi %[[VAL_5]], %[[VAL_12]] : index ! CHECK: %[[VAL_15:.*]] = fir.do_loop %[[VAL_16:.*]] = %[[VAL_13]] to %[[VAL_14]] step %[[VAL_12]] unordered iter_args(%[[VAL_17:.*]] = %[[VAL_11]]) -> (!fir.array<10x!fir.logical<4>>) { ! CHECK: %[[VAL_18:.*]] = fir.array_fetch %[[VAL_7]], %[[VAL_16]] : (!fir.array<10xf32>, index) -> f32 - ! CHECK: %[[VAL_19:.*]] = arith.cmpf ogt, %[[VAL_18]], %[[VAL_8]] : f32 + ! CHECK: %[[VAL_19:.*]] = arith.cmpf ogt(%[[VAL_18]], %[[VAL_8]]) : f32 ! CHECK: %[[VAL_20:.*]] = fir.convert %[[VAL_19]] : (i1) -> !fir.logical<4> ! CHECK: %[[VAL_21:.*]] = fir.array_update %[[VAL_17]], %[[VAL_20]], %[[VAL_16]] : (!fir.array<10x!fir.logical<4>>, !fir.logical<4>, index) -> !fir.array<10x!fir.logical<4>> ! CHECK: fir.result %[[VAL_21]] : !fir.array<10x!fir.logical<4>> @@ -61,7 +61,7 @@ ! CHECK: %[[VAL_55:.*]] = arith.subi %[[VAL_46]], %[[VAL_53]] : index ! CHECK: %[[VAL_56:.*]] = fir.do_loop %[[VAL_57:.*]] = %[[VAL_54]] to %[[VAL_55]] step %[[VAL_53]] unordered iter_args(%[[VAL_58:.*]] = %[[VAL_52]]) -> (!fir.array<10x!fir.logical<4>>) { ! CHECK: %[[VAL_59:.*]] = fir.array_fetch %[[VAL_48]], %[[VAL_57]] : (!fir.array<10xf32>, index) -> f32 - ! CHECK: %[[VAL_60:.*]] = arith.cmpf ogt, %[[VAL_59]], %[[VAL_49]] : f32 + ! CHECK: %[[VAL_60:.*]] = arith.cmpf ogt(%[[VAL_59]], %[[VAL_49]]) : f32 ! CHECK: %[[VAL_61:.*]] = fir.convert %[[VAL_60]] : (i1) -> !fir.logical<4> ! CHECK: %[[VAL_62:.*]] = fir.array_update %[[VAL_58]], %[[VAL_61]], %[[VAL_57]] : (!fir.array<10x!fir.logical<4>>, !fir.logical<4>, index) -> !fir.array<10x!fir.logical<4>> ! CHECK: fir.result %[[VAL_62]] : !fir.array<10x!fir.logical<4>> @@ -105,7 +105,7 @@ ! CHECK: %[[VAL_97:.*]] = arith.subi %[[VAL_88]], %[[VAL_95]] : index ! CHECK: %[[VAL_98:.*]] = fir.do_loop %[[VAL_99:.*]] = %[[VAL_96]] to %[[VAL_97]] step %[[VAL_95]] unordered iter_args(%[[VAL_100:.*]] = %[[VAL_94]]) -> (!fir.array<10x!fir.logical<4>>) { ! CHECK: %[[VAL_101:.*]] = fir.array_fetch %[[VAL_90]], %[[VAL_99]] : (!fir.array<10xf32>, index) -> f32 - ! CHECK: %[[VAL_102:.*]] = arith.cmpf ogt, %[[VAL_101]], %[[VAL_91]] : f32 + ! CHECK: %[[VAL_102:.*]] = arith.cmpf ogt(%[[VAL_101]], %[[VAL_91]]) : f32 ! CHECK: %[[VAL_103:.*]] = fir.convert %[[VAL_102]] : (i1) -> !fir.logical<4> ! CHECK: %[[VAL_104:.*]] = fir.array_update %[[VAL_100]], %[[VAL_103]], %[[VAL_99]] : (!fir.array<10x!fir.logical<4>>, !fir.logical<4>, index) -> !fir.array<10x!fir.logical<4>> ! CHECK: fir.result %[[VAL_104]] : !fir.array<10x!fir.logical<4>> diff --git a/flang/test/Lower/while_loop.f90 b/flang/test/Lower/while_loop.f90 --- a/flang/test/Lower/while_loop.f90 +++ b/flang/test/Lower/while_loop.f90 @@ -15,7 +15,7 @@ ! CHECK: ^[[BB1]]: // 2 preds: ^{{.*}}, ^[[BB2:.*]] ! CHECK-DAG: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK-DAG: %[[C1:.*]] = arith.constant 1 : i32 - ! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C1]] : i32 + ! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C1]]) : i32 ! CHECK: cond_br %[[COND]], ^[[BB2]], ^[[BB3:.*]] ! CHECK: ^[[BB2]]: // pred: ^[[BB1]] ! CHECK-DAG: %[[I2:.*]] = fir.load %[[I_REF]] : !fir.ref @@ -48,7 +48,7 @@ ! CHECK: ^[[HDR1]]: // 2 preds: ^{{.*}}, ^[[EXIT2:.*]] ! CHECK-DAG: %[[I:.*]] = fir.load %[[I_REF]] : !fir.ref ! CHECK-DAG: %[[C8:.*]] = arith.constant 8 : i32 - ! CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[I]], %[[C8]] : i32 + ! CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[I]], %[[C8]]) : i32 ! CHECK: cond_br %[[COND]], ^[[BODY1:.*]], ^[[EXIT1:.*]] do while (i .gt. 8) ! CHECK: ^[[BODY1]]: // pred: ^[[HDR1]] @@ -66,7 +66,7 @@ ! CHECK: ^[[HDR2]]: // 2 preds: ^[[BODY1]], ^[[BODY2:.*]] ! CHECK-DAG: %[[J:.*]] = fir.load %[[J_REF]] : !fir.ref ! CHECK-DAG: %[[I3:.*]] = fir.load %[[I_REF]] : !fir.ref - ! CHECK: %[[COND2:.*]] = arith.cmpi slt, %[[J]], %[[I3]] : i32 + ! CHECK: %[[COND2:.*]] = arith.cmpi slt(%[[J]], %[[I3]]) : i32 ! CHECK: cond_br %[[COND2]], ^[[BODY2]], ^[[EXIT2]] do while (j .lt. i) ! CHECK: ^[[BODY2]]: // pred: ^[[HDR2]] diff --git a/mlir/docs/BufferDeallocationInternals.md b/mlir/docs/BufferDeallocationInternals.md --- a/mlir/docs/BufferDeallocationInternals.md +++ b/mlir/docs/BufferDeallocationInternals.md @@ -406,7 +406,7 @@ ```mlir func.func @nested_region_control_flow(%arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi "eq", %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref // %2 will be an alias of %1 @@ -427,7 +427,7 @@ ```mlir func.func @nested_region_control_flow(%arg0: index, %arg1: index) -> memref { - %0 = arith.cmpi "eq", %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -519,7 +519,7 @@ %res: memref<2xf32>) { %0 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %1 = arith.cmpi "eq", %i, %ub : index + %1 = arith.cmpi eq(%i, %ub) : index %2 = scf.if %1 -> (memref<2xf32>) { %3 = memref.alloc() : memref<2xf32> // makes %2 a critical alias due to a // divergent allocation @@ -558,7 +558,7 @@ %4 = bufferization.clone %buf : (memref<2xf32>) -> (memref<2xf32>) %0 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %4) -> memref<2xf32> { - %1 = arith.cmpi "eq", %i, %ub : index + %1 = arith.cmpi eq(%i, %ub) : index %2 = scf.if %1 -> (memref<2xf32>) { %3 = memref.alloc() : memref<2xf32> // makes %2 a critical alias use(%3) diff --git a/mlir/docs/Diagnostics.md b/mlir/docs/Diagnostics.md --- a/mlir/docs/Diagnostics.md +++ b/mlir/docs/Diagnostics.md @@ -317,7 +317,7 @@ // Expect an error on an adjacent line. func.func @foo(%a : f32) { // expected-error@+1 {{unknown comparison predicate "foo"}} - %result = arith.cmpf "foo", %a, %a : f32 + %result = arith.cmpf foo(%a, %a) : f32 return } diff --git a/mlir/docs/Rationale/Rationale.md b/mlir/docs/Rationale/Rationale.md --- a/mlir/docs/Rationale/Rationale.md +++ b/mlir/docs/Rationale/Rationale.md @@ -563,12 +563,12 @@ cf.br ^bb1(0) ^bb1(%j: i32) - %p1 = arith.cmpi "lt", %j, %nj : i32 + %p1 = arith.cmpi lt(%j, %nj) : i32 cf.cond_br %p1, ^bb2, ^bb5 ^bb2: %v = affine.load %A[%i, %j] : memref - %p2 = arith.cmpi "eq", %v, %key : i32 + %p2 = arith.cmpi eq(%v, %key) : i32 cf.cond_br %p2, ^bb3(%j), ^bb4 ^bb3(%j: i32) diff --git a/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h --- a/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h +++ b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h @@ -40,7 +40,7 @@ /// affine.for %I = 0 to 9 { /// %dim = dim %A, 0 : memref /// %add = affine.apply %I + %a -/// %cmp = arith.cmpi "slt", %add, %dim : index +/// %cmp = arith.cmpi slt(%add, %dim) : index /// scf.if %cmp { /// %vec_2d = load %1[%I] : memref<9xvector<17x15xf32>> /// vector.transfer_write %vec_2d, %A[%add, %b, %c] : diff --git a/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td b/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td --- a/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td +++ b/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td @@ -112,7 +112,9 @@ "lhs", "result", "::getI1SameShape($_self)">]> { let results = (outs BoolLike:$result); - let assemblyFormat = "$predicate `,` $lhs `,` $rhs attr-dict `:` type($lhs)"; + let assemblyFormat = [{ + $predicate `(` $lhs `,` $rhs `)` attr-dict `:` type($lhs) + }]; } // Just like `Arith_CompareOp` but also admits 0-D vectors. Introduced @@ -1129,13 +1131,13 @@ ```mlir // Custom form of scalar "signed less than" comparison. - %x = arith.cmpi slt, %lhs, %rhs : i32 + %x = arith.cmpi slt(%lhs, %rhs) : i32 // Generic form of the same operation. %x = "arith.cmpi"(%lhs, %rhs) {predicate = 2 : i64} : (i32, i32) -> i1 // Custom form of vector equality comparison. - %x = arith.cmpi eq, %lhs, %rhs : vector<4xi64> + %x = arith.cmpi eq(%lhs, %rhs) : vector<4xi64> // Generic form of the same operation. %x = "arith.cmpi"(%lhs, %rhs) {predicate = 0 : i64} @@ -1188,8 +1190,8 @@ Example: ```mlir - %r1 = arith.cmpf oeq, %0, %1 : f32 - %r2 = arith.cmpf ult, %0, %1 : tensor<42x42xf64> + %r1 = arith.cmpf oeq(%0, %1) : f32 + %r2 = arith.cmpf ult(%0, %1) : tensor<42x42xf64> %r3 = "arith.cmpf"(%0, %1) {predicate: 0} : (f8, f8) -> i1 ``` }]; diff --git a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h --- a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h +++ b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h @@ -335,7 +335,7 @@ /// to /// /// %iv = %lb + %procId * %step - /// %cond = arith.cmpi "slt", %iv, %ub + /// %cond = arith.cmpi slt(%iv, %ub) /// scf.if %cond { /// ... /// } diff --git a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td --- a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td +++ b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td @@ -198,7 +198,7 @@ %sum = scf.for %iv = %lb to %ub step %step iter_args(%sum_iter = %sum_0) -> (f32) { %t = load %buffer[%iv] : memref<1024xf32> - %cond = arith.cmpf "ugt", %t, %c0 : f32 + %cond = arith.cmpf ugt(%t, %c0) : f32 %sum_next = scf.if %cond -> (f32) { %new_sum = arith.addf %sum_iter, %t : f32 scf.yield %new_sum : f32 diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td b/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td --- a/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td @@ -109,7 +109,7 @@ # After: %0 = scf.while (%i = %c0) : (index) -> index { - %1 = arith.cmpi slt, %i, %arg1 : index + %1 = arith.cmpi slt(%i, %arg1) : index scf.condition(%1) %i : index } do { ^bb0(%i: index): diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td --- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td @@ -402,7 +402,7 @@ %result = sparse_tensor.binary %a, %b : f64, f64 to i8 overlap={ ^bb0(%arg0: f64, %arg1: f64): - %cmp = arith.cmpf "oeq", %arg0, %arg1 : f64 + %cmp = arith.cmpf oeq(%arg0, %arg1) : f64 %ret_i8 = arith.extui %cmp : i1 to i8 sparse_tensor.yield %ret_i8 : i8 } @@ -425,7 +425,7 @@ %result = sparse_tensor.binary %a, %b : f64, f64 to f64 overlap={ ^bb0(%x: f64, %y: f64): - %cmp = arith.cmpi "uge", %col, %row : index + %cmp = arith.cmpi uge(%col, %row) : index %upperTriangleResult = arith.addf %x, %y : f64 %lowerTriangleResult = arith.subf %x, %y : f64 %ret = arith.select %cmp, %upperTriangleResult, %lowerTriangleResult : f64 @@ -434,7 +434,7 @@ left=identity right={ ^bb0(%y: f64): - %cmp = arith.cmpi "uge", %col, %row : index + %cmp = arith.cmpi uge(%col, %row) : index %lowerTriangleResult = arith.negf %y : f64 %ret = arith.select %cmp, %y, %lowerTriangleResult : f64 sparse_tensor.yield %ret : f64 @@ -582,7 +582,7 @@ %result = sparse_tensor.reduce %c, %a, %cf1 : f64 { ^bb0(%arg0: f64, %arg1: f64): %0 = arith.mulf %arg0, %arg1 : f64 - %cmp = arith.cmpf "ogt", %0, %cf100 : f64 + %cmp = arith.cmpf ogt(%0, %cf100) : f64 %ret = arith.select %cmp, %cf100, %0 : f64 sparse_tensor.yield %ret : f64 } diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td --- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td @@ -343,7 +343,7 @@ }]; let builders = [ OpBuilder<(ins "Value":$source, "Value":$acc, - "ArrayRef":$reductionMask, "CombiningKind":$kind)> + "ArrayRef":$reductionMask, "CombiningKind":$kind)> ]; let extraClassDeclaration = [{ static StringRef getKindAttrStrName() { return "kind"; } @@ -2643,7 +2643,7 @@ This may be lowered to an scf.if region as below: ``` // Execute in parallel on all threads/lanes. - %cnd = arith.cmpi eq, %laneid, %c0 : index + %cnd = arith.cmpi eq(%laneid, %c0) : index scf.if %cnd { // Serial code running only on thread/lane 0. ... @@ -2671,7 +2671,7 @@ // Store the data from each thread into memory and Synchronization. %tmp0 = memreg.alloc() : memref<128xf32> %tmp1 = memreg.alloc() : memref<32xf32> - %cnd = arith.cmpi eq, %laneid, %c0 : index + %cnd = arith.cmpi eq(%laneid, %c0) : index vector.store %v0, %tmp0[%laneid] : memref<128xf32>, vector<4xf32> some_synchronization_primitive scf.if %cnd { diff --git a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp --- a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp +++ b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp @@ -469,14 +469,14 @@ /// %c0 = arith.constant 0 : index /// %0 = dim %arg0, %c0 : tensor /// %1 = dim %arg1, %c0 : tensor -/// %2 = arith.cmpi "eq", %0, %1 : index +/// %2 = arith.cmpi eq(%0, %1) : index /// %result = scf.if %2 -> (i1) { /// %c1 = arith.constant 1 : index /// %true = arith.constant true /// %4 = scf.for %arg2 = %c0 to %0 step %c1 iter_args(%arg3 = %true) -> (i1) { /// %5 = tensor.extract %arg0[%arg2] : tensor /// %6 = tensor.extract %arg1[%arg2] : tensor -/// %7 = arith.cmpi "eq", %5, %6 : index +/// %7 = arith.cmpi eq(%5, %6) : index /// %8 = arith.andi %arg3, %7 : i1 /// scf.yield %8 : i1 /// } diff --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp --- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp +++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp @@ -1922,10 +1922,10 @@ auto cmpLhs = cmp.getLhs(); auto cmpRhs = cmp.getRhs(); - // %0 = arith.cmpi eq, %arg0, %arg1 + // %0 = arith.cmpi eq(%arg0, %arg1) // %1 = arith.select %0, %arg0, %arg1 => %arg1 - // %0 = arith.cmpi ne, %arg0, %arg1 + // %0 = arith.cmpi ne(%arg0, %arg1) // %1 = arith.select %0, %arg0, %arg1 => %arg0 if ((cmpLhs == trueVal && cmpRhs == falseVal) || diff --git a/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp --- a/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp +++ b/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp @@ -41,7 +41,7 @@ /// /// %x = memref.generic_atomic_rmw %F[%i] : memref<10xf32> { /// ^bb0(%current: f32): -/// %cmp = arith.cmpf "ogt", %current, %fval : f32 +/// %cmp = arith.cmpf ogt(%current, %fval) : f32 /// %new_value = select %cmp, %current, %fval : f32 /// memref.atomic_yield %new_value : f32 /// } diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp --- a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp +++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp @@ -782,7 +782,7 @@ /// %x = vector.create_mask %a, ... : vector /// is replaced by: /// %l = vector.create_mask ... : vector<...> ; one lower rank -/// %0 = arith.cmpi "slt", %ci, %a | +/// %0 = arith.cmpi slt(%ci, %a) | /// %1 = select %0, %l, %zeroes | /// %r = vector.insert %1, %pr [i] | d-times /// %x = .... diff --git a/mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir b/mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir --- a/mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir +++ b/mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir @@ -8,7 +8,7 @@ // CHECK: from ^bb0 = live // CHECK: ^bb2 = live // CHECK: from ^bb1 = live -func.func @test_cfg(%cond: i1) -> () +func.func @test_cfg(%cond: i1) -> () attributes {tag = "test_cfg"} { cf.br ^bb1 @@ -23,10 +23,10 @@ // CHECK: test_if: // CHECK: region #0 // CHECK: region_preds: (all) predecessors: - // CHECK: scf.if + // CHECK: scf.if // CHECK: region #1 // CHECK: region_preds: (all) predecessors: - // CHECK: scf.if + // CHECK: scf.if // CHECK: op_preds: (all) predecessors: // CHECK: scf.yield {then} // CHECK: scf.yield {else} @@ -34,13 +34,13 @@ scf.yield {then} } else { scf.yield {else} - } {tag = "test_if"} + } {tag = "test_if"} // test_while: // region #0 // region_preds: (all) predecessors: - // scf.while - // scf.yield + // scf.while + // scf.yield // region #1 // region_preds: (all) predecessors: // scf.condition @@ -48,7 +48,7 @@ // scf.condition %c2_i64 = arith.constant 2 : i64 %0:2 = scf.while (%arg2 = %arg0) : (i64) -> (i64, i64) { - %1 = arith.cmpi slt, %arg2, %arg1 : i64 + %1 = arith.cmpi slt(%arg2, %arg1) : i64 scf.condition(%1) %arg2, %arg2 : i64, i64 } do { ^bb0(%arg2: i64, %arg3: i64): @@ -65,9 +65,9 @@ // CHECK: op_preds: (all) predecessors: // CHECK: func.call @foo(%{{.*}}) {tag = "a"} // CHECK: func.call @foo(%{{.*}}) {tag = "b"} -func.func private @foo(%arg0: i32) -> i32 +func.func private @foo(%arg0: i32) -> i32 attributes {tag = "foo"} { - return {a} %arg0 : i32 + return {a} %arg0 : i32 } // CHECK: bar: @@ -75,7 +75,7 @@ // CHECK: ^bb0 = live // CHECK: op_preds: predecessors: // CHECK: func.call @bar(%{{.*}}) {tag = "c"} -func.func @bar(%cond: i1) -> i32 +func.func @bar(%cond: i1) -> i32 attributes {tag = "bar"} { cf.cond_br %cond, ^bb1, ^bb2 @@ -125,7 +125,7 @@ // CHECK: from ^bb0 = live // CHECK: ^bb2 = live // CHECK: from ^bb0 = live -func.func @test_unknown_branch() -> () +func.func @test_unknown_branch() -> () attributes {tag = "test_unknown_branch"} { "test.unknown_br"() [^bb1, ^bb2] : () -> () @@ -145,7 +145,7 @@ "test.unknown_region_br"() ({ ^bb0: "test.unknown_region_end"() : () -> () - }, { + }, { ^bb0: "test.unknown_region_end"() : () -> () }) {tag = "test_unknown_region"} : () -> () @@ -157,7 +157,7 @@ // CHECK: ^bb0 = live // CHECK: ^bb1 = live // CHECK: ^bb2 = dead -func.func @test_known_dead_block() -> () +func.func @test_known_dead_block() -> () attributes {tag = "test_known_dead_block"} { %true = arith.constant true cf.cond_br %true, ^bb1, ^bb2 @@ -178,7 +178,7 @@ cf.cond_br %arg0, ^bb1, ^bb2 ^bb1: - %true = arith.constant true + %true = arith.constant true cf.cond_br %true, ^bb3, ^bb2 ^bb2: @@ -196,14 +196,14 @@ // CHECK: region #1 // CHECK: ^bb0 = live // CHECK: region_preds: (all) predecessors: - // CHECK: scf.if + // CHECK: scf.if // CHECK: op_preds: (all) predecessors: // CHECK: scf.yield {else} scf.if %false { scf.yield {then} } else { scf.yield {else} - } {tag = "test_known_if"} + } {tag = "test_known_if"} return } @@ -220,10 +220,10 @@ %true = arith.constant true scf.if %true { func.call @callable() {then} : () -> () - scf.yield + scf.yield } else { func.call @callable() {else} : () -> () - scf.yield + scf.yield } return } diff --git a/mlir/test/Analysis/DataFlow/test-last-modified.mlir b/mlir/test/Analysis/DataFlow/test-last-modified.mlir --- a/mlir/test/Analysis/DataFlow/test-last-modified.mlir +++ b/mlir/test/Analysis/DataFlow/test-last-modified.mlir @@ -54,7 +54,7 @@ func.func @test_mod_dead_branch(%arg: i32, %ptr: memref) -> memref { %0 = arith.subi %arg, %arg : i32 %1 = arith.constant -1 : i32 - %2 = arith.cmpi sgt, %0, %1 : i32 + %2 = arith.cmpi sgt(%0, %1) : i32 cf.cond_br %2, ^a, ^b ^a: diff --git a/mlir/test/Analysis/test-dominance.mlir b/mlir/test/Analysis/test-dominance.mlir --- a/mlir/test/Analysis/test-dominance.mlir +++ b/mlir/test/Analysis/test-dominance.mlir @@ -51,7 +51,7 @@ func.func @func_loop(%arg0 : i32, %arg1 : i32) { cf.br ^loopHeader(%arg0 : i32) ^loopHeader(%counter : i32): - %lessThan = arith.cmpi slt, %counter, %arg1 : i32 + %lessThan = arith.cmpi slt(%counter, %arg1) : i32 cf.cond_br %lessThan, ^loopBody, ^exit ^loopBody: %const0 = arith.constant 1 : i32 @@ -155,7 +155,7 @@ %arg4 : index) { cf.br ^loopHeader(%arg0 : i32) ^loopHeader(%counter : i32): - %lessThan = arith.cmpi slt, %counter, %arg1 : i32 + %lessThan = arith.cmpi slt(%counter, %arg1) : i32 cf.cond_br %lessThan, ^loopBody, ^exit ^loopBody: %const0 = arith.constant 1 : i32 diff --git a/mlir/test/Analysis/test-liveness.mlir b/mlir/test/Analysis/test-liveness.mlir --- a/mlir/test/Analysis/test-liveness.mlir +++ b/mlir/test/Analysis/test-liveness.mlir @@ -127,7 +127,7 @@ // CHECK: cf.cond_br // CHECK-SAME: arg1@0 arg0@1 arg1@1 val_5 // CHECK-NEXT: EndCurrentlyLive - %lessThan = arith.cmpi slt, %counter, %arg1 : i32 + %lessThan = arith.cmpi slt(%counter, %arg1) : i32 cf.cond_br %lessThan, ^loopBody(%i : i32), ^exit(%i : i32) ^loopBody(%val : i32): // CHECK: Block: 2 diff --git a/mlir/test/Analysis/test-match-reduction.mlir b/mlir/test/Analysis/test-match-reduction.mlir --- a/mlir/test/Analysis/test-match-reduction.mlir +++ b/mlir/test/Analysis/test-match-reduction.mlir @@ -51,7 +51,7 @@ ins(%in0t : tensor<4x4xf32>) outs(%out0t : tensor<4xf32>) { ^bb0(%in0: f32, %out0: f32): - %cmp = arith.cmpf ogt, %in0, %out0 : f32 + %cmp = arith.cmpf ogt(%in0, %out0) : f32 %sel = arith.select %cmp, %in0, %out0 : f32 linalg.yield %sel : f32 } -> tensor<4xf32> @@ -111,4 +111,3 @@ } return } - diff --git a/mlir/test/Conversion/AffineToStandard/lower-affine.mlir b/mlir/test/Conversion/AffineToStandard/lower-affine.mlir --- a/mlir/test/Conversion/AffineToStandard/lower-affine.mlir +++ b/mlir/test/Conversion/AffineToStandard/lower-affine.mlir @@ -159,7 +159,7 @@ // CHECK-NEXT: %[[v1:.*]] = arith.muli %[[v0]], %[[cm1]] : index // CHECK-NEXT: %[[c20:.*]] = arith.constant 20 : index // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v1]], %[[c20]] : index -// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge, %[[v2]], %[[c0]] : index +// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge(%[[v2]], %[[c0]]) : index // CHECK-NEXT: if %[[v3]] { // CHECK-NEXT: call @body(%[[v0:.*]]) : (index) -> () // CHECK-NEXT: } @@ -180,7 +180,7 @@ // CHECK-NEXT: %[[v1:.*]] = arith.muli %[[v0]], %[[cm1]] : index // CHECK-NEXT: %[[c20:.*]] = arith.constant 20 : index // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v1]], %[[c20]] : index -// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge, %[[v2]], %[[c0]] : index +// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge(%[[v2]], %[[c0]]) : index // CHECK-NEXT: if %[[v3]] { // CHECK-NEXT: call @body(%[[v0:.*]]) : (index) -> () // CHECK-NEXT: } else { @@ -205,12 +205,12 @@ // CHECK-NEXT: %[[v1:.*]] = arith.muli %[[v0]], %[[cm1]] : index // CHECK-NEXT: %[[c20:.*]] = arith.constant 20 : index // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v1]], %[[c20]] : index -// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge, %[[v2]], %[[c0]] : index +// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge(%[[v2]], %[[c0]]) : index // CHECK-NEXT: if %[[v3]] { // CHECK-NEXT: %[[c0_0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[cm10:.*]] = arith.constant -10 : index // CHECK-NEXT: %[[v4:.*]] = arith.addi %[[v0]], %[[cm10]] : index -// CHECK-NEXT: %[[v5:.*]] = arith.cmpi sge, %[[v4]], %[[c0_0]] : index +// CHECK-NEXT: %[[v5:.*]] = arith.cmpi sge(%[[v4]], %[[c0_0]]) : index // CHECK-NEXT: if %[[v5]] { // CHECK-NEXT: call @body(%[[v0:.*]]) : (index) -> () // CHECK-NEXT: } @@ -218,7 +218,7 @@ // CHECK-NEXT: %[[c0_0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[cm10:.*]] = arith.constant -10 : index // CHECK-NEXT: %{{.*}} = arith.addi %[[v0]], %[[cm10]] : index -// CHECK-NEXT: %{{.*}} = arith.cmpi sge, %{{.*}}, %[[c0_0]] : index +// CHECK-NEXT: %{{.*}} = arith.cmpi sge(%{{.*}}, %[[c0_0]]) : index // CHECK-NEXT: if %{{.*}} { // CHECK-NEXT: call @mid(%[[v0:.*]]) : (index) -> () // CHECK-NEXT: } @@ -246,7 +246,7 @@ // CHECK-NEXT: %[[c0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[cm10:.*]] = arith.constant -10 : index // CHECK-NEXT: %[[v1:.*]] = arith.addi %[[v0]], %[[cm10]] : index -// CHECK-NEXT: %[[v2:.*]] = arith.cmpi sge, %[[v1]], %[[c0]] : index +// CHECK-NEXT: %[[v2:.*]] = arith.cmpi sge(%[[v1]], %[[c0]]) : index // CHECK-NEXT: %[[v3:.*]] = scf.if %[[v2]] -> (i64) { // CHECK-NEXT: scf.yield %[[c0_i64]] : i64 // CHECK-NEXT: } else { @@ -276,22 +276,22 @@ // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v1]], %{{.*}} : index // CHECK-NEXT: %[[c1:.*]] = arith.constant 1 : index // CHECK-NEXT: %[[v3:.*]] = arith.addi %[[v2]], %[[c1]] : index -// CHECK-NEXT: %[[v4:.*]] = arith.cmpi sge, %[[v3]], %[[c0]] : index +// CHECK-NEXT: %[[v4:.*]] = arith.cmpi sge(%[[v3]], %[[c0]]) : index // CHECK-NEXT: %[[cm1_0:.*]] = arith.constant -1 : index // CHECK-NEXT: %[[v5:.*]] = arith.addi %{{.*}}, %[[cm1_0]] : index -// CHECK-NEXT: %[[v6:.*]] = arith.cmpi sge, %[[v5]], %[[c0]] : index +// CHECK-NEXT: %[[v6:.*]] = arith.cmpi sge(%[[v5]], %[[c0]]) : index // CHECK-NEXT: %[[v7:.*]] = arith.andi %[[v4]], %[[v6]] : i1 // CHECK-NEXT: %[[cm1_1:.*]] = arith.constant -1 : index // CHECK-NEXT: %[[v8:.*]] = arith.addi %{{.*}}, %[[cm1_1]] : index -// CHECK-NEXT: %[[v9:.*]] = arith.cmpi sge, %[[v8]], %[[c0]] : index +// CHECK-NEXT: %[[v9:.*]] = arith.cmpi sge(%[[v8]], %[[c0]]) : index // CHECK-NEXT: %[[v10:.*]] = arith.andi %[[v7]], %[[v9]] : i1 // CHECK-NEXT: %[[cm1_2:.*]] = arith.constant -1 : index // CHECK-NEXT: %[[v11:.*]] = arith.addi %{{.*}}, %[[cm1_2]] : index -// CHECK-NEXT: %[[v12:.*]] = arith.cmpi sge, %[[v11]], %[[c0]] : index +// CHECK-NEXT: %[[v12:.*]] = arith.cmpi sge(%[[v11]], %[[c0]]) : index // CHECK-NEXT: %[[v13:.*]] = arith.andi %[[v10]], %[[v12]] : i1 // CHECK-NEXT: %[[cm42:.*]] = arith.constant -42 : index // CHECK-NEXT: %[[v14:.*]] = arith.addi %{{.*}}, %[[cm42]] : index -// CHECK-NEXT: %[[v15:.*]] = arith.cmpi eq, %[[v14]], %[[c0]] : index +// CHECK-NEXT: %[[v15:.*]] = arith.cmpi eq(%[[v14]], %[[c0]]) : index // CHECK-NEXT: %[[v16:.*]] = arith.andi %[[v13]], %[[v15]] : i1 // CHECK-NEXT: if %[[v16]] { // CHECK-NEXT: call @body(%[[v0:.*]]) : (index) -> () @@ -319,7 +319,7 @@ // CHECK-NEXT: %[[v1:.*]] = arith.muli %[[v0]], %[[cm1]] : index // CHECK-NEXT: %[[c20:.*]] = arith.constant 20 : index // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v1]], %[[c20]] : index -// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge, %[[v2]], %[[c0]] : index +// CHECK-NEXT: %[[v3:.*]] = arith.cmpi sge(%[[v2]], %[[c0]]) : index // CHECK-NEXT: if %[[v3]] { // CHECK-NEXT: %[[c0:.*]]{{.*}} = arith.constant 0 : index // CHECK-NEXT: %[[c42:.*]]{{.*}} = arith.constant 42 : index @@ -328,7 +328,7 @@ // CHECK-NEXT: %[[c0_:.*]]{{.*}} = arith.constant 0 : index // CHECK-NEXT: %[[cm10:.*]] = arith.constant -10 : index // CHECK-NEXT: %[[v4:.*]] = arith.addi %{{.*}}, %[[cm10]] : index -// CHECK-NEXT: %[[v5:.*]] = arith.cmpi sge, %[[v4]], %[[c0_:.*]]{{.*}} : index +// CHECK-NEXT: %[[v5:.*]] = arith.cmpi sge(%[[v4]], %[[c0_:.*]]{{.*}}) : index // CHECK-NEXT: if %[[v5]] { // CHECK-NEXT: call @body2(%[[v0]], %{{.*}}) : (index, index) -> () affine.if #set1(%i) { @@ -345,7 +345,7 @@ // CHECK-NEXT: %[[c0:.*]]{{.*}} = arith.constant 0 : index // CHECK-NEXT: %[[cm10:.*]]{{.*}} = arith.constant -10 : index // CHECK-NEXT: %{{.*}} = arith.addi %{{.*}}, %[[cm10:.*]]{{.*}} : index -// CHECK-NEXT: %{{.*}} = arith.cmpi sge, %{{.*}}, %[[c0:.*]]{{.*}} : index +// CHECK-NEXT: %{{.*}} = arith.cmpi sge(%{{.*}}, %[[c0:.*]]{{.*}}) : index // CHECK-NEXT: if %{{.*}} { // CHECK-NEXT: %[[c0_:.*]]{{.*}} = arith.constant 0 : index // CHECK-NEXT: %[[c42_:.*]]{{.*}} = arith.constant 42 : index @@ -373,11 +373,11 @@ // CHECK-NEXT: %[[cm1:.*]] = arith.constant -1 : index // CHECK-NEXT: %[[a:.*]] = arith.muli %{{.*}}, %[[cm1]] : index // CHECK-NEXT: %[[b:.*]] = arith.addi %[[a]], %{{.*}} : index -// CHECK-NEXT: %[[c:.*]] = arith.cmpi sgt, %{{.*}}, %[[b]] : index +// CHECK-NEXT: %[[c:.*]] = arith.cmpi sgt(%{{.*}}, %[[b]]) : index // CHECK-NEXT: %[[d:.*]] = arith.select %[[c]], %{{.*}}, %[[b]] : index // CHECK-NEXT: %[[c10:.*]] = arith.constant 10 : index // CHECK-NEXT: %[[e:.*]] = arith.addi %{{.*}}, %[[c10]] : index -// CHECK-NEXT: %[[f:.*]] = arith.cmpi slt, %{{.*}}, %[[e]] : index +// CHECK-NEXT: %[[f:.*]] = arith.cmpi slt(%{{.*}}, %[[e]]) : index // CHECK-NEXT: %[[g:.*]] = arith.select %[[f]], %{{.*}}, %[[e]] : index // CHECK-NEXT: %[[c1_0:.*]] = arith.constant 1 : index // CHECK-NEXT: for %{{.*}} = %[[d]] to %[[g]] step %[[c1_0]] { @@ -402,17 +402,17 @@ // CHECK-LABEL: func @min_reduction_tree // CHECK-NEXT: %[[c0:.*]] = arith.constant 0 : index -// CHECK-NEXT: %[[c01:.+]] = arith.cmpi slt, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %[[c01:.+]] = arith.cmpi slt(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: %[[r01:.+]] = arith.select %[[c01]], %{{.*}}, %{{.*}} : index -// CHECK-NEXT: %[[c012:.+]] = arith.cmpi slt, %[[r01]], %{{.*}} : index +// CHECK-NEXT: %[[c012:.+]] = arith.cmpi slt(%[[r01]], %{{.*}}) : index // CHECK-NEXT: %[[r012:.+]] = arith.select %[[c012]], %[[r01]], %{{.*}} : index -// CHECK-NEXT: %[[c0123:.+]] = arith.cmpi slt, %[[r012]], %{{.*}} : index +// CHECK-NEXT: %[[c0123:.+]] = arith.cmpi slt(%[[r012]], %{{.*}}) : index // CHECK-NEXT: %[[r0123:.+]] = arith.select %[[c0123]], %[[r012]], %{{.*}} : index -// CHECK-NEXT: %[[c01234:.+]] = arith.cmpi slt, %[[r0123]], %{{.*}} : index +// CHECK-NEXT: %[[c01234:.+]] = arith.cmpi slt(%[[r0123]], %{{.*}}) : index // CHECK-NEXT: %[[r01234:.+]] = arith.select %[[c01234]], %[[r0123]], %{{.*}} : index -// CHECK-NEXT: %[[c012345:.+]] = arith.cmpi slt, %[[r01234]], %{{.*}} : index +// CHECK-NEXT: %[[c012345:.+]] = arith.cmpi slt(%[[r01234]], %{{.*}}) : index // CHECK-NEXT: %[[r012345:.+]] = arith.select %[[c012345]], %[[r01234]], %{{.*}} : index -// CHECK-NEXT: %[[c0123456:.+]] = arith.cmpi slt, %[[r012345]], %{{.*}} : index +// CHECK-NEXT: %[[c0123456:.+]] = arith.cmpi slt(%[[r012345]], %{{.*}}) : index // CHECK-NEXT: %[[r0123456:.+]] = arith.select %[[c0123456]], %[[r012345]], %{{.*}} : index // CHECK-NEXT: %[[c1:.*]] = arith.constant 1 : index // CHECK-NEXT: for %{{.*}} = %[[c0]] to %[[r0123456]] step %[[c1]] { @@ -505,7 +505,7 @@ // CHECK-NEXT: %[[c42:.*]] = arith.constant 42 : index // CHECK-NEXT: %[[v0:.*]] = arith.remsi %{{.*}}, %[[c42]] : index // CHECK-NEXT: %[[c0:.*]] = arith.constant 0 : index -// CHECK-NEXT: %[[v1:.*]] = arith.cmpi slt, %[[v0]], %[[c0]] : index +// CHECK-NEXT: %[[v1:.*]] = arith.cmpi slt(%[[v0]], %[[c0]]) : index // CHECK-NEXT: %[[v2:.*]] = arith.addi %[[v0]], %[[c42]] : index // CHECK-NEXT: %[[v3:.*]] = arith.select %[[v1]], %[[v2]], %[[v0]] : index %0 = affine.apply #mapmod (%arg0) @@ -524,7 +524,7 @@ // CHECK-NEXT: %[[c42:.*]] = arith.constant 42 : index // CHECK-NEXT: %[[c0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[cm1:.*]] = arith.constant -1 : index -// CHECK-NEXT: %[[v0:.*]] = arith.cmpi slt, %{{.*}}, %[[c0]] : index +// CHECK-NEXT: %[[v0:.*]] = arith.cmpi slt(%{{.*}}, %[[c0]]) : index // CHECK-NEXT: %[[v1:.*]] = arith.subi %[[cm1]], %{{.*}} : index // CHECK-NEXT: %[[v2:.*]] = arith.select %[[v0]], %[[v1]], %{{.*}} : index // CHECK-NEXT: %[[v3:.*]] = arith.divsi %[[v2]], %[[c42]] : index @@ -546,7 +546,7 @@ // CHECK-NEXT: %[[c42:.*]] = arith.constant 42 : index // CHECK-NEXT: %[[c0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[c1:.*]] = arith.constant 1 : index -// CHECK-NEXT: %[[v0:.*]] = arith.cmpi sle, %{{.*}}, %[[c0]] : index +// CHECK-NEXT: %[[v0:.*]] = arith.cmpi sle(%{{.*}}, %[[c0]]) : index // CHECK-NEXT: %[[v1:.*]] = arith.subi %[[c0]], %{{.*}} : index // CHECK-NEXT: %[[v2:.*]] = arith.subi %{{.*}}, %[[c1]] : index // CHECK-NEXT: %[[v3:.*]] = arith.select %[[v0]], %[[v1]], %[[v2]] : index @@ -651,7 +651,7 @@ // CHECK: %[[Cm2:.*]] = arith.constant -1 // CHECK: %[[neg2:.*]] = arith.muli %[[ARG0]], %[[Cm2:.*]] // CHECK: %[[second:.*]] = arith.addi %[[ARG1]], %[[neg2]] - // CHECK: %[[cmp:.*]] = arith.cmpi slt, %[[first]], %[[second]] + // CHECK: %[[cmp:.*]] = arith.cmpi slt(%[[first]], %[[second]]) // CHECK: arith.select %[[cmp]], %[[first]], %[[second]] %0 = affine.min affine_map<(d0,d1) -> (d0 - d1, d1 - d0)>(%arg0, %arg1) return %0 : index @@ -666,7 +666,7 @@ // CHECK: %[[Cm2:.*]] = arith.constant -1 // CHECK: %[[neg2:.*]] = arith.muli %[[ARG0]], %[[Cm2:.*]] // CHECK: %[[second:.*]] = arith.addi %[[ARG1]], %[[neg2]] - // CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[first]], %[[second]] + // CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[first]], %[[second]]) // CHECK: arith.select %[[cmp]], %[[first]], %[[second]] %0 = affine.max affine_map<(d0,d1) -> (d0 - d1, d1 - d0)>(%arg0, %arg1) return %0 : index diff --git a/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir b/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir --- a/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir +++ b/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir @@ -41,7 +41,7 @@ // CHECK: = llvm.sub %arg2, %arg3 : i32 %1 = arith.subi %arg2, %arg3: i32 // CHECK: = llvm.icmp "slt" %arg2, %1 : i32 - %2 = arith.cmpi slt, %arg2, %1 : i32 + %2 = arith.cmpi slt(%arg2, %1) : i32 // CHECK: = llvm.sdiv %arg2, %arg3 : i32 %3 = arith.divsi %arg2, %arg3 : i32 // CHECK: = llvm.udiv %arg2, %arg3 : i32 @@ -298,20 +298,20 @@ // CHECK-NEXT: llvm.fcmp "une" %arg0, %arg1 : f32 // CHECK-NEXT: llvm.fcmp "uno" %arg0, %arg1 : f32 // CHECK-NEXT: return - %1 = arith.cmpf oeq, %arg0, %arg1 : f32 - %2 = arith.cmpf ogt, %arg0, %arg1 : f32 - %3 = arith.cmpf oge, %arg0, %arg1 : f32 - %4 = arith.cmpf olt, %arg0, %arg1 : f32 - %5 = arith.cmpf ole, %arg0, %arg1 : f32 - %6 = arith.cmpf one, %arg0, %arg1 : f32 - %7 = arith.cmpf ord, %arg0, %arg1 : f32 - %8 = arith.cmpf ueq, %arg0, %arg1 : f32 - %9 = arith.cmpf ugt, %arg0, %arg1 : f32 - %10 = arith.cmpf uge, %arg0, %arg1 : f32 - %11 = arith.cmpf ult, %arg0, %arg1 : f32 - %12 = arith.cmpf ule, %arg0, %arg1 : f32 - %13 = arith.cmpf une, %arg0, %arg1 : f32 - %14 = arith.cmpf uno, %arg0, %arg1 : f32 + %1 = arith.cmpf oeq(%arg0, %arg1) : f32 + %2 = arith.cmpf ogt(%arg0, %arg1) : f32 + %3 = arith.cmpf oge(%arg0, %arg1) : f32 + %4 = arith.cmpf olt(%arg0, %arg1) : f32 + %5 = arith.cmpf ole(%arg0, %arg1) : f32 + %6 = arith.cmpf one(%arg0, %arg1) : f32 + %7 = arith.cmpf ord(%arg0, %arg1) : f32 + %8 = arith.cmpf ueq(%arg0, %arg1) : f32 + %9 = arith.cmpf ugt(%arg0, %arg1) : f32 + %10 = arith.cmpf uge(%arg0, %arg1) : f32 + %11 = arith.cmpf ult(%arg0, %arg1) : f32 + %12 = arith.cmpf ule(%arg0, %arg1) : f32 + %13 = arith.cmpf une(%arg0, %arg1) : f32 + %14 = arith.cmpf uno(%arg0, %arg1) : f32 return } @@ -370,7 +370,7 @@ // CHECK: %[[EXTRACT2:.*]] = llvm.extractvalue %[[ARG1]][0] : !llvm.array<4 x vector<3xf32>> // CHECK: %[[CMP:.*]] = llvm.fcmp "olt" %[[EXTRACT1]], %[[EXTRACT2]] : vector<3xf32> // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[CMP]], %2[0] : !llvm.array<4 x vector<3xi1>> - %0 = arith.cmpf olt, %arg0, %arg1 : vector<4x3xf32> + %0 = arith.cmpf olt(%arg0, %arg1) : vector<4x3xf32> func.return } @@ -381,7 +381,7 @@ // CHECK: %[[ARG0:.*]] = builtin.unrealized_conversion_cast // CHECK: %[[ARG1:.*]] = builtin.unrealized_conversion_cast // CHECK: %[[CMP:.*]] = llvm.icmp "ult" %[[ARG0]], %[[ARG1]] : vector<1xi32> - %0 = arith.cmpi ult, %arg0, %arg1 : vector + %0 = arith.cmpi ult(%arg0, %arg1) : vector func.return } @@ -395,7 +395,7 @@ // CHECK: %[[EXTRACT2:.*]] = llvm.extractvalue %[[ARG1]][0] : !llvm.array<4 x vector<3xi32>> // CHECK: %[[CMP:.*]] = llvm.icmp "ult" %[[EXTRACT1]], %[[EXTRACT2]] : vector<3xi32> // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[CMP]], %2[0] : !llvm.array<4 x vector<3xi1>> - %0 = arith.cmpi ult, %arg0, %arg1 : vector<4x3xi32> + %0 = arith.cmpi ult(%arg0, %arg1) : vector<4x3xi32> func.return } diff --git a/mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir b/mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir --- a/mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir +++ b/mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir @@ -313,29 +313,29 @@ // CHECK-LABEL: @cmpf func.func @cmpf(%arg0 : f32, %arg1 : f32) { // CHECK: spv.FOrdEqual - %1 = arith.cmpf oeq, %arg0, %arg1 : f32 + %1 = arith.cmpf oeq(%arg0, %arg1) : f32 // CHECK: spv.FOrdGreaterThan - %2 = arith.cmpf ogt, %arg0, %arg1 : f32 + %2 = arith.cmpf ogt(%arg0, %arg1) : f32 // CHECK: spv.FOrdGreaterThanEqual - %3 = arith.cmpf oge, %arg0, %arg1 : f32 + %3 = arith.cmpf oge(%arg0, %arg1) : f32 // CHECK: spv.FOrdLessThan - %4 = arith.cmpf olt, %arg0, %arg1 : f32 + %4 = arith.cmpf olt(%arg0, %arg1) : f32 // CHECK: spv.FOrdLessThanEqual - %5 = arith.cmpf ole, %arg0, %arg1 : f32 + %5 = arith.cmpf ole(%arg0, %arg1) : f32 // CHECK: spv.FOrdNotEqual - %6 = arith.cmpf one, %arg0, %arg1 : f32 + %6 = arith.cmpf one(%arg0, %arg1) : f32 // CHECK: spv.FUnordEqual - %7 = arith.cmpf ueq, %arg0, %arg1 : f32 + %7 = arith.cmpf ueq(%arg0, %arg1) : f32 // CHECK: spv.FUnordGreaterThan - %8 = arith.cmpf ugt, %arg0, %arg1 : f32 + %8 = arith.cmpf ugt(%arg0, %arg1) : f32 // CHECK: spv.FUnordGreaterThanEqual - %9 = arith.cmpf uge, %arg0, %arg1 : f32 + %9 = arith.cmpf uge(%arg0, %arg1) : f32 // CHECK: spv.FUnordLessThan - %10 = arith.cmpf ult, %arg0, %arg1 : f32 + %10 = arith.cmpf ult(%arg0, %arg1) : f32 // CHECK: FUnordLessThanEqual - %11 = arith.cmpf ule, %arg0, %arg1 : f32 + %11 = arith.cmpf ule(%arg0, %arg1) : f32 // CHECK: spv.FUnordNotEqual - %12 = arith.cmpf une, %arg0, %arg1 : f32 + %12 = arith.cmpf une(%arg0, %arg1) : f32 return } @@ -351,9 +351,9 @@ // CHECK-LABEL: @cmpf func.func @cmpf(%arg0 : f32, %arg1 : f32) { // CHECK: spv.Ordered - %0 = arith.cmpf ord, %arg0, %arg1 : f32 + %0 = arith.cmpf ord(%arg0, %arg1) : f32 // CHECK: spv.Unordered - %1 = arith.cmpf uno, %arg0, %arg1 : f32 + %1 = arith.cmpf uno(%arg0, %arg1) : f32 return } @@ -373,12 +373,12 @@ // CHECK-NEXT: %[[RHS_NAN:.+]] = spv.IsNan %[[RHS]] : f32 // CHECK-NEXT: %[[OR:.+]] = spv.LogicalOr %[[LHS_NAN]], %[[RHS_NAN]] : i1 // CHECK-NEXT: %{{.+}} = spv.LogicalNot %[[OR]] : i1 - %0 = arith.cmpf ord, %arg0, %arg1 : f32 + %0 = arith.cmpf ord(%arg0, %arg1) : f32 // CHECK-NEXT: %[[LHS_NAN:.+]] = spv.IsNan %[[LHS]] : f32 // CHECK-NEXT: %[[RHS_NAN:.+]] = spv.IsNan %[[RHS]] : f32 // CHECK-NEXT: %{{.+}} = spv.LogicalOr %[[LHS_NAN]], %[[RHS_NAN]] : i1 - %1 = arith.cmpf uno, %arg0, %arg1 : f32 + %1 = arith.cmpf uno(%arg0, %arg1) : f32 return } @@ -397,43 +397,43 @@ // CHECK-LABEL: @cmpi func.func @cmpi(%arg0 : i32, %arg1 : i32) { // CHECK: spv.IEqual - %0 = arith.cmpi eq, %arg0, %arg1 : i32 + %0 = arith.cmpi eq(%arg0, %arg1) : i32 // CHECK: spv.INotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : i32 + %1 = arith.cmpi ne(%arg0, %arg1) : i32 // CHECK: spv.SLessThan - %2 = arith.cmpi slt, %arg0, %arg1 : i32 + %2 = arith.cmpi slt(%arg0, %arg1) : i32 // CHECK: spv.SLessThanEqual - %3 = arith.cmpi sle, %arg0, %arg1 : i32 + %3 = arith.cmpi sle(%arg0, %arg1) : i32 // CHECK: spv.SGreaterThan - %4 = arith.cmpi sgt, %arg0, %arg1 : i32 + %4 = arith.cmpi sgt(%arg0, %arg1) : i32 // CHECK: spv.SGreaterThanEqual - %5 = arith.cmpi sge, %arg0, %arg1 : i32 + %5 = arith.cmpi sge(%arg0, %arg1) : i32 // CHECK: spv.ULessThan - %6 = arith.cmpi ult, %arg0, %arg1 : i32 + %6 = arith.cmpi ult(%arg0, %arg1) : i32 // CHECK: spv.ULessThanEqual - %7 = arith.cmpi ule, %arg0, %arg1 : i32 + %7 = arith.cmpi ule(%arg0, %arg1) : i32 // CHECK: spv.UGreaterThan - %8 = arith.cmpi ugt, %arg0, %arg1 : i32 + %8 = arith.cmpi ugt(%arg0, %arg1) : i32 // CHECK: spv.UGreaterThanEqual - %9 = arith.cmpi uge, %arg0, %arg1 : i32 + %9 = arith.cmpi uge(%arg0, %arg1) : i32 return } // CHECK-LABEL: @vec1cmpi func.func @vec1cmpi(%arg0 : vector<1xi32>, %arg1 : vector<1xi32>) { // CHECK: spv.ULessThan - %0 = arith.cmpi ult, %arg0, %arg1 : vector<1xi32> + %0 = arith.cmpi ult(%arg0, %arg1) : vector<1xi32> // CHECK: spv.SGreaterThan - %1 = arith.cmpi sgt, %arg0, %arg1 : vector<1xi32> + %1 = arith.cmpi sgt(%arg0, %arg1) : vector<1xi32> return } // CHECK-LABEL: @boolcmpi_equality func.func @boolcmpi_equality(%arg0 : i1, %arg1 : i1) { // CHECK: spv.LogicalEqual - %0 = arith.cmpi eq, %arg0, %arg1 : i1 + %0 = arith.cmpi eq(%arg0, %arg1) : i1 // CHECK: spv.LogicalNotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : i1 + %1 = arith.cmpi ne(%arg0, %arg1) : i1 return } @@ -441,19 +441,19 @@ func.func @boolcmpi_unsigned(%arg0 : i1, %arg1 : i1) { // CHECK-COUNT-2: spv.Select // CHECK: spv.UGreaterThanEqual - %0 = arith.cmpi uge, %arg0, %arg1 : i1 + %0 = arith.cmpi uge(%arg0, %arg1) : i1 // CHECK-COUNT-2: spv.Select // CHECK: spv.ULessThan - %1 = arith.cmpi ult, %arg0, %arg1 : i1 + %1 = arith.cmpi ult(%arg0, %arg1) : i1 return } // CHECK-LABEL: @vec1boolcmpi_equality func.func @vec1boolcmpi_equality(%arg0 : vector<1xi1>, %arg1 : vector<1xi1>) { // CHECK: spv.LogicalEqual - %0 = arith.cmpi eq, %arg0, %arg1 : vector<1xi1> + %0 = arith.cmpi eq(%arg0, %arg1) : vector<1xi1> // CHECK: spv.LogicalNotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : vector<1xi1> + %1 = arith.cmpi ne(%arg0, %arg1) : vector<1xi1> return } @@ -461,19 +461,19 @@ func.func @vec1boolcmpi_unsigned(%arg0 : vector<1xi1>, %arg1 : vector<1xi1>) { // CHECK-COUNT-2: spv.Select // CHECK: spv.UGreaterThanEqual - %0 = arith.cmpi uge, %arg0, %arg1 : vector<1xi1> + %0 = arith.cmpi uge(%arg0, %arg1) : vector<1xi1> // CHECK-COUNT-2: spv.Select // CHECK: spv.ULessThan - %1 = arith.cmpi ult, %arg0, %arg1 : vector<1xi1> + %1 = arith.cmpi ult(%arg0, %arg1) : vector<1xi1> return } // CHECK-LABEL: @vecboolcmpi_equality func.func @vecboolcmpi_equality(%arg0 : vector<4xi1>, %arg1 : vector<4xi1>) { // CHECK: spv.LogicalEqual - %0 = arith.cmpi eq, %arg0, %arg1 : vector<4xi1> + %0 = arith.cmpi eq(%arg0, %arg1) : vector<4xi1> // CHECK: spv.LogicalNotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : vector<4xi1> + %1 = arith.cmpi ne(%arg0, %arg1) : vector<4xi1> return } @@ -481,10 +481,10 @@ func.func @vecboolcmpi_unsigned(%arg0 : vector<3xi1>, %arg1 : vector<3xi1>) { // CHECK-COUNT-2: spv.Select // CHECK: spv.UGreaterThanEqual - %0 = arith.cmpi uge, %arg0, %arg1 : vector<3xi1> + %0 = arith.cmpi uge(%arg0, %arg1) : vector<3xi1> // CHECK-COUNT-2: spv.Select // CHECK: spv.ULessThan - %1 = arith.cmpi ult, %arg0, %arg1 : vector<3xi1> + %1 = arith.cmpi ult(%arg0, %arg1) : vector<3xi1> return } @@ -1014,7 +1014,7 @@ // CHECK-LABEL: @select func.func @select(%arg0 : i32, %arg1 : i32) { - %0 = arith.cmpi sle, %arg0, %arg1 : i32 + %0 = arith.cmpi sle(%arg0, %arg1) : i32 // CHECK: spv.Select %1 = arith.select %0, %arg0, %arg1 : i32 return @@ -1290,38 +1290,38 @@ // CHECK-LABEL: @cmpf func.func @cmpf(%arg0 : f32, %arg1 : f32) { // CHECK: spv.FOrdEqual - %1 = arith.cmpf oeq, %arg0, %arg1 : f32 + %1 = arith.cmpf oeq(%arg0, %arg1) : f32 // CHECK: spv.FOrdGreaterThan - %2 = arith.cmpf ogt, %arg0, %arg1 : f32 + %2 = arith.cmpf ogt(%arg0, %arg1) : f32 // CHECK: spv.FOrdGreaterThanEqual - %3 = arith.cmpf oge, %arg0, %arg1 : f32 + %3 = arith.cmpf oge(%arg0, %arg1) : f32 // CHECK: spv.FOrdLessThan - %4 = arith.cmpf olt, %arg0, %arg1 : f32 + %4 = arith.cmpf olt(%arg0, %arg1) : f32 // CHECK: spv.FOrdLessThanEqual - %5 = arith.cmpf ole, %arg0, %arg1 : f32 + %5 = arith.cmpf ole(%arg0, %arg1) : f32 // CHECK: spv.FOrdNotEqual - %6 = arith.cmpf one, %arg0, %arg1 : f32 + %6 = arith.cmpf one(%arg0, %arg1) : f32 // CHECK: spv.FUnordEqual - %7 = arith.cmpf ueq, %arg0, %arg1 : f32 + %7 = arith.cmpf ueq(%arg0, %arg1) : f32 // CHECK: spv.FUnordGreaterThan - %8 = arith.cmpf ugt, %arg0, %arg1 : f32 + %8 = arith.cmpf ugt(%arg0, %arg1) : f32 // CHECK: spv.FUnordGreaterThanEqual - %9 = arith.cmpf uge, %arg0, %arg1 : f32 + %9 = arith.cmpf uge(%arg0, %arg1) : f32 // CHECK: spv.FUnordLessThan - %10 = arith.cmpf ult, %arg0, %arg1 : f32 + %10 = arith.cmpf ult(%arg0, %arg1) : f32 // CHECK: FUnordLessThanEqual - %11 = arith.cmpf ule, %arg0, %arg1 : f32 + %11 = arith.cmpf ule(%arg0, %arg1) : f32 // CHECK: spv.FUnordNotEqual - %12 = arith.cmpf une, %arg0, %arg1 : f32 + %12 = arith.cmpf une(%arg0, %arg1) : f32 return } // CHECK-LABEL: @vec1cmpf func.func @vec1cmpf(%arg0 : vector<1xf32>, %arg1 : vector<1xf32>) { // CHECK: spv.FOrdGreaterThan - %0 = arith.cmpf ogt, %arg0, %arg1 : vector<1xf32> + %0 = arith.cmpf ogt(%arg0, %arg1) : vector<1xf32> // CHECK: spv.FUnordLessThan - %1 = arith.cmpf ult, %arg0, %arg1 : vector<1xf32> + %1 = arith.cmpf ult(%arg0, %arg1) : vector<1xf32> return } @@ -1337,9 +1337,9 @@ // CHECK-LABEL: @cmpf func.func @cmpf(%arg0 : f32, %arg1 : f32) { // CHECK: spv.Ordered - %0 = arith.cmpf ord, %arg0, %arg1 : f32 + %0 = arith.cmpf ord(%arg0, %arg1) : f32 // CHECK: spv.Unordered - %1 = arith.cmpf uno, %arg0, %arg1 : f32 + %1 = arith.cmpf uno(%arg0, %arg1) : f32 return } @@ -1359,12 +1359,12 @@ // CHECK-NEXT: %[[RHS_NAN:.+]] = spv.IsNan %[[RHS]] : f32 // CHECK-NEXT: %[[OR:.+]] = spv.LogicalOr %[[LHS_NAN]], %[[RHS_NAN]] : i1 // CHECK-NEXT: %{{.+}} = spv.LogicalNot %[[OR]] : i1 - %0 = arith.cmpf ord, %arg0, %arg1 : f32 + %0 = arith.cmpf ord(%arg0, %arg1) : f32 // CHECK-NEXT: %[[LHS_NAN:.+]] = spv.IsNan %[[LHS]] : f32 // CHECK-NEXT: %[[RHS_NAN:.+]] = spv.IsNan %[[RHS]] : f32 // CHECK-NEXT: %{{.+}} = spv.LogicalOr %[[LHS_NAN]], %[[RHS_NAN]] : i1 - %1 = arith.cmpf uno, %arg0, %arg1 : f32 + %1 = arith.cmpf uno(%arg0, %arg1) : f32 return } @@ -1383,43 +1383,43 @@ // CHECK-LABEL: @cmpi func.func @cmpi(%arg0 : i32, %arg1 : i32) { // CHECK: spv.IEqual - %0 = arith.cmpi eq, %arg0, %arg1 : i32 + %0 = arith.cmpi eq(%arg0, %arg1) : i32 // CHECK: spv.INotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : i32 + %1 = arith.cmpi ne(%arg0, %arg1) : i32 // CHECK: spv.SLessThan - %2 = arith.cmpi slt, %arg0, %arg1 : i32 + %2 = arith.cmpi slt(%arg0, %arg1) : i32 // CHECK: spv.SLessThanEqual - %3 = arith.cmpi sle, %arg0, %arg1 : i32 + %3 = arith.cmpi sle(%arg0, %arg1) : i32 // CHECK: spv.SGreaterThan - %4 = arith.cmpi sgt, %arg0, %arg1 : i32 + %4 = arith.cmpi sgt(%arg0, %arg1) : i32 // CHECK: spv.SGreaterThanEqual - %5 = arith.cmpi sge, %arg0, %arg1 : i32 + %5 = arith.cmpi sge(%arg0, %arg1) : i32 // CHECK: spv.ULessThan - %6 = arith.cmpi ult, %arg0, %arg1 : i32 + %6 = arith.cmpi ult(%arg0, %arg1) : i32 // CHECK: spv.ULessThanEqual - %7 = arith.cmpi ule, %arg0, %arg1 : i32 + %7 = arith.cmpi ule(%arg0, %arg1) : i32 // CHECK: spv.UGreaterThan - %8 = arith.cmpi ugt, %arg0, %arg1 : i32 + %8 = arith.cmpi ugt(%arg0, %arg1) : i32 // CHECK: spv.UGreaterThanEqual - %9 = arith.cmpi uge, %arg0, %arg1 : i32 + %9 = arith.cmpi uge(%arg0, %arg1) : i32 return } // CHECK-LABEL: @boolcmpi func.func @boolcmpi(%arg0 : i1, %arg1 : i1) { // CHECK: spv.LogicalEqual - %0 = arith.cmpi eq, %arg0, %arg1 : i1 + %0 = arith.cmpi eq(%arg0, %arg1) : i1 // CHECK: spv.LogicalNotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : i1 + %1 = arith.cmpi ne(%arg0, %arg1) : i1 return } // CHECK-LABEL: @vecboolcmpi func.func @vecboolcmpi(%arg0 : vector<4xi1>, %arg1 : vector<4xi1>) { // CHECK: spv.LogicalEqual - %0 = arith.cmpi eq, %arg0, %arg1 : vector<4xi1> + %0 = arith.cmpi eq(%arg0, %arg1) : vector<4xi1> // CHECK: spv.LogicalNotEqual - %1 = arith.cmpi ne, %arg0, %arg1 : vector<4xi1> + %1 = arith.cmpi ne(%arg0, %arg1) : vector<4xi1> return } diff --git a/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir b/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir --- a/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir +++ b/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir @@ -100,11 +100,11 @@ // Case 1. Zero denominator, numerator contains at most one NaN value. // CHECK: %[[ZERO:.*]] = arith.constant 0.000000e+00 : f32 // CHECK: %[[RHS_REAL_ABS:.*]] = math.absf %[[RHS_REAL]] : f32 -// CHECK: %[[RHS_REAL_ABS_IS_ZERO:.*]] = arith.cmpf oeq, %[[RHS_REAL_ABS]], %[[ZERO]] : f32 +// CHECK: %[[RHS_REAL_ABS_IS_ZERO:.*]] = arith.cmpf oeq(%[[RHS_REAL_ABS]], %[[ZERO]]) : f32 // CHECK: %[[RHS_IMAG_ABS:.*]] = math.absf %[[RHS_IMAG]] : f32 -// CHECK: %[[RHS_IMAG_ABS_IS_ZERO:.*]] = arith.cmpf oeq, %[[RHS_IMAG_ABS]], %[[ZERO]] : f32 -// CHECK: %[[LHS_REAL_IS_NOT_NAN:.*]] = arith.cmpf ord, %[[LHS_REAL]], %[[ZERO]] : f32 -// CHECK: %[[LHS_IMAG_IS_NOT_NAN:.*]] = arith.cmpf ord, %[[LHS_IMAG]], %[[ZERO]] : f32 +// CHECK: %[[RHS_IMAG_ABS_IS_ZERO:.*]] = arith.cmpf oeq(%[[RHS_IMAG_ABS]], %[[ZERO]]) : f32 +// CHECK: %[[LHS_REAL_IS_NOT_NAN:.*]] = arith.cmpf ord(%[[LHS_REAL]], %[[ZERO]]) : f32 +// CHECK: %[[LHS_IMAG_IS_NOT_NAN:.*]] = arith.cmpf ord(%[[LHS_IMAG]], %[[ZERO]]) : f32 // CHECK: %[[LHS_CONTAINS_NOT_NAN_VALUE:.*]] = arith.ori %[[LHS_REAL_IS_NOT_NAN]], %[[LHS_IMAG_IS_NOT_NAN]] : i1 // CHECK: %[[RHS_IS_ZERO:.*]] = arith.andi %[[RHS_REAL_ABS_IS_ZERO]], %[[RHS_IMAG_ABS_IS_ZERO]] : i1 // CHECK: %[[RESULT_IS_INFINITY:.*]] = arith.andi %[[LHS_CONTAINS_NOT_NAN_VALUE]], %[[RHS_IS_ZERO]] : i1 @@ -114,13 +114,13 @@ // CHECK: %[[INFINITY_RESULT_IMAG:.*]] = arith.mulf %[[INF_WITH_SIGN_OF_RHS_REAL]], %[[LHS_IMAG]] : f32 // Case 2. Infinite numerator, finite denominator. -// CHECK: %[[RHS_REAL_FINITE:.*]] = arith.cmpf one, %[[RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[RHS_IMAG_FINITE:.*]] = arith.cmpf one, %[[RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[RHS_REAL_FINITE:.*]] = arith.cmpf one(%[[RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[RHS_IMAG_FINITE:.*]] = arith.cmpf one(%[[RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[RHS_IS_FINITE:.*]] = arith.andi %[[RHS_REAL_FINITE]], %[[RHS_IMAG_FINITE]] : i1 // CHECK: %[[LHS_REAL_ABS:.*]] = math.absf %[[LHS_REAL]] : f32 -// CHECK: %[[LHS_REAL_INFINITE:.*]] = arith.cmpf oeq, %[[LHS_REAL_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_INFINITE:.*]] = arith.cmpf oeq(%[[LHS_REAL_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IMAG_ABS:.*]] = math.absf %[[LHS_IMAG]] : f32 -// CHECK: %[[LHS_IMAG_INFINITE:.*]] = arith.cmpf oeq, %[[LHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_IMAG_INFINITE:.*]] = arith.cmpf oeq(%[[LHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IS_INFINITE:.*]] = arith.ori %[[LHS_REAL_INFINITE]], %[[LHS_IMAG_INFINITE]] : i1 // CHECK: %[[INF_NUM_FINITE_DENOM:.*]] = arith.andi %[[LHS_IS_INFINITE]], %[[RHS_IS_FINITE]] : i1 // CHECK: %[[ONE:.*]] = arith.constant 1.000000e+00 : f32 @@ -138,11 +138,11 @@ // CHECK: %[[RESULT_IMAG_3:.*]] = arith.mulf %[[INF]], %[[INF_MULTIPLICATOR_2]] : f32 // Case 3. Finite numerator, infinite denominator. -// CHECK: %[[LHS_REAL_FINITE:.*]] = arith.cmpf one, %[[LHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[LHS_IMAG_FINITE:.*]] = arith.cmpf one, %[[LHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_FINITE:.*]] = arith.cmpf one(%[[LHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[LHS_IMAG_FINITE:.*]] = arith.cmpf one(%[[LHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IS_FINITE:.*]] = arith.andi %[[LHS_REAL_FINITE]], %[[LHS_IMAG_FINITE]] : i1 -// CHECK: %[[RHS_REAL_INFINITE:.*]] = arith.cmpf oeq, %[[RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[RHS_IMAG_INFINITE:.*]] = arith.cmpf oeq, %[[RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[RHS_REAL_INFINITE:.*]] = arith.cmpf oeq(%[[RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[RHS_IMAG_INFINITE:.*]] = arith.cmpf oeq(%[[RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[RHS_IS_INFINITE:.*]] = arith.ori %[[RHS_REAL_INFINITE]], %[[RHS_IMAG_INFINITE]] : i1 // CHECK: %[[FINITE_NUM_INFINITE_DENOM:.*]] = arith.andi %[[LHS_IS_FINITE]], %[[RHS_IS_INFINITE]] : i1 // CHECK: %[[RHS_REAL_IS_INF:.*]] = arith.select %[[RHS_REAL_INFINITE]], %[[ONE]], %[[ZERO]] : f32 @@ -158,7 +158,7 @@ // 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 // CHECK: %[[RESULT_IMAG_4:.*]] = arith.mulf %[[ZERO]], %[[ZERO_MULTIPLICATOR_2]] : f32 -// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32 +// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt(%[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]]) : f32 // CHECK: %[[RESULT_REAL:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_REAL_1]], %[[RESULT_REAL_2]] : f32 // CHECK: %[[RESULT_IMAG:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_IMAG_1]], %[[RESULT_IMAG_2]] : f32 // CHECK: %[[RESULT_REAL_SPECIAL_CASE_3:.*]] = arith.select %[[FINITE_NUM_INFINITE_DENOM]], %[[RESULT_REAL_4]], %[[RESULT_REAL]] : f32 @@ -167,8 +167,8 @@ // CHECK: %[[RESULT_IMAG_SPECIAL_CASE_2:.*]] = arith.select %[[INF_NUM_FINITE_DENOM]], %[[RESULT_IMAG_3]], %[[RESULT_IMAG_SPECIAL_CASE_3]] : f32 // CHECK: %[[RESULT_REAL_SPECIAL_CASE_1:.*]] = arith.select %[[RESULT_IS_INFINITY]], %[[INFINITY_RESULT_REAL]], %[[RESULT_REAL_SPECIAL_CASE_2]] : f32 // CHECK: %[[RESULT_IMAG_SPECIAL_CASE_1:.*]] = arith.select %[[RESULT_IS_INFINITY]], %[[INFINITY_RESULT_IMAG]], %[[RESULT_IMAG_SPECIAL_CASE_2]] : f32 -// CHECK: %[[RESULT_REAL_IS_NAN:.*]] = arith.cmpf uno, %[[RESULT_REAL]], %[[ZERO]] : f32 -// CHECK: %[[RESULT_IMAG_IS_NAN:.*]] = arith.cmpf uno, %[[RESULT_IMAG]], %[[ZERO]] : f32 +// CHECK: %[[RESULT_REAL_IS_NAN:.*]] = arith.cmpf uno(%[[RESULT_REAL]], %[[ZERO]]) : f32 +// CHECK: %[[RESULT_IMAG_IS_NAN:.*]] = arith.cmpf uno(%[[RESULT_IMAG]], %[[ZERO]]) : f32 // CHECK: %[[RESULT_IS_NAN:.*]] = arith.andi %[[RESULT_REAL_IS_NAN]], %[[RESULT_IMAG_IS_NAN]] : i1 // CHECK: %[[RESULT_REAL_WITH_SPECIAL_CASES:.*]] = arith.select %[[RESULT_IS_NAN]], %[[RESULT_REAL_SPECIAL_CASE_1]], %[[RESULT_REAL]] : f32 // CHECK: %[[RESULT_IMAG_WITH_SPECIAL_CASES:.*]] = arith.select %[[RESULT_IS_NAN]], %[[RESULT_IMAG_SPECIAL_CASE_1]], %[[RESULT_IMAG]] : f32 @@ -187,8 +187,8 @@ // CHECK: %[[IMAG_LHS:.*]] = complex.im %[[LHS]] : complex // CHECK: %[[REAL_RHS:.*]] = complex.re %[[RHS]] : complex // CHECK: %[[IMAG_RHS:.*]] = complex.im %[[RHS]] : complex -// CHECK-DAG: %[[REAL_EQUAL:.*]] = arith.cmpf oeq, %[[REAL_LHS]], %[[REAL_RHS]] : f32 -// CHECK-DAG: %[[IMAG_EQUAL:.*]] = arith.cmpf oeq, %[[IMAG_LHS]], %[[IMAG_RHS]] : f32 +// CHECK-DAG: %[[REAL_EQUAL:.*]] = arith.cmpf oeq(%[[REAL_LHS]], %[[REAL_RHS]]) : f32 +// CHECK-DAG: %[[IMAG_EQUAL:.*]] = arith.cmpf oeq(%[[IMAG_LHS]], %[[IMAG_RHS]]) : f32 // CHECK: %[[EQUAL:.*]] = arith.andi %[[REAL_EQUAL]], %[[IMAG_EQUAL]] : i1 // CHECK: return %[[EQUAL]] : i1 @@ -268,15 +268,15 @@ // CHECK: %[[ONE_HALF:.*]] = arith.constant 5.000000e-01 : f32 // CHECK: %[[ONE:.*]] = arith.constant 1.000000e+00 : f32 // CHECK: %[[TWO:.*]] = arith.constant 2.000000e+00 : f32 -// CHECK: %[[SQ_SUM_0:.*]] = arith.mulf %[[REAL]], %[[REAL]] : f32 +// CHECK: %[[SQ_SUM_0:.*]] = arith.mulf %[[REAL]], %[[REAL]] : f32 // CHECK: %[[TWO_REAL:.*]] = arith.mulf %[[REAL]], %[[TWO]] : f32 -// CHECK: %[[SQ_SUM_1:.*]] = arith.addf %[[SQ_SUM_0]], %[[TWO_REAL]] : f32 -// CHECK: %[[SQ_IMAG:.*]] = arith.mulf %[[IMAG]], %[[IMAG]] : f32 -// CHECK: %[[SQ_SUM_2:.*]] = arith.addf %[[SQ_SUM_1]], %[[SQ_IMAG]] : f32 -// CHECK: %[[LOG_SQ_SUM:.*]] = math.log1p %[[SQ_SUM_2]] : f32 +// CHECK: %[[SQ_SUM_1:.*]] = arith.addf %[[SQ_SUM_0]], %[[TWO_REAL]] : f32 +// CHECK: %[[SQ_IMAG:.*]] = arith.mulf %[[IMAG]], %[[IMAG]] : f32 +// CHECK: %[[SQ_SUM_2:.*]] = arith.addf %[[SQ_SUM_1]], %[[SQ_IMAG]] : f32 +// CHECK: %[[LOG_SQ_SUM:.*]] = math.log1p %[[SQ_SUM_2]] : f32 // CHECK: %[[RESULT_REAL:.*]] = arith.mulf %[[LOG_SQ_SUM]], %[[ONE_HALF]] : f32 // CHECK: %[[REAL_PLUS_ONE:.*]] = arith.addf %[[REAL]], %[[ONE]] : f32 -// CHECK: %[[RESULT_IMAG:.*]] = math.atan2 %[[IMAG]], %[[REAL_PLUS_ONE]] : f32 +// CHECK: %[[RESULT_IMAG:.*]] = math.atan2 %[[IMAG]], %[[REAL_PLUS_ONE]] : f32 // CHECK: %[[RESULT:.*]] = complex.create %[[RESULT_REAL]], %[[RESULT_IMAG]] : complex // CHECK: return %[[RESULT]] : complex @@ -310,17 +310,17 @@ // CHECK: %[[IMAG:.*]] = arith.addf %[[LHS_IMAG_TIMES_RHS_REAL]], %[[LHS_REAL_TIMES_RHS_IMAG]] : f32 // Handle cases where the "naive" calculation results in NaN values. -// CHECK: %[[REAL_IS_NAN:.*]] = arith.cmpf uno, %[[REAL]], %[[REAL]] : f32 -// CHECK: %[[IMAG_IS_NAN:.*]] = arith.cmpf uno, %[[IMAG]], %[[IMAG]] : f32 +// CHECK: %[[REAL_IS_NAN:.*]] = arith.cmpf uno(%[[REAL]], %[[REAL]]) : f32 +// CHECK: %[[IMAG_IS_NAN:.*]] = arith.cmpf uno(%[[IMAG]], %[[IMAG]]) : f32 // CHECK: %[[IS_NAN:.*]] = arith.andi %[[REAL_IS_NAN]], %[[IMAG_IS_NAN]] : i1 // CHECK: %[[INF:.*]] = arith.constant 0x7F800000 : f32 // Case 1. LHS_REAL or LHS_IMAG are infinite. -// CHECK: %[[LHS_REAL_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[LHS_IMAG_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[LHS_IMAG_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IS_INF:.*]] = arith.ori %[[LHS_REAL_IS_INF]], %[[LHS_IMAG_IS_INF]] : i1 -// CHECK: %[[RHS_REAL_IS_NAN:.*]] = arith.cmpf uno, %[[RHS_REAL]], %[[RHS_REAL]] : f32 -// CHECK: %[[RHS_IMAG_IS_NAN:.*]] = arith.cmpf uno, %[[RHS_IMAG]], %[[RHS_IMAG]] : f32 +// CHECK: %[[RHS_REAL_IS_NAN:.*]] = arith.cmpf uno(%[[RHS_REAL]], %[[RHS_REAL]]) : f32 +// CHECK: %[[RHS_IMAG_IS_NAN:.*]] = arith.cmpf uno(%[[RHS_IMAG]], %[[RHS_IMAG]]) : f32 // CHECK: %[[ZERO:.*]] = arith.constant 0.000000e+00 : f32 // CHECK: %[[ONE:.*]] = arith.constant 1.000000e+00 : f32 // CHECK: %[[LHS_REAL_IS_INF_FLOAT:.*]] = arith.select %[[LHS_REAL_IS_INF]], %[[ONE]], %[[ZERO]] : f32 @@ -337,11 +337,11 @@ // CHECK: %[[RHS_IMAG1:.*]] = arith.select %[[LHS_IS_INF_AND_RHS_IMAG_IS_NAN]], %[[TMP]], %[[RHS_IMAG]] : f32 // Case 2. RHS_REAL or RHS_IMAG are infinite. -// CHECK: %[[RHS_REAL_IS_INF:.*]] = arith.cmpf oeq, %[[RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq, %[[RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[RHS_REAL_IS_INF:.*]] = arith.cmpf oeq(%[[RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq(%[[RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[RHS_IS_INF:.*]] = arith.ori %[[RHS_REAL_IS_INF]], %[[RHS_IMAG_IS_INF]] : i1 -// CHECK: %[[LHS_REAL_IS_NAN:.*]] = arith.cmpf uno, %[[LHS_REAL1]], %[[LHS_REAL1]] : f32 -// CHECK: %[[LHS_IMAG_IS_NAN:.*]] = arith.cmpf uno, %[[LHS_IMAG1]], %[[LHS_IMAG1]] : f32 +// CHECK: %[[LHS_REAL_IS_NAN:.*]] = arith.cmpf uno(%[[LHS_REAL1]], %[[LHS_REAL1]]) : f32 +// CHECK: %[[LHS_IMAG_IS_NAN:.*]] = arith.cmpf uno(%[[LHS_IMAG1]], %[[LHS_IMAG1]]) : f32 // CHECK: %[[RHS_REAL_IS_INF_FLOAT:.*]] = arith.select %[[RHS_REAL_IS_INF]], %[[ONE]], %[[ZERO]] : f32 // CHECK: %[[TMP:.*]] = math.copysign %[[RHS_REAL_IS_INF_FLOAT]], %[[RHS_REAL1]] : f32 // CHECK: %[[RHS_REAL2:.*]] = arith.select %[[RHS_IS_INF]], %[[TMP]], %[[RHS_REAL1]] : f32 @@ -358,12 +358,12 @@ // Case 3. One of the pairwise products of left hand side with right hand side // is infinite. -// CHECK: %[[LHS_REAL_TIMES_RHS_REAL_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_REAL_TIMES_RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[LHS_IMAG_TIMES_RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_IMAG_TIMES_RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_TIMES_RHS_REAL_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_REAL_TIMES_RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[LHS_IMAG_TIMES_RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_IMAG_TIMES_RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[IS_SPECIAL_CASE:.*]] = arith.ori %[[LHS_REAL_TIMES_RHS_REAL_IS_INF]], %[[LHS_IMAG_TIMES_RHS_IMAG_IS_INF]] : i1 -// CHECK: %[[LHS_REAL_TIMES_RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_REAL_TIMES_RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_TIMES_RHS_IMAG_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_REAL_TIMES_RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[IS_SPECIAL_CASE1:.*]] = arith.ori %[[IS_SPECIAL_CASE]], %[[LHS_REAL_TIMES_RHS_IMAG_IS_INF]] : i1 -// CHECK: %[[LHS_IMAG_TIMES_RHS_REAL_IS_INF:.*]] = arith.cmpf oeq, %[[LHS_IMAG_TIMES_RHS_REAL_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_IMAG_TIMES_RHS_REAL_IS_INF:.*]] = arith.cmpf oeq(%[[LHS_IMAG_TIMES_RHS_REAL_ABS]], %[[INF]]) : f32 // CHECK: %[[IS_SPECIAL_CASE2:.*]] = arith.ori %[[IS_SPECIAL_CASE1]], %[[LHS_IMAG_TIMES_RHS_REAL_IS_INF]] : i1 // CHECK: %[[TRUE:.*]] = arith.constant true // CHECK: %[[NOT_RECALC:.*]] = arith.xori %[[RECALC]], %[[TRUE]] : i1 @@ -427,8 +427,8 @@ // CHECK: %[[IMAG_LHS:.*]] = complex.im %[[LHS]] : complex // CHECK: %[[REAL_RHS:.*]] = complex.re %[[RHS]] : complex // CHECK: %[[IMAG_RHS:.*]] = complex.im %[[RHS]] : complex -// CHECK-DAG: %[[REAL_NOT_EQUAL:.*]] = arith.cmpf une, %[[REAL_LHS]], %[[REAL_RHS]] : f32 -// CHECK-DAG: %[[IMAG_NOT_EQUAL:.*]] = arith.cmpf une, %[[IMAG_LHS]], %[[IMAG_RHS]] : f32 +// CHECK-DAG: %[[REAL_NOT_EQUAL:.*]] = arith.cmpf une(%[[REAL_LHS]], %[[REAL_RHS]]) : f32 +// CHECK-DAG: %[[IMAG_NOT_EQUAL:.*]] = arith.cmpf une(%[[IMAG_LHS]], %[[IMAG_RHS]]) : f32 // CHECK: %[[NOT_EQUAL:.*]] = arith.ori %[[REAL_NOT_EQUAL]], %[[IMAG_NOT_EQUAL]] : i1 // CHECK: return %[[NOT_EQUAL]] : i1 @@ -466,8 +466,8 @@ // CHECK: %[[REAL:.*]] = complex.re %[[ARG]] : complex // CHECK: %[[IMAG:.*]] = complex.im %[[ARG]] : complex // CHECK: %[[ZERO:.*]] = arith.constant 0.000000e+00 : f32 -// CHECK: %[[REAL_IS_ZERO:.*]] = arith.cmpf oeq, %[[REAL]], %[[ZERO]] : f32 -// CHECK: %[[IMAG_IS_ZERO:.*]] = arith.cmpf oeq, %1, %cst : f32 +// CHECK: %[[REAL_IS_ZERO:.*]] = arith.cmpf oeq(%[[REAL]], %[[ZERO]]) : f32 +// CHECK: %[[IMAG_IS_ZERO:.*]] = arith.cmpf oeq(%1, %cst) : f32 // CHECK: %[[IS_ZERO:.*]] = arith.andi %[[REAL_IS_ZERO]], %[[IMAG_IS_ZERO]] : i1 // CHECK: %[[REAL2:.*]] = complex.re %[[ARG]] : complex // CHECK: %[[IMAG2:.*]] = complex.im %[[ARG]] : complex @@ -562,11 +562,11 @@ // Case 1. Zero denominator, numerator contains at most one NaN value. // CHECK: %[[ZERO:.*]] = arith.constant 0.000000e+00 : f32 // CHECK: %[[RHS_REAL_ABS:.*]] = math.absf %[[RHS_REAL]] : f32 -// CHECK: %[[RHS_REAL_ABS_IS_ZERO:.*]] = arith.cmpf oeq, %[[RHS_REAL_ABS]], %[[ZERO]] : f32 +// CHECK: %[[RHS_REAL_ABS_IS_ZERO:.*]] = arith.cmpf oeq(%[[RHS_REAL_ABS]], %[[ZERO]]) : f32 // CHECK: %[[RHS_IMAG_ABS:.*]] = math.absf %[[RHS_IMAG]] : f32 -// CHECK: %[[RHS_IMAG_ABS_IS_ZERO:.*]] = arith.cmpf oeq, %[[RHS_IMAG_ABS]], %[[ZERO]] : f32 -// CHECK: %[[LHS_REAL_IS_NOT_NAN:.*]] = arith.cmpf ord, %[[LHS_REAL]], %[[ZERO]] : f32 -// CHECK: %[[LHS_IMAG_IS_NOT_NAN:.*]] = arith.cmpf ord, %[[LHS_IMAG]], %[[ZERO]] : f32 +// CHECK: %[[RHS_IMAG_ABS_IS_ZERO:.*]] = arith.cmpf oeq(%[[RHS_IMAG_ABS]], %[[ZERO]]) : f32 +// CHECK: %[[LHS_REAL_IS_NOT_NAN:.*]] = arith.cmpf ord(%[[LHS_REAL]], %[[ZERO]]) : f32 +// CHECK: %[[LHS_IMAG_IS_NOT_NAN:.*]] = arith.cmpf ord(%[[LHS_IMAG]], %[[ZERO]]) : f32 // CHECK: %[[LHS_CONTAINS_NOT_NAN_VALUE:.*]] = arith.ori %[[LHS_REAL_IS_NOT_NAN]], %[[LHS_IMAG_IS_NOT_NAN]] : i1 // CHECK: %[[RHS_IS_ZERO:.*]] = arith.andi %[[RHS_REAL_ABS_IS_ZERO]], %[[RHS_IMAG_ABS_IS_ZERO]] : i1 // CHECK: %[[RESULT_IS_INFINITY:.*]] = arith.andi %[[LHS_CONTAINS_NOT_NAN_VALUE]], %[[RHS_IS_ZERO]] : i1 @@ -576,13 +576,13 @@ // CHECK: %[[INFINITY_RESULT_IMAG:.*]] = arith.mulf %[[INF_WITH_SIGN_OF_RHS_REAL]], %[[LHS_IMAG]] : f32 // Case 2. Infinite numerator, finite denominator. -// CHECK: %[[RHS_REAL_FINITE:.*]] = arith.cmpf one, %[[RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[RHS_IMAG_FINITE:.*]] = arith.cmpf one, %[[RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[RHS_REAL_FINITE:.*]] = arith.cmpf one(%[[RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[RHS_IMAG_FINITE:.*]] = arith.cmpf one(%[[RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[RHS_IS_FINITE:.*]] = arith.andi %[[RHS_REAL_FINITE]], %[[RHS_IMAG_FINITE]] : i1 // CHECK: %[[LHS_REAL_ABS:.*]] = math.absf %[[LHS_REAL]] : f32 -// CHECK: %[[LHS_REAL_INFINITE:.*]] = arith.cmpf oeq, %[[LHS_REAL_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_INFINITE:.*]] = arith.cmpf oeq(%[[LHS_REAL_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IMAG_ABS:.*]] = math.absf %[[LHS_IMAG]] : f32 -// CHECK: %[[LHS_IMAG_INFINITE:.*]] = arith.cmpf oeq, %[[LHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_IMAG_INFINITE:.*]] = arith.cmpf oeq(%[[LHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IS_INFINITE:.*]] = arith.ori %[[LHS_REAL_INFINITE]], %[[LHS_IMAG_INFINITE]] : i1 // CHECK: %[[INF_NUM_FINITE_DENOM:.*]] = arith.andi %[[LHS_IS_INFINITE]], %[[RHS_IS_FINITE]] : i1 // CHECK: %[[ONE:.*]] = arith.constant 1.000000e+00 : f32 @@ -600,11 +600,11 @@ // CHECK: %[[RESULT_IMAG_3:.*]] = arith.mulf %[[INF]], %[[INF_MULTIPLICATOR_2]] : f32 // Case 3. Finite numerator, infinite denominator. -// CHECK: %[[LHS_REAL_FINITE:.*]] = arith.cmpf one, %[[LHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[LHS_IMAG_FINITE:.*]] = arith.cmpf one, %[[LHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[LHS_REAL_FINITE:.*]] = arith.cmpf one(%[[LHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[LHS_IMAG_FINITE:.*]] = arith.cmpf one(%[[LHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[LHS_IS_FINITE:.*]] = arith.andi %[[LHS_REAL_FINITE]], %[[LHS_IMAG_FINITE]] : i1 -// CHECK: %[[RHS_REAL_INFINITE:.*]] = arith.cmpf oeq, %[[RHS_REAL_ABS]], %[[INF]] : f32 -// CHECK: %[[RHS_IMAG_INFINITE:.*]] = arith.cmpf oeq, %[[RHS_IMAG_ABS]], %[[INF]] : f32 +// CHECK: %[[RHS_REAL_INFINITE:.*]] = arith.cmpf oeq(%[[RHS_REAL_ABS]], %[[INF]]) : f32 +// CHECK: %[[RHS_IMAG_INFINITE:.*]] = arith.cmpf oeq(%[[RHS_IMAG_ABS]], %[[INF]]) : f32 // CHECK: %[[RHS_IS_INFINITE:.*]] = arith.ori %[[RHS_REAL_INFINITE]], %[[RHS_IMAG_INFINITE]] : i1 // CHECK: %[[FINITE_NUM_INFINITE_DENOM:.*]] = arith.andi %[[LHS_IS_FINITE]], %[[RHS_IS_INFINITE]] : i1 // CHECK: %[[RHS_REAL_IS_INF:.*]] = arith.select %[[RHS_REAL_INFINITE]], %[[ONE]], %[[ZERO]] : f32 @@ -620,7 +620,7 @@ // 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 // CHECK: %[[RESULT_IMAG_4:.*]] = arith.mulf %[[ZERO]], %[[ZERO_MULTIPLICATOR_2]] : f32 -// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt, %[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]] : f32 +// CHECK: %[[REAL_ABS_SMALLER_THAN_IMAG_ABS:.*]] = arith.cmpf olt(%[[RHS_REAL_ABS]], %[[RHS_IMAG_ABS]]) : f32 // CHECK: %[[RESULT_REAL:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_REAL_1]], %[[RESULT_REAL_2]] : f32 // CHECK: %[[RESULT_IMAG:.*]] = arith.select %[[REAL_ABS_SMALLER_THAN_IMAG_ABS]], %[[RESULT_IMAG_1]], %[[RESULT_IMAG_2]] : f32 // CHECK: %[[RESULT_REAL_SPECIAL_CASE_3:.*]] = arith.select %[[FINITE_NUM_INFINITE_DENOM]], %[[RESULT_REAL_4]], %[[RESULT_REAL]] : f32 @@ -629,8 +629,8 @@ // CHECK: %[[RESULT_IMAG_SPECIAL_CASE_2:.*]] = arith.select %[[INF_NUM_FINITE_DENOM]], %[[RESULT_IMAG_3]], %[[RESULT_IMAG_SPECIAL_CASE_3]] : f32 // CHECK: %[[RESULT_REAL_SPECIAL_CASE_1:.*]] = arith.select %[[RESULT_IS_INFINITY]], %[[INFINITY_RESULT_REAL]], %[[RESULT_REAL_SPECIAL_CASE_2]] : f32 // CHECK: %[[RESULT_IMAG_SPECIAL_CASE_1:.*]] = arith.select %[[RESULT_IS_INFINITY]], %[[INFINITY_RESULT_IMAG]], %[[RESULT_IMAG_SPECIAL_CASE_2]] : f32 -// CHECK: %[[RESULT_REAL_IS_NAN:.*]] = arith.cmpf uno, %[[RESULT_REAL]], %[[ZERO]] : f32 -// CHECK: %[[RESULT_IMAG_IS_NAN:.*]] = arith.cmpf uno, %[[RESULT_IMAG]], %[[ZERO]] : f32 +// CHECK: %[[RESULT_REAL_IS_NAN:.*]] = arith.cmpf uno(%[[RESULT_REAL]], %[[ZERO]]) : f32 +// CHECK: %[[RESULT_IMAG_IS_NAN:.*]] = arith.cmpf uno(%[[RESULT_IMAG]], %[[ZERO]]) : f32 // CHECK: %[[RESULT_IS_NAN:.*]] = arith.andi %[[RESULT_REAL_IS_NAN]], %[[RESULT_IMAG_IS_NAN]] : i1 // CHECK: %[[RESULT_REAL_WITH_SPECIAL_CASES:.*]] = arith.select %[[RESULT_IS_NAN]], %[[RESULT_REAL_SPECIAL_CASE_1]], %[[RESULT_REAL]] : f32 // CHECK: %[[RESULT_IMAG_WITH_SPECIAL_CASES:.*]] = arith.select %[[RESULT_IS_NAN]], %[[RESULT_IMAG_SPECIAL_CASE_1]], %[[RESULT_IMAG]] : f32 diff --git a/mlir/test/Conversion/ControlFlowToSPIRV/cf-ops-to-spirv.mlir b/mlir/test/Conversion/ControlFlowToSPIRV/cf-ops-to-spirv.mlir --- a/mlir/test/Conversion/ControlFlowToSPIRV/cf-ops-to-spirv.mlir +++ b/mlir/test/Conversion/ControlFlowToSPIRV/cf-ops-to-spirv.mlir @@ -21,7 +21,7 @@ // CHECK: ^bb2({{.*}}: i32): // 2 preds: ^bb1, ^bb3 // CHECK: spv.BranchConditional {{.*}}, ^bb3, ^bb4 ^bb2(%0: i32): // 2 preds: ^bb1, ^bb3 - %1 = arith.cmpi slt, %0, %end : i32 + %1 = arith.cmpi slt(%0, %end) : i32 cf.cond_br %1, ^bb3, ^bb4 // CHECK: ^bb3: // pred: ^bb2 diff --git a/mlir/test/Conversion/FuncToLLVM/func-memref.mlir b/mlir/test/Conversion/FuncToLLVM/func-memref.mlir --- a/mlir/test/Conversion/FuncToLLVM/func-memref.mlir +++ b/mlir/test/Conversion/FuncToLLVM/func-memref.mlir @@ -115,7 +115,7 @@ // BAREPTR-NEXT: llvm.icmp // BAREPTR-NEXT: llvm.cond_br %{{.*}}, ^bb2, ^bb3 ^bb1(%0: index, %1: memref<64xi32, 201>, %2: memref<64xi32, 201>): // 2 preds: ^bb0, ^bb2 - %3 = arith.cmpi slt, %0, %arg1 : index + %3 = arith.cmpi slt(%0, %arg1) : index cf.cond_br %3, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %4 = arith.addi %0, %arg2 : index diff --git a/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir b/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir --- a/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir +++ b/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir @@ -40,7 +40,7 @@ // CHECK32-NEXT: {{.*}} = llvm.icmp "slt" {{.*}}, {{.*}} : i32 // CHECK32-NEXT: llvm.cond_br {{.*}}, ^bb3, ^bb4 ^bb2(%0: index): // 2 preds: ^bb1, ^bb3 - %1 = arith.cmpi slt, %0, %c42 : index + %1 = arith.cmpi slt(%0, %c42) : index cf.cond_br %1, ^bb3, ^bb4 // CHECK: ^bb3: // pred: ^bb2 @@ -133,7 +133,7 @@ // CHECK32-NEXT: {{.*}} = llvm.icmp "slt" {{.*}}, {{.*}} : i32 // CHECK32-NEXT: llvm.cond_br {{.*}}, ^bb3, ^bb4 ^bb2(%0: index): // 2 preds: ^bb1, ^bb3 - %1 = arith.cmpi slt, %0, %c42 : index + %1 = arith.cmpi slt(%0, %c42) : index cf.cond_br %1, ^bb3, ^bb4 // CHECK-NEXT: ^bb3: // pred: ^bb2 @@ -206,7 +206,7 @@ // CHECK-NEXT: {{.*}} = llvm.icmp "slt" {{.*}}, {{.*}} : i64 // CHECK-NEXT: llvm.cond_br {{.*}}, ^bb3, ^bb8 ^bb2(%0: index): // 2 preds: ^bb1, ^bb7 - %1 = arith.cmpi slt, %0, %c42 : index + %1 = arith.cmpi slt(%0, %c42) : index cf.cond_br %1, ^bb3, ^bb8 // CHECK-NEXT: ^bb3: @@ -229,7 +229,7 @@ // CHECK-NEXT: {{.*}} = llvm.icmp "slt" {{.*}}, {{.*}} : i64 // CHECK-NEXT: llvm.cond_br {{.*}}, ^bb6, ^bb7 ^bb5(%2: index): // 2 preds: ^bb4, ^bb6 - %3 = arith.cmpi slt, %2, %c56 : index + %3 = arith.cmpi slt(%2, %c56) : index cf.cond_br %3, ^bb6, ^bb7 // CHECK-NEXT: ^bb6: // pred: ^bb5 @@ -322,7 +322,7 @@ %c42 = arith.constant 42 : index cf.br ^bb2(%c0 : index) ^bb2(%0: index): // 2 preds: ^bb1, ^bb11 - %1 = arith.cmpi slt, %0, %c42 : index + %1 = arith.cmpi slt(%0, %c42) : index cf.cond_br %1, ^bb3, ^bb12 ^bb3: // pred: ^bb2 call @pre(%0) : (index) -> () @@ -332,7 +332,7 @@ %c56 = arith.constant 56 : index cf.br ^bb5(%c7 : index) ^bb5(%2: index): // 2 preds: ^bb4, ^bb6 - %3 = arith.cmpi slt, %2, %c56 : index + %3 = arith.cmpi slt(%2, %c56) : index cf.cond_br %3, ^bb6, ^bb7 ^bb6: // pred: ^bb5 call @body2(%0, %2) : (index, index) -> () @@ -347,7 +347,7 @@ %c37 = arith.constant 37 : index cf.br ^bb9(%c18 : index) ^bb9(%5: index): // 2 preds: ^bb8, ^bb10 - %6 = arith.cmpi slt, %5, %c37 : index + %6 = arith.cmpi slt(%5, %c37) : index cf.cond_br %6, ^bb10, ^bb11 ^bb10: // pred: ^bb9 call @body3(%0, %5) : (index, index) -> () diff --git a/mlir/test/Conversion/GPUToNVVM/wmma-ops-to-nvvm.mlir b/mlir/test/Conversion/GPUToNVVM/wmma-ops-to-nvvm.mlir --- a/mlir/test/Conversion/GPUToNVVM/wmma-ops-to-nvvm.mlir +++ b/mlir/test/Conversion/GPUToNVVM/wmma-ops-to-nvvm.mlir @@ -170,7 +170,7 @@ %0 = gpu.subgroup_mma_load_matrix %arg2[%c0, %c0] {leadDimension = 128 : index} : memref<128x128xf16> -> !gpu.mma_matrix<16x16xf16, "COp"> cf.br ^bb1(%c0, %0 : index, !gpu.mma_matrix<16x16xf16, "COp">) ^bb1(%1: index, %2: !gpu.mma_matrix<16x16xf16, "COp">): // 2 preds: ^bb0, ^bb2 - %3 = arith.cmpi slt, %1, %c128 : index + %3 = arith.cmpi slt(%1, %c128) : index cf.cond_br %3, ^bb2, ^bb3 ^bb2: // pred: ^bb1 %4 = gpu.subgroup_mma_load_matrix %arg0[%c0, %1] {leadDimension = 128 : index} : memref<128x128xf16> -> !gpu.mma_matrix<16x16xf16, "AOp"> diff --git a/mlir/test/Conversion/MathToFuncs/math-to-funcs.mlir b/mlir/test/Conversion/MathToFuncs/math-to-funcs.mlir --- a/mlir/test/Conversion/MathToFuncs/math-to-funcs.mlir +++ b/mlir/test/Conversion/MathToFuncs/math-to-funcs.mlir @@ -18,30 +18,30 @@ // CHECK: %[[VAL_2:.*]] = arith.constant 0 : i64 // CHECK: %[[VAL_3:.*]] = arith.constant 1 : i64 // CHECK: %[[VAL_4:.*]] = arith.constant -1 : i64 -// CHECK: %[[VAL_5:.*]] = arith.cmpi eq, %[[VAL_1]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_5:.*]] = arith.cmpi eq(%[[VAL_1]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_5]], ^bb1, ^bb2 // CHECK: ^bb1: // CHECK: return %[[VAL_3]] : i64 // CHECK: ^bb2: -// CHECK: %[[VAL_6:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_6:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_6]], ^bb3, ^bb12(%[[VAL_3]], %[[VAL_0]], %[[VAL_1]] : i64, i64, i64) // CHECK: ^bb3: -// CHECK: %[[VAL_7:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_7:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_7]], ^bb4, ^bb5 // CHECK: ^bb4: // CHECK: %[[VAL_8:.*]] = arith.divsi %[[VAL_3]], %[[VAL_2]] : i64 // CHECK: return %[[VAL_8]] : i64 // CHECK: ^bb5: -// CHECK: %[[VAL_9:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_3]] : i64 +// CHECK: %[[VAL_9:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_3]]) : i64 // CHECK: cf.cond_br %[[VAL_9]], ^bb6, ^bb7 // CHECK: ^bb6: // CHECK: return %[[VAL_3]] : i64 // CHECK: ^bb7: -// CHECK: %[[VAL_10:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_4]] : i64 +// CHECK: %[[VAL_10:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_4]]) : i64 // CHECK: cf.cond_br %[[VAL_10]], ^bb8, ^bb11 // CHECK: ^bb8: // CHECK: %[[VAL_11:.*]] = arith.andi %[[VAL_1]], %[[VAL_3]] : i64 -// CHECK: %[[VAL_12:.*]] = arith.cmpi ne, %[[VAL_11]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_12:.*]] = arith.cmpi ne(%[[VAL_11]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_12]], ^bb9, ^bb10 // CHECK: ^bb9: // CHECK: return %[[VAL_4]] : i64 @@ -51,14 +51,14 @@ // CHECK: return %[[VAL_2]] : i64 // CHECK: ^bb12(%[[VAL_13:.*]]: i64, %[[VAL_14:.*]]: i64, %[[VAL_15:.*]]: i64): // CHECK: %[[VAL_16:.*]] = arith.andi %[[VAL_15]], %[[VAL_3]] : i64 -// CHECK: %[[VAL_17:.*]] = arith.cmpi ne, %[[VAL_16]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_17:.*]] = arith.cmpi ne(%[[VAL_16]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_17]], ^bb13, ^bb14(%[[VAL_13]] : i64) // CHECK: ^bb13: // CHECK: %[[VAL_18:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i64 // CHECK: cf.br ^bb14(%[[VAL_18]] : i64) // CHECK: ^bb14(%[[VAL_19:.*]]: i64): // CHECK: %[[VAL_20:.*]] = arith.shrui %[[VAL_15]], %[[VAL_3]] : i64 -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_2]] : i64 +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_2]]) : i64 // CHECK: cf.cond_br %[[VAL_21]], ^bb15, ^bb16 // CHECK: ^bb15: // CHECK: return %[[VAL_19]] : i64 @@ -85,30 +85,30 @@ // CHECK: %[[VAL_2:.*]] = arith.constant 0 : i8 // CHECK: %[[VAL_3:.*]] = arith.constant 1 : i8 // CHECK: %[[VAL_4:.*]] = arith.constant -1 : i8 -// CHECK: %[[VAL_5:.*]] = arith.cmpi eq, %[[VAL_1]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_5:.*]] = arith.cmpi eq(%[[VAL_1]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_5]], ^bb1, ^bb2 // CHECK: ^bb1: // CHECK: return %[[VAL_3]] : i8 // CHECK: ^bb2: -// CHECK: %[[VAL_6:.*]] = arith.cmpi sle, %[[VAL_1]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_6:.*]] = arith.cmpi sle(%[[VAL_1]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_6]], ^bb3, ^bb12(%[[VAL_3]], %[[VAL_0]], %[[VAL_1]] : i8, i8, i8) // CHECK: ^bb3: -// CHECK: %[[VAL_7:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_7:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_7]], ^bb4, ^bb5 // CHECK: ^bb4: // CHECK: %[[VAL_8:.*]] = arith.divsi %[[VAL_3]], %[[VAL_2]] : i8 // CHECK: return %[[VAL_8]] : i8 // CHECK: ^bb5: -// CHECK: %[[VAL_9:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_3]] : i8 +// CHECK: %[[VAL_9:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_3]]) : i8 // CHECK: cf.cond_br %[[VAL_9]], ^bb6, ^bb7 // CHECK: ^bb6: // CHECK: return %[[VAL_3]] : i8 // CHECK: ^bb7: -// CHECK: %[[VAL_10:.*]] = arith.cmpi eq, %[[VAL_0]], %[[VAL_4]] : i8 +// CHECK: %[[VAL_10:.*]] = arith.cmpi eq(%[[VAL_0]], %[[VAL_4]]) : i8 // CHECK: cf.cond_br %[[VAL_10]], ^bb8, ^bb11 // CHECK: ^bb8: // CHECK: %[[VAL_11:.*]] = arith.andi %[[VAL_1]], %[[VAL_3]] : i8 -// CHECK: %[[VAL_12:.*]] = arith.cmpi ne, %[[VAL_11]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_12:.*]] = arith.cmpi ne(%[[VAL_11]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_12]], ^bb9, ^bb10 // CHECK: ^bb9: // CHECK: return %[[VAL_4]] : i8 @@ -118,14 +118,14 @@ // CHECK: return %[[VAL_2]] : i8 // CHECK: ^bb12(%[[VAL_13:.*]]: i8, %[[VAL_14:.*]]: i8, %[[VAL_15:.*]]: i8): // CHECK: %[[VAL_16:.*]] = arith.andi %[[VAL_15]], %[[VAL_3]] : i8 -// CHECK: %[[VAL_17:.*]] = arith.cmpi ne, %[[VAL_16]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_17:.*]] = arith.cmpi ne(%[[VAL_16]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_17]], ^bb13, ^bb14(%[[VAL_13]] : i8) // CHECK: ^bb13: // CHECK: %[[VAL_18:.*]] = arith.muli %[[VAL_13]], %[[VAL_14]] : i8 // CHECK: cf.br ^bb14(%[[VAL_18]] : i8) // CHECK: ^bb14(%[[VAL_19:.*]]: i8): // CHECK: %[[VAL_20:.*]] = arith.shrui %[[VAL_15]], %[[VAL_3]] : i8 -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_2]] : i8 +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_2]]) : i8 // CHECK: cf.cond_br %[[VAL_21]], ^bb15, ^bb16 // CHECK: ^bb15: // CHECK: return %[[VAL_19]] : i8 diff --git a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir --- a/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir +++ b/mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir @@ -46,7 +46,7 @@ // CHECK-NEXT: ^[[BB1]](%[[ARG1:[0-9]+]]: i64, %[[ARG2:[0-9]+]]: i64):{{.*}} ^bb1(%0: index, %1: index): // CHECK-NEXT: %[[CMP:[0-9]+]] = llvm.icmp "slt" %[[ARG1]], %[[ARG2]] : i64 - %2 = arith.cmpi slt, %0, %1 : index + %2 = arith.cmpi slt(%0, %1) : index // CHECK-NEXT: llvm.cond_br %[[CMP]], ^[[BB2:.*]](%{{[0-9]+}}, %{{[0-9]+}} : i64, i64), ^[[BB3:.*]] cf.cond_br %2, ^bb2(%end, %end : index, index), ^bb3 // CHECK-NEXT: ^[[BB2]](%[[ARG3:[0-9]+]]: i64, %[[ARG4:[0-9]+]]: i64): @@ -135,7 +135,7 @@ omp.simdloop for (%arg0) : i32 = (%val) to (%ub) inclusive step (%val) { cf.br ^bb1(%i : index) ^bb1(%0: index): - %1 = arith.cmpi slt, %0, %i : index + %1 = arith.cmpi slt(%0, %i) : index cf.cond_br %1, ^bb2, ^bb3 ^bb2: %2 = arith.addi %0, %i : index diff --git a/mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir b/mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir --- a/mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir +++ b/mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir @@ -3,7 +3,7 @@ // CHECK-LABEL: func @simple_std_for_loop(%{{.*}}: index, %{{.*}}: index, %{{.*}}: index) { // CHECK-NEXT: cf.br ^bb1(%{{.*}} : index) // CHECK-NEXT: ^bb1(%{{.*}}: index): // 2 preds: ^bb0, ^bb2 -// CHECK-NEXT: %{{.*}} = arith.cmpi slt, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %{{.*}} = arith.cmpi slt(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: cf.cond_br %{{.*}}, ^bb2, ^bb3 // CHECK-NEXT: ^bb2: // pred: ^bb1 // CHECK-NEXT: %{{.*}} = arith.constant 1 : index @@ -21,13 +21,13 @@ // CHECK-LABEL: func @simple_std_2_for_loops(%{{.*}}: index, %{{.*}}: index, %{{.*}}: index) { // CHECK-NEXT: cf.br ^bb1(%{{.*}} : index) // CHECK-NEXT: ^bb1(%[[ub0:.*]]: index): // 2 preds: ^bb0, ^bb5 -// CHECK-NEXT: %[[cond0:.*]] = arith.cmpi slt, %[[ub0]], %{{.*}} : index +// CHECK-NEXT: %[[cond0:.*]] = arith.cmpi slt(%[[ub0]], %{{.*}}) : index // CHECK-NEXT: cf.cond_br %[[cond0]], ^bb2, ^bb6 // CHECK-NEXT: ^bb2: // pred: ^bb1 // CHECK-NEXT: %{{.*}} = arith.constant 1 : index // CHECK-NEXT: cf.br ^bb3(%{{.*}} : index) // CHECK-NEXT: ^bb3(%[[ub1:.*]]: index): // 2 preds: ^bb2, ^bb4 -// CHECK-NEXT: %[[cond1:.*]] = arith.cmpi slt, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %[[cond1:.*]] = arith.cmpi slt(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: cf.cond_br %[[cond1]], ^bb4, ^bb5 // CHECK-NEXT: ^bb4: // pred: ^bb3 // CHECK-NEXT: %{{.*}} = arith.constant 1 : index @@ -111,7 +111,7 @@ // CHECK-LABEL: func @simple_std_for_loop_with_2_ifs(%{{.*}}: index, %{{.*}}: index, %{{.*}}: index, %{{.*}}: i1) { // CHECK-NEXT: cf.br ^bb1(%{{.*}} : index) // CHECK-NEXT: ^bb1(%{{.*}}: index): // 2 preds: ^bb0, ^bb7 -// CHECK-NEXT: %{{.*}} = arith.cmpi slt, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %{{.*}} = arith.cmpi slt(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: cf.cond_br %{{.*}}, ^bb2, ^bb8 // CHECK-NEXT: ^bb2: // pred: ^bb1 // CHECK-NEXT: %{{.*}} = arith.constant 1 : index @@ -230,12 +230,12 @@ // CHECK: [[VAL_5:%.*]] = arith.constant 1 : index // CHECK: cf.br ^bb1([[VAL_0]] : index) // CHECK: ^bb1([[VAL_6:%.*]]: index): -// CHECK: [[VAL_7:%.*]] = arith.cmpi slt, [[VAL_6]], [[VAL_2]] : index +// CHECK: [[VAL_7:%.*]] = arith.cmpi slt([[VAL_6]], [[VAL_2]]) : index // CHECK: cf.cond_br [[VAL_7]], ^bb2, ^bb6 // CHECK: ^bb2: // CHECK: cf.br ^bb3([[VAL_1]] : index) // CHECK: ^bb3([[VAL_8:%.*]]: index): -// CHECK: [[VAL_9:%.*]] = arith.cmpi slt, [[VAL_8]], [[VAL_3]] : index +// CHECK: [[VAL_9:%.*]] = arith.cmpi slt([[VAL_8]], [[VAL_3]]) : index // CHECK: cf.cond_br [[VAL_9]], ^bb4, ^bb5 // CHECK: ^bb4: // CHECK: [[VAL_10:%.*]] = arith.constant 1 : index @@ -265,7 +265,7 @@ // CHECK: cf.br ^[[COND:.*]](%[[LB]], %[[INIT0]], %[[INIT1]] : index, f32, f32) // // CHECK: ^[[COND]](%[[ITER:.*]]: index, %[[ITER_ARG0:.*]]: f32, %[[ITER_ARG1:.*]]: f32): -// CHECK: %[[CMP:.*]] = arith.cmpi slt, %[[ITER]], %[[UB]] : index +// CHECK: %[[CMP:.*]] = arith.cmpi slt(%[[ITER]], %[[UB]]) : index // CHECK: cf.cond_br %[[CMP]], ^[[BODY:.*]], ^[[CONTINUE:.*]] // // CHECK: ^[[BODY]]: @@ -330,7 +330,7 @@ // Condition branch takes as arguments the current value of the iteration // variable and the current partially reduced value. // CHECK: ^[[COND]](%[[ITER:.*]]: index, %[[ITER_ARG:.*]]: f32 - // CHECK: %[[COMP:.*]] = arith.cmpi slt, %[[ITER]], %[[UB]] + // CHECK: %[[COMP:.*]] = arith.cmpi slt(%[[ITER]], %[[UB]]) // CHECK: cf.cond_br %[[COMP]], ^[[BODY:.*]], ^[[CONTINUE:.*]] // Bodies of scf.reduce operations are folded into the main loop body. The @@ -473,7 +473,7 @@ scf.condition(%0) %2, %3 : i64, f64 } do { // CHECK: ^[[AFTER]](%[[ARG4:.*]]: i64, %[[ARG5:.*]]: f64): - ^bb0(%arg2: i64, %arg3: f64): + ^bb0(%arg2: i64, %arg3: f64): // CHECK: cf.br ^[[BEFORE]](%{{.*}}, %{{.*}} : i32, f32) scf.yield %c0_i32, %cst : i32, f32 } @@ -551,7 +551,7 @@ func.func @ifs_in_parallel(%arg1: index, %arg2: index, %arg3: index, %arg4: i1, %arg5: i1) { // CHECK: cf.br ^[[LOOP_LATCH:.*]](%[[ARG0]] : index) // CHECK: ^[[LOOP_LATCH]](%[[LOOP_IV:.*]]: index): - // CHECK: %[[LOOP_COND:.*]] = arith.cmpi slt, %[[LOOP_IV]], %[[ARG1]] : index + // CHECK: %[[LOOP_COND:.*]] = arith.cmpi slt(%[[LOOP_IV]], %[[ARG1]]) : index // CHECK: cf.cond_br %[[LOOP_COND]], ^[[LOOP_BODY:.*]], ^[[LOOP_CONT:.*]] // CHECK: ^[[LOOP_BODY]]: // CHECK: cf.cond_br %[[ARG3]], ^[[IF1_THEN:.*]], ^[[IF1_CONT:.*]] diff --git a/mlir/test/Conversion/SCFToGPU/parallel_loop.mlir b/mlir/test/Conversion/SCFToGPU/parallel_loop.mlir --- a/mlir/test/Conversion/SCFToGPU/parallel_loop.mlir +++ b/mlir/test/Conversion/SCFToGPU/parallel_loop.mlir @@ -285,10 +285,10 @@ // CHECK: [[VAL_43:%.*]] = affine.min #[[$MAP4]]([[VAL_29]]){{\[}}[[VAL_42]]] // CHECK: [[VAL_44:%.*]] = memref.subview [[VAL_2]]{{\[}}[[VAL_28]], [[VAL_29]]] {{\[}}[[VAL_41]], [[VAL_43]]] {{\[}}%[[C1]], %[[C1]]] : memref to memref // CHECK: [[VAL_45:%.*]] = affine.apply #[[$MAP2]]([[VAL_22]]){{\[}}%[[C1]], %[[C0]]] -// CHECK: [[VAL_46:%.*]] = arith.cmpi slt, [[VAL_45]], [[VAL_31_SQUARED]] : index +// CHECK: [[VAL_46:%.*]] = arith.cmpi slt([[VAL_45]], [[VAL_31_SQUARED]]) : index // CHECK: scf.if [[VAL_46]] { // CHECK: [[VAL_47:%.*]] = affine.apply #[[$MAP2]]([[VAL_23]]){{\[}}%[[C1]], %[[C0]]] -// CHECK: [[VAL_48:%.*]] = arith.cmpi slt, [[VAL_47]], [[VAL_33]] : index +// CHECK: [[VAL_48:%.*]] = arith.cmpi slt([[VAL_47]], [[VAL_33]]) : index // CHECK: scf.if [[VAL_48]] { // CHECK: [[VAL_49:%.*]] = memref.load [[VAL_34]]{{\[}}[[VAL_45]], [[VAL_47]]] : memref // CHECK: [[VAL_50:%.*]] = memref.load [[VAL_39]]{{\[}}[[VAL_45]], [[VAL_47]]] : memref diff --git a/mlir/test/Conversion/SCFToOpenMP/reductions.mlir b/mlir/test/Conversion/SCFToOpenMP/reductions.mlir --- a/mlir/test/Conversion/SCFToOpenMP/reductions.mlir +++ b/mlir/test/Conversion/SCFToOpenMP/reductions.mlir @@ -90,7 +90,7 @@ // CHECK: combiner // CHECK: ^{{.*}}(%[[ARG0:.*]]: f32, %[[ARG1:.*]]: f32) -// CHECK: %[[CMP:.*]] = arith.cmpf oge, %[[ARG0]], %[[ARG1]] +// CHECK: %[[CMP:.*]] = arith.cmpf oge(%[[ARG0]], %[[ARG1]]) // CHECK: %[[RES:.*]] = arith.select %[[CMP]], %[[ARG0]], %[[ARG1]] // CHECK: omp.yield(%[[RES]] : f32) @@ -106,7 +106,7 @@ %one = arith.constant 1.0 : f32 scf.reduce(%one) : f32 { ^bb0(%lhs : f32, %rhs: f32): - %cmp = arith.cmpf oge, %lhs, %rhs : f32 + %cmp = arith.cmpf oge(%lhs, %rhs) : f32 %res = arith.select %cmp, %lhs, %rhs : f32 scf.reduce.return %res : f32 } @@ -124,7 +124,7 @@ // CHECK: combiner // CHECK: ^{{.*}}(%[[ARG0:.*]]: f32, %[[ARG1:.*]]: f32) -// CHECK: %[[CMP:.*]] = arith.cmpf oge, %[[ARG0]], %[[ARG1]] +// CHECK: %[[CMP:.*]] = arith.cmpf oge(%[[ARG0]], %[[ARG1]]) // CHECK: %[[RES:.*]] = arith.select %[[CMP]], %[[ARG0]], %[[ARG1]] // CHECK: omp.yield(%[[RES]] : f32) @@ -138,7 +138,7 @@ // CHECK: combiner // CHECK: ^{{.*}}(%[[ARG0:.*]]: i64, %[[ARG1:.*]]: i64) -// CHECK: %[[CMP:.*]] = arith.cmpi slt, %[[ARG0]], %[[ARG1]] +// CHECK: %[[CMP:.*]] = arith.cmpi slt(%[[ARG0]], %[[ARG1]]) // CHECK: %[[RES:.*]] = arith.select %[[CMP]], %[[ARG1]], %[[ARG0]] // CHECK: omp.yield(%[[RES]] : i64) @@ -171,7 +171,7 @@ // CHECK: omp.reduction %{{.*}}, %[[BUF1]] scf.reduce(%one) : f32 { ^bb0(%lhs : f32, %rhs: f32): - %cmp = arith.cmpf oge, %lhs, %rhs : f32 + %cmp = arith.cmpf oge(%lhs, %rhs) : f32 %res = arith.select %cmp, %lhs, %rhs : f32 scf.reduce.return %res : f32 } @@ -180,7 +180,7 @@ // CHECK: omp.reduction %{{.*}}, %[[BUF2]] scf.reduce(%1) : i64 { ^bb1(%lhs: i64, %rhs: i64): - %cmp = arith.cmpi slt, %lhs, %rhs : i64 + %cmp = arith.cmpi slt(%lhs, %rhs) : i64 %res = arith.select %cmp, %rhs, %lhs : i64 scf.reduce.return %res : i64 } diff --git a/mlir/test/Conversion/SCFToSPIRV/while.mlir b/mlir/test/Conversion/SCFToSPIRV/while.mlir --- a/mlir/test/Conversion/SCFToSPIRV/while.mlir +++ b/mlir/test/Conversion/SCFToSPIRV/while.mlir @@ -24,7 +24,7 @@ // CHECK: } %c2_i32 = arith.constant 2 : i32 %0 = scf.while (%arg3 = %arg0) : (i32) -> (i32) { - %1 = arith.cmpi slt, %arg3, %arg1 : i32 + %1 = arith.cmpi slt(%arg3, %arg1) : i32 scf.condition(%1) %arg3 : i32 } do { ^bb0(%arg5: i32): diff --git a/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir b/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir --- a/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir +++ b/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir @@ -284,14 +284,14 @@ // CHECK: %[[C0:.*]] = arith.constant 0 : index // CHECK: %[[RANK_A:.*]] = tensor.dim %[[A]], %[[C0]] : tensor // CHECK: %[[RANK_B:.*]] = tensor.dim %[[B]], %[[C0]] : tensor - // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq, %[[RANK_A]], %[[RANK_B]] + // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq(%[[RANK_A]], %[[RANK_B]]) // CHECK: %[[SHAPE_EQ:.*]] = scf.if %[[RANK_EQ]] -> (i1) { // CHECK: %[[C1:.*]] = arith.constant 1 : index // CHECK: %[[INIT:.*]] = arith.constant true // CHECK: %[[SHAPE_EQ_INNER:.*]] = scf.for %[[I:.*]] = %[[C0]] to %[[RANK_A]] step %[[C1]] iter_args(%[[CONJ:.*]] = %[[INIT]]) -> (i1) { // CHECK: %[[EXTENT_A:.*]] = tensor.extract %[[A]][%[[I]]] : tensor // CHECK: %[[EXTENT_B:.*]] = tensor.extract %[[B]][%[[I]]] : tensor - // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq, %[[EXTENT_A]], %[[EXTENT_B]] + // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq(%[[EXTENT_A]], %[[EXTENT_B]]) // CHECK: %[[CONJ_NEXT:.*]] = arith.andi %[[CONJ]], %[[EXTENT_EQ]] // CHECK: scf.yield %[[CONJ_NEXT]] : i1 // CHECK: } @@ -313,14 +313,14 @@ // CHECK: %[[C0:.*]] = arith.constant 0 : index // CHECK: %[[RANK_A:.*]] = tensor.dim %[[A]], %[[C0]] : tensor // CHECK: %[[RANK_B:.*]] = tensor.dim %[[B]], %[[C0]] : tensor - // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq, %[[RANK_A]], %[[RANK_B]] + // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq(%[[RANK_A]], %[[RANK_B]]) // CHECK: %[[SHAPE_EQ:.*]] = scf.if %[[RANK_EQ]] -> (i1) { // CHECK: %[[C1:.*]] = arith.constant 1 : index // CHECK: %[[INIT:.*]] = arith.constant true // CHECK: %[[SHAPE_EQ_INNER:.*]] = scf.for %[[I:.*]] = %[[C0]] to %[[RANK_A]] step %[[C1]] iter_args(%[[CONJ:.*]] = %[[INIT]]) -> (i1) { // CHECK: %[[EXTENT_A:.*]] = tensor.extract %[[A]][%[[I]]] : tensor // CHECK: %[[EXTENT_B:.*]] = tensor.extract %[[B]][%[[I]]] : tensor - // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq, %[[EXTENT_A]], %[[EXTENT_B]] + // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq(%[[EXTENT_A]], %[[EXTENT_B]]) // CHECK: %[[CONJ_NEXT:.*]] = arith.andi %[[CONJ]], %[[EXTENT_EQ]] // CHECK: scf.yield %[[CONJ_NEXT]] : i1 // CHECK: } @@ -330,14 +330,14 @@ // CHECK: scf.yield %[[SHAPE_EQ_INNER]] : i1 // CHECK: } // CHECK: %[[RANK_C:.*]] = tensor.dim %[[C]], %[[C0]] : tensor - // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq, %[[RANK_A]], %[[RANK_C]] + // CHECK: %[[RANK_EQ:.*]] = arith.cmpi eq(%[[RANK_A]], %[[RANK_C]]) // CHECK: %[[SHAPE_EQ2:.*]] = scf.if %[[RANK_EQ]] -> (i1) { // CHECK: %[[C1:.*]] = arith.constant 1 : index // CHECK: %[[INIT:.*]] = arith.constant true // CHECK: %[[SHAPE_EQ_INNER:.*]] = scf.for %[[I:.*]] = %[[C0]] to %[[RANK_A]] step %[[C1]] iter_args(%[[CONJ:.*]] = %[[INIT]]) -> (i1) { // CHECK: %[[EXTENT_A:.*]] = tensor.extract %[[A]][%[[I]]] : tensor // CHECK: %[[EXTENT_C:.*]] = tensor.extract %[[C]][%[[I]]] : tensor - // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq, %[[EXTENT_A]], %[[EXTENT_C]] + // CHECK: %[[EXTENT_EQ:.*]] = arith.cmpi eq(%[[EXTENT_A]], %[[EXTENT_C]]) // CHECK: %[[CONJ_NEXT:.*]] = arith.andi %[[CONJ]], %[[EXTENT_EQ]] // CHECK: scf.yield %[[CONJ_NEXT]] : i1 // CHECK: } @@ -377,9 +377,9 @@ // CHECK: %[[RANK0:.*]] = tensor.dim %[[ARG0]], %[[C0]] : tensor<2xindex> // CHECK: %[[RANK1:.*]] = tensor.dim %[[ARG1]], %[[C0]] : tensor<3xindex> // CHECK: %[[RANK2:.*]] = tensor.dim %[[ARG2]], %[[C0]] : tensor<2xindex> -// CHECK: %[[CMP0:.*]] = arith.cmpi ugt, %[[RANK1]], %[[RANK0]] : index +// CHECK: %[[CMP0:.*]] = arith.cmpi ugt(%[[RANK1]], %[[RANK0]]) : index // CHECK: %[[LARGER_DIM:.*]] = arith.select %[[CMP0]], %[[RANK1]], %[[RANK0]] : index -// CHECK: %[[CMP1:.*]] = arith.cmpi ugt, %[[RANK2]], %[[LARGER_DIM]] : index +// CHECK: %[[CMP1:.*]] = arith.cmpi ugt(%[[RANK2]], %[[LARGER_DIM]]) : index // CHECK: %[[MAX_RANK:.*]] = arith.select %[[CMP1]], %[[RANK2]], %[[LARGER_DIM]] : index // CHECK: %[[DIM_DIFF0:.*]] = arith.subi %[[MAX_RANK]], %[[RANK0]] : index // CHECK: %[[DIM_DIFF1:.*]] = arith.subi %[[MAX_RANK]], %[[RANK1]] : index @@ -387,65 +387,65 @@ // CHECK: %[[TRUE:.*]] = arith.constant true // CHECK: %[[ALL_RESULT:.*]] = scf.for %[[IDX:.*]] = %[[C0]] to %[[MAX_RANK]] step %[[C1]] iter_args(%[[ALL_SO_FAR:.*]] = %[[TRUE]]) -> (i1) { // CHECK: %[[C1_0:.*]] = arith.constant 1 : index -// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF0]] : index +// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF0]]) : index // CHECK: %[[DIM0:.*]] = scf.if %[[OUTBOUNDS0]] -> (index) { // CHECK: scf.yield %[[C1_0]] : index // CHECK: } else { // CHECK: %[[IDX0:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF0]] : index // CHECK: %[[EXTRACTED_0:.*]] = tensor.extract %[[ARG0]]{{\[}}%[[IDX0]]] : tensor<2xindex> -// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_0:.*]], %[[C1_0]] : index +// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_0:.*]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM0:.*]] = arith.select %[[DIM0_IS_1]], %[[C1_0]], %[[EXTRACTED_0]] : index // CHECK: } -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF1]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF1]]) : index // CHECK: %[[DIM1:.*]] = scf.if %[[VAL_28]] -> (index) { // CHECK: scf.yield %[[DIM0]] : index // CHECK: } else { // CHECK: %[[IDX1:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF1]] : index // CHECK: %[[EXTRACTED_1:.*]] = tensor.extract %[[ARG1]]{{\[}}%[[IDX1]]] : tensor<3xindex> -// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_1:.*]], %[[C1_0]] : index +// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_1:.*]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM1:.*]] = arith.select %[[DIM1_IS_1]], %[[DIM0]], %[[EXTRACTED_1]] : index // CHECK: } -// CHECK: %[[VAL_36:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF2]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF2]]) : index // CHECK: %[[DIM2:.*]] = scf.if %[[VAL_36]] -> (index) { // CHECK: scf.yield %[[DIM1]] : index // CHECK: } else { // CHECK: %[[IDX2:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF2]] : index // CHECK: %[[EXTRACTED_2:.*]] = tensor.extract %[[ARG2]]{{\[}}%[[IDX2]]] : tensor<2xindex> -// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_2]], %[[C1_0]] : index +// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_2]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM2:.*]] = arith.select %[[DIM2_IS_1]], %[[DIM1]], %[[EXTRACTED_2]] : index // CHECK: } -// CHECK: %[[OUT_BOUND_0:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF0]] : index +// CHECK: %[[OUT_BOUND_0:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF0]]) : index // CHECK: %[[REDUCTION_0:.*]] = scf.if %[[OUT_BOUND_0]] -> (i1) { // CHECK: scf.yield %[[ALL_SO_FAR]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF0]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg0[%[[SHIFTED]]] : tensor<2xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1]], %[[EQUALS_BROADCASTED]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[ALL_SO_FAR]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 // CHECK: } -// CHECK: %[[OUT_BOUND_1:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF1]] : index +// CHECK: %[[OUT_BOUND_1:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF1]]) : index // CHECK: %[[SECOND_REDUCTION:.*]] = scf.if %[[OUT_BOUND_1]] -> (i1) { // CHECK: scf.yield %[[REDUCTION_0]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF1]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg1[%[[SHIFTED]]] : tensor<3xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1]], %[[EQUALS_BROADCASTED]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[REDUCTION_0]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 // CHECK: } -// CHECK: %[[OUT_BOUND_2:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF2]] : index +// CHECK: %[[OUT_BOUND_2:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF2]]) : index // CHECK: %[[FINAL_RESULT:.*]] = scf.if %[[OUT_BOUND_2]] -> (i1) { // CHECK: scf.yield %[[SECOND_REDUCTION]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF2]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg2[%[[SHIFTED]]] : tensor<2xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED:.*]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED:.*]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED:.*]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED:.*]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1:.*]], %[[EQUALS_BROADCASTED:.*]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[SECOND_REDUCTION]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 @@ -467,9 +467,9 @@ // CHECK: %[[RANK0:.*]] = tensor.dim %[[ARG0]], %[[C0]] : tensor<2xindex> // CHECK: %[[RANK1:.*]] = tensor.dim %[[ARG1]], %[[C0]] : tensor<3xindex> // CHECK: %[[RANK2:.*]] = tensor.dim %[[ARG2]], %[[C0]] : tensor<2xindex> -// CHECK: %[[CMP0:.*]] = arith.cmpi ugt, %[[RANK1]], %[[RANK0]] : index +// CHECK: %[[CMP0:.*]] = arith.cmpi ugt(%[[RANK1]], %[[RANK0]]) : index // CHECK: %[[LARGER_DIM:.*]] = arith.select %[[CMP0]], %[[RANK1]], %[[RANK0]] : index -// CHECK: %[[CMP1:.*]] = arith.cmpi ugt, %[[RANK2]], %[[LARGER_DIM]] : index +// CHECK: %[[CMP1:.*]] = arith.cmpi ugt(%[[RANK2]], %[[LARGER_DIM]]) : index // CHECK: %[[MAX_RANK:.*]] = arith.select %[[CMP1]], %[[RANK2]], %[[LARGER_DIM]] : index // CHECK: %[[DIM_DIFF0:.*]] = arith.subi %[[MAX_RANK]], %[[RANK0]] : index // CHECK: %[[DIM_DIFF1:.*]] = arith.subi %[[MAX_RANK]], %[[RANK1]] : index @@ -477,65 +477,65 @@ // CHECK: %[[TRUE:.*]] = arith.constant true // CHECK: %[[ALL_RESULT:.*]] = scf.for %[[IDX:.*]] = %[[C0]] to %[[MAX_RANK]] step %[[C1]] iter_args(%[[ALL_SO_FAR:.*]] = %[[TRUE]]) -> (i1) { // CHECK: %[[C1_0:.*]] = arith.constant 1 : index -// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF0]] : index +// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF0]]) : index // CHECK: %[[DIM0:.*]] = scf.if %[[OUTBOUNDS0]] -> (index) { // CHECK: scf.yield %[[C1_0]] : index // CHECK: } else { // CHECK: %[[IDX0:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF0]] : index // CHECK: %[[EXTRACTED_0:.*]] = tensor.extract %[[ARG0]]{{\[}}%[[IDX0]]] : tensor<2xindex> -// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_0:.*]], %[[C1_0]] : index +// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_0:.*]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM0:.*]] = arith.select %[[DIM0_IS_1]], %[[C1_0]], %[[EXTRACTED_0]] : index // CHECK: } -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF1]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF1]]) : index // CHECK: %[[DIM1:.*]] = scf.if %[[VAL_28]] -> (index) { // CHECK: scf.yield %[[DIM0]] : index // CHECK: } else { // CHECK: %[[IDX1:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF1]] : index // CHECK: %[[EXTRACTED_1:.*]] = tensor.extract %[[ARG1]]{{\[}}%[[IDX1]]] : tensor<3xindex> -// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_1:.*]], %[[C1_0]] : index +// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_1:.*]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM1:.*]] = arith.select %[[DIM1_IS_1]], %[[DIM0]], %[[EXTRACTED_1]] : index // CHECK: } -// CHECK: %[[VAL_36:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF2]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF2]]) : index // CHECK: %[[DIM2:.*]] = scf.if %[[VAL_36]] -> (index) { // CHECK: scf.yield %[[DIM1]] : index // CHECK: } else { // CHECK: %[[IDX2:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF2]] : index // CHECK: %[[EXTRACTED_2:.*]] = tensor.extract %[[ARG2]]{{\[}}%[[IDX2]]] : tensor<2xindex> -// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_2]], %[[C1_0]] : index +// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_2]], %[[C1_0]]) : index // CHECK: %[[MAX_DIM2:.*]] = arith.select %[[DIM2_IS_1]], %[[DIM1]], %[[EXTRACTED_2]] : index // CHECK: } -// CHECK: %[[OUT_BOUND_0:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF0]] : index +// CHECK: %[[OUT_BOUND_0:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF0]]) : index // CHECK: %[[REDUCTION_0:.*]] = scf.if %[[OUT_BOUND_0]] -> (i1) { // CHECK: scf.yield %[[ALL_SO_FAR]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF0]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg0[%[[SHIFTED]]] : tensor<2xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1]], %[[EQUALS_BROADCASTED]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[ALL_SO_FAR]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 // CHECK: } -// CHECK: %[[OUT_BOUND_1:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF1]] : index +// CHECK: %[[OUT_BOUND_1:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF1]]) : index // CHECK: %[[SECOND_REDUCTION:.*]] = scf.if %[[OUT_BOUND_1]] -> (i1) { // CHECK: scf.yield %[[REDUCTION_0]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF1]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg1[%[[SHIFTED]]] : tensor<3xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1]], %[[EQUALS_BROADCASTED]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[REDUCTION_0]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 // CHECK: } -// CHECK: %[[OUT_BOUND_2:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF2]] : index +// CHECK: %[[OUT_BOUND_2:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF2]]) : index // CHECK: %[[FINAL_RESULT:.*]] = scf.if %[[OUT_BOUND_2]] -> (i1) { // CHECK: scf.yield %[[SECOND_REDUCTION]] : i1 // CHECK: } else { // CHECK: %[[SHIFTED:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF2]] : index // CHECK: %[[EXTRACTED:.*]] = tensor.extract %arg2[%[[SHIFTED]]] : tensor<2xindex> -// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq, %[[EXTRACTED:.*]], %c1 : index -// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq, %[[EXTRACTED:.*]], %[[DIM2]] : index +// CHECK: %[[EQUALS_1:.*]] = arith.cmpi eq(%[[EXTRACTED:.*]], %c1) : index +// CHECK: %[[EQUALS_BROADCASTED:.*]] = arith.cmpi eq(%[[EXTRACTED:.*]], %[[DIM2]]) : index // CHECK: %[[GOOD:.*]] = arith.ori %[[EQUALS_1:.*]], %[[EQUALS_BROADCASTED:.*]] : i1 // CHECK: %[[AND_REDUCTION:.*]] = arith.andi %[[SECOND_REDUCTION]], %[[GOOD]] : i1 // CHECK: scf.yield %[[AND_REDUCTION]] : i1 @@ -559,9 +559,9 @@ // CHECK: %[[RANK0:.*]] = tensor.dim %[[ARG0]], %[[C0]] : tensor<2xindex> // CHECK: %[[RANK1:.*]] = tensor.dim %[[ARG1]], %[[C0]] : tensor<3xindex> // CHECK: %[[RANK2:.*]] = tensor.dim %[[ARG2]], %[[C0]] : tensor<2xindex> -// CHECK: %[[CMP0:.*]] = arith.cmpi ugt, %[[RANK1]], %[[RANK0]] : index +// CHECK: %[[CMP0:.*]] = arith.cmpi ugt(%[[RANK1]], %[[RANK0]]) : index // CHECK: %[[LARGER_DIM:.*]] = arith.select %[[CMP0]], %[[RANK1]], %[[RANK0]] : index -// CHECK: %[[CMP1:.*]] = arith.cmpi ugt, %[[RANK2]], %[[LARGER_DIM]] : index +// CHECK: %[[CMP1:.*]] = arith.cmpi ugt(%[[RANK2]], %[[LARGER_DIM]]) : index // CHECK: %[[MAX_RANK:.*]] = arith.select %[[CMP1]], %[[RANK2]], %[[LARGER_DIM]] : index // CHECK: %[[DIM_DIFF0:.*]] = arith.subi %[[MAX_RANK]], %[[RANK0]] : index // CHECK: %[[DIM_DIFF1:.*]] = arith.subi %[[MAX_RANK]], %[[RANK1]] : index @@ -569,31 +569,31 @@ // CHECK: %[[RESULT:.*]] = tensor.generate %[[MAX_RANK]] { // CHECK: ^bb0(%[[IDX:.*]]: index): // CHECK: %[[C1:.*]] = arith.constant 1 : index -// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF0]] : index +// CHECK: %[[OUTBOUNDS0:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF0]]) : index // CHECK: %[[DIM0:.*]] = scf.if %[[OUTBOUNDS0]] -> (index) { // CHECK: scf.yield %[[C1]] : index // CHECK: } else { // CHECK: %[[IDX0:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF0]] : index // CHECK: %[[EXTRACTED_0:.*]] = tensor.extract %[[ARG0]]{{\[}}%[[IDX0]]] : tensor<2xindex> -// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_0:.*]], %[[C1]] : index +// CHECK: %[[DIM0_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_0:.*]], %[[C1]]) : index // CHECK: %[[MAX_DIM0:.*]] = arith.select %[[DIM0_IS_1]], %[[C1]], %[[EXTRACTED_0]] : index // CHECK: } -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF1]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF1]]) : index // CHECK: %[[DIM1:.*]] = scf.if %[[VAL_28]] -> (index) { // CHECK: scf.yield %[[DIM0]] : index // CHECK: } else { // CHECK: %[[IDX1:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF1]] : index // CHECK: %[[EXTRACTED_1:.*]] = tensor.extract %[[ARG1]]{{\[}}%[[IDX1]]] : tensor<3xindex> -// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_1:.*]], %[[C1]] : index +// CHECK: %[[DIM1_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_1:.*]], %[[C1]]) : index // CHECK: %[[MAX_DIM1:.*]] = arith.select %[[DIM1_IS_1]], %[[DIM0]], %[[EXTRACTED_1]] : index // CHECK: } -// CHECK: %[[VAL_36:.*]] = arith.cmpi ult, %[[IDX]], %[[DIM_DIFF2]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi ult(%[[IDX]], %[[DIM_DIFF2]]) : index // CHECK: %[[DIM2:.*]] = scf.if %[[VAL_36]] -> (index) { // CHECK: scf.yield %[[DIM1]] : index // CHECK: } else { // CHECK: %[[IDX2:.*]] = arith.subi %[[IDX]], %[[DIM_DIFF2]] : index // CHECK: %[[EXTRACTED_2:.*]] = tensor.extract %[[ARG2]]{{\[}}%[[IDX2]]] : tensor<2xindex> -// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq, %[[EXTRACTED_2:.*]], %[[C1]] : index +// CHECK: %[[DIM2_IS_1:.*]] = arith.cmpi eq(%[[EXTRACTED_2:.*]], %[[C1]]) : index // CHECK: %[[MAX_DIM2:.*]] = arith.select %[[DIM2_IS_1]], %[[DIM1]], %[[EXTRACTED_2]] : index // CHECK: } // CHECK: tensor.yield %[[DIM2]] : index @@ -625,7 +625,7 @@ // CHECK-NEXT: %[[C0:.*]] = arith.constant 0 : index // CHECK-NEXT: %[[RANK:.*]] = tensor.dim %[[SHAPE]], %[[C0]] : tensor // CHECK-NEXT: %[[POSINDEX:.*]] = arith.addi %[[INDEX]], %[[RANK]] : index - // CHECK-NEXT: %[[ISNEG:.*]] = arith.cmpi slt, %[[INDEX]], %[[C0]] : index + // CHECK-NEXT: %[[ISNEG:.*]] = arith.cmpi slt(%[[INDEX]], %[[C0]]) : index // CHECK-NEXT: %[[SELECT:.*]] = arith.select %[[ISNEG]], %[[POSINDEX]], %[[INDEX]] : index // CHECK-NEXT: %[[C1:.*]] = arith.constant 1 : index // CHECK-NEXT: %[[HEAD:.*]] = tensor.extract_slice %[[SHAPE]][%[[C0]]] [%[[SELECT]]] [%[[C1]]] : tensor to tensor diff --git a/mlir/test/Conversion/TosaToArith/tosa-to-arith.mlir b/mlir/test/Conversion/TosaToArith/tosa-to-arith.mlir --- a/mlir/test/Conversion/TosaToArith/tosa-to-arith.mlir +++ b/mlir/test/Conversion/TosaToArith/tosa-to-arith.mlir @@ -32,8 +32,8 @@ // CHECK-DAG: %[[LOW:.+]] = arith.muli %arg0, %arg1 // Determine whether the high bits need to shift left or right and by how much. - // CHECK-DAG: %[[OVER31:.+]] = arith.cmpi sge, %[[S32]], %[[C32]] - // CHECK-DAG: %[[OVER32:.+]] = arith.cmpi sgt, %[[S32]], %[[C32]] + // CHECK-DAG: %[[OVER31:.+]] = arith.cmpi sge(%[[S32]], %[[C32]]) + // CHECK-DAG: %[[OVER32:.+]] = arith.cmpi sgt(%[[S32]], %[[C32]]) // CHECK-DAG: %[[HISHLN:.+]] = arith.subi %[[C32]], %[[S32]] // CHECK-DAG: %[[HISHRN:.+]] = arith.subi %[[S32]], %[[C32]] // CHECK-DAG: %[[HISHL:.+]] = arith.select %[[OVER31]], %[[C0]], %[[HISHLN]] @@ -41,7 +41,7 @@ // Apply double rounding. // CHECK-DAG: %[[CN1:.+]] = arith.constant -1 - // CHECK-DAG: %[[POS:.+]] = arith.cmpi sge, %arg0, %[[C0]] + // CHECK-DAG: %[[POS:.+]] = arith.cmpi sge(%arg0, %[[C0]]) // CHECK-DAG: %[[DIR:.+]] = arith.select %[[POS]], %[[C1]], %[[CN1]] // CHECK-DAG: %[[DRND:.+]] = arith.select %[[OVER31]], %[[DIR]], %[[C0]] // CHECK-DAG: %[[DSHFTR:.+]] = arith.shrui %[[LOW]], %[[C30]] @@ -56,7 +56,7 @@ // CHECK-DAG: %[[LBIT:.+]] = arith.shli %[[C1]], %[[SHFTM1]] // CHECK-DAG: %[[HALF:.+]] = arith.select %[[OVER32]], %[[C0]], %[[LBIT]] // CHECK-DAG: %[[LADD:.+]] = arith.addi %[[DLOW]], %[[HALF]] - // CHECK-DAG: %[[LLO:.+]] = arith.cmpi ugt, %[[DLOW]], %[[LADD]] + // CHECK-DAG: %[[LLO:.+]] = arith.cmpi ugt(%[[DLOW]], %[[LADD]]) // CHECK-DAG: %[[LCARRY:.+]] = arith.extui %[[LLO]] : i1 to i32 // CHECK-DAG: %[[LRNDED:.+]] = arith.addi %[[DHI]], %[[LCARRY]] @@ -68,7 +68,7 @@ // Combine hi-low into the final result. // CHECK-DAG: %[[HIL:.+]] = arith.shli %[[FHI]], %[[HISHL]] - // CHECK-DAG: %[[HIALIGN:.+]] = arith.shrsi %[[HIL:.+]], %[[HISHR]] + // CHECK-DAG: %[[HIALIGN:.+]] = arith.shrsi %[[HIL:.+]], %[[HISHR]] // CHECK-DAG: %[[LOR:.+]] = arith.shrui %[[LADD]], %[[S32]] // CHECK-DAG: %[[LOWALIGN:.+]] = arith.select %[[OVER31]], %[[C0]], %[[LOR]] // CHECK-DAG: %[[RESULT:.+]] = arith.addi %[[LOWALIGN]], %[[HIALIGN]] @@ -111,10 +111,10 @@ // Apply double rounding. // CHECK-DAG: %[[DUP:.+]] = arith.constant 1073741824 : i64 // CHECK-DAG: %[[DDOWN:.+]] = arith.constant -1073741824 : i64 - // CHECK-DAG: %[[POS:.+]] = arith.cmpi sge, %arg0, %[[C0]] + // CHECK-DAG: %[[POS:.+]] = arith.cmpi sge(%arg0, %[[C0]]) // CHECK-DAG: %[[DBIT:.+]] = arith.select %[[POS]], %[[DUP]], %[[DDOWN]] // CHECK-DAG: %[[DRND:.+]] = arith.addi %[[DBIT]], %[[ROUND]] - // CHECK-DAG: %[[USED:.+]] = arith.cmpi sgt, %[[S32]], %[[C31]] : i32 + // CHECK-DAG: %[[USED:.+]] = arith.cmpi sgt(%[[S32]], %[[C31]]) : i32 // CHECK-DAG: %[[RES64:.+]] = arith.select %[[USED]], %[[DRND]], %[[ROUND]] : i64 // Shift and truncate final answer. diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir --- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir +++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir @@ -227,28 +227,28 @@ // CHECK: [[KH:%.+]] = arith.constant 4 // CHECK: [[PAD0:%.+]] = arith.constant 1 // CHECK: [[SUBP0:%.+]] = arith.subi [[IDX1]], [[PAD0]] - // CHECK: [[P0CMP:%.+]] = arith.cmpi slt, [[SUBP0]], [[ZERO]] + // CHECK: [[P0CMP:%.+]] = arith.cmpi slt([[SUBP0]], [[ZERO]]) // CHECK: [[SELP0:%.+]] = arith.select [[P0CMP]], [[SUBP0]], [[ZERO]] // CHECK: [[ADDP0:%.+]] = arith.addi [[KH]], [[SELP0]] // CHECK: [[PAD1:%.+]] = arith.constant 1 // CHECK: [[SUBP1:%.+]] = arith.subi [[NY]], [[PAD1]] - // CHECK: [[P1CMP:%.+]] = arith.cmpi slt, [[SUBP1]], [[ZERO]] + // CHECK: [[P1CMP:%.+]] = arith.cmpi slt([[SUBP1]], [[ZERO]]) // CHECK: [[SELP1:%.+]] = arith.select [[P1CMP]], [[SUBP1]], [[ZERO]] // CHECK: [[ADDP1:%.+]] = arith.addi [[ADDP0]], [[SELP1]] - // CHECK: [[YCMP:%.+]] = arith.cmpi slt, [[ADDP1]], [[ONE]] + // CHECK: [[YCMP:%.+]] = arith.cmpi slt([[ADDP1]], [[ONE]]) // CHECK: [[YSEL:%.+]] = arith.select [[YCMP]], [[ONE]], [[ADDP1]] // CHECK: [[KW:%.+]] = arith.constant 4 : index // CHECK: [[PAD2:%.+]] = arith.constant 1 : index // CHECK: [[SUBP2:%.+]] = arith.subi [[IDX2]], [[PAD2]] - // CHECK: [[P2CMP:%.+]] = arith.cmpi slt, [[SUBP2]], [[ZERO]] + // CHECK: [[P2CMP:%.+]] = arith.cmpi slt([[SUBP2]], [[ZERO]]) // CHECK: [[SELP2:%.+]] = arith.select [[P2CMP]], [[SUBP2]], [[ZERO]] // CHECK: [[ADDP2:%.+]] = arith.addi [[KW]], [[SELP2]] // CHECK: [[PAD3:%.+]] = arith.constant 1 : index // CHECK: [[SUBP3:%.+]] = arith.subi [[NX]], [[PAD3]] - // CHECK: [[P3CMP:%.+]] = arith.cmpi slt, [[SUBP3]], [[ZERO]] + // CHECK: [[P3CMP:%.+]] = arith.cmpi slt([[SUBP3]], [[ZERO]]) // CHECK: [[SELP3:%.+]] = arith.select [[P3CMP]], [[SUBP3]], [[ZERO]] // CHECK: [[ADDP3:%.+]] = arith.addi [[ADDP2]], [[SELP3]] - // CHECK: [[XCMP:%.+]] = arith.cmpi slt, [[ADDP3]], [[ONE]] + // CHECK: [[XCMP:%.+]] = arith.cmpi slt([[ADDP3]], [[ONE]]) // CHECK: [[XSEL:%.+]] = arith.select [[XCMP]], [[ONE]], [[ADDP3]] // Given the valid coverage of the pooling region, normalize the summation. @@ -298,9 +298,9 @@ // CHECK: %[[OUT:.+]] = arith.addi %[[SCALE]], %[[OUTZP]] // CHECK: %[[MIN:.+]] = arith.constant -128 // CHECK: %[[MAX:.+]] = arith.constant 127 - // CHECK: %[[CMP_MIN:.+]] = arith.cmpi slt, %[[OUT]], %[[MIN]] + // CHECK: %[[CMP_MIN:.+]] = arith.cmpi slt(%[[OUT]], %[[MIN]]) // CHECK: %[[CLMP_MIN:.+]] = arith.select %[[CMP_MIN]], %[[MIN]], %[[OUT]] - // CHECK: %[[CMP_MAX:.+]] = arith.cmpi slt, %[[MAX]], %[[OUT]] + // CHECK: %[[CMP_MAX:.+]] = arith.cmpi slt(%[[MAX]], %[[OUT]]) // CHECK: %[[CLMP_MAX:.+]] = arith.select %[[CMP_MAX]], %[[MAX]], %[[CLMP_MIN]] // CHECK: %[[TRUNC:.+]] = arith.trunci %[[CLMP_MAX]] // CHECK: linalg.yield %[[TRUNC]] @@ -327,9 +327,9 @@ // CHECK: %[[OUT:.+]] = arith.addi %[[SCALE]], %[[OUTZP]] // CHECK: %[[MIN:.+]] = arith.constant -32768 // CHECK: %[[MAX:.+]] = arith.constant 32767 - // CHECK: %[[CMP_MIN:.+]] = arith.cmpi slt, %[[OUT]], %[[MIN]] + // CHECK: %[[CMP_MIN:.+]] = arith.cmpi slt(%[[OUT]], %[[MIN]]) // CHECK: %[[CLMP_MIN:.+]] = arith.select %[[CMP_MIN]], %[[MIN]], %[[OUT]] - // CHECK: %[[CMP_MAX:.+]] = arith.cmpi slt, %[[MAX]], %[[OUT]] + // CHECK: %[[CMP_MAX:.+]] = arith.cmpi slt(%[[MAX]], %[[OUT]]) // CHECK: %[[CLMP_MAX:.+]] = arith.select %[[CMP_MAX]], %[[MAX]], %[[CLMP_MIN]] // CHECK: %[[TRUNC:.+]] = arith.trunci %[[CLMP_MAX]] // CHECK: linalg.yield %[[TRUNC]] @@ -525,7 +525,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm {dilations = dense<1> : tensor<2xi64>, strides = dense<2> : tensor<2xi64>} ins(%arg0, %arg1 : tensor<1x11x9x3xf32>, tensor<3x1x3x11xf32>) outs([[FILL]] : tensor<1x5x5x3x11xf32>) // CHECK: [[COLLAPSED:%.+]] = tensor.collapse_shape [[DEPTH]] {{\[}}[0], [1], [2], [3, 4]] // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<33xf32>, tensor<1x5x5x33xf32>) outs([[OUT]] : tensor<1x5x5x33xf32>) { - // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): + // CHECK: ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // CHECK: [[ADD:%.+]] = arith.addf %arg3, %arg4 : f32 // CHECK: linalg.yield [[ADD]] : f32 // CHECK: } -> tensor<1x5x5x33xf32> @@ -553,7 +553,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm_q {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins([[PAD]], %arg1, [[C128]], [[C42]] : tensor<1x14x14x4xi8>, tensor<3x3x4x128xi8>, i32, i32) outs([[FILL]] : tensor<1x12x12x4x128xi32>) // CHECK: [[COLLAPSED:%.+]] = tensor.collapse_shape [[DEPTH]] {{\[}}[0], [1], [2], [3, 4]] // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<512xi32>, tensor<1x12x12x512xi32>) outs([[OUT]] : tensor<1x12x12x512xi32>) { - // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): + // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // CHECK: [[ADD:%.+]] = arith.addi %arg3, %arg4 : i32 // CHECK: linalg.yield [[ADD]] : i32 // CHECK: } -> tensor<1x12x12x512xi32> @@ -577,7 +577,7 @@ // CHECK: [[DEPTH:%.+]] = linalg.depthwise_conv_2d_nhwc_hwcm_q {dilations = dense<2> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%arg0, %arg1, [[C128]], [[C42]] : tensor<1x14x14x4xi8>, tensor<3x3x4x128xi8>, i32, i32) outs([[FILL]] : tensor<1x10x10x4x128xi32>) // CHECK: [[COLLAPSED:%.+]] = tensor.collapse_shape [[DEPTH]] {{\[}}[0], [1], [2], [3, 4]] // CHECK: [[BIAS:%.+]] = linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "parallel", "parallel", "parallel"]} ins(%arg2, [[COLLAPSED]] : tensor<512xi32>, tensor<1x10x10x512xi32>) outs([[OUT]] : tensor<1x10x10x512xi32>) { - // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): + // CHECK: ^bb0(%arg3: i32, %arg4: i32, %arg5: i32): // CHECK: [[ADD:%.+]] = arith.addi %arg3, %arg4 : i32 // CHECK: linalg.yield [[ADD]] : i32 // CHECK: } -> tensor<1x10x10x512xi32> diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir --- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir +++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir @@ -440,9 +440,9 @@ // CHECK: ^bb0(%[[ARG1:.+]]: i8, // CHECK-DAG: %[[C127:.+]] = arith.constant -127 // CHECK-DAG: %[[C126:.+]] = arith.constant 126 - // CHECK-DAG: %[[CMP1:.+]] = arith.cmpi slt, %[[ARG1]], %[[C127]] + // CHECK-DAG: %[[CMP1:.+]] = arith.cmpi slt(%[[ARG1]], %[[C127]]) // CHECK-DAG: %[[SEL1:.+]] = arith.select %[[CMP1]], %[[C127]] - // CHECK-DAG: %[[CMP2:.+]] = arith.cmpi slt, %[[C126]], %[[ARG1]] + // CHECK-DAG: %[[CMP2:.+]] = arith.cmpi slt(%[[C126]], %[[ARG1]]) // CHECK: %[[SEL2:.+]] = arith.select %[[CMP2]], %[[C126]], %[[SEL1]] %0 = "tosa.clamp"(%arg0) {min_int = -127 : i64, max_int = 126 : i64, min_fp = 0.0 : f32, max_fp = 0.0 : f32} : (tensor<1xi8>) -> tensor<1xi8> @@ -450,9 +450,9 @@ // CHECK: ^bb0(%[[ARG1:.+]]: i8, // CHECK-DAG: %[[C128:.+]] = arith.constant -128 // CHECK-DAG: %[[C127:.+]] = arith.constant 127 - // CHECK-DAG: %[[CMP1:.+]] = arith.cmpi slt, %[[ARG1]], %[[C128]] + // CHECK-DAG: %[[CMP1:.+]] = arith.cmpi slt(%[[ARG1]], %[[C128]]) // CHECK-DAG: %[[SEL1:.+]] = arith.select %[[CMP1]], %[[C128]] - // CHECK-DAG: %[[CMP2:.+]] = arith.cmpi slt, %[[C127]], %[[ARG1]] + // CHECK-DAG: %[[CMP2:.+]] = arith.cmpi slt(%[[C127]], %[[ARG1]]) // CHECK: %[[SEL2:.+]] = arith.select %[[CMP2]], %[[C127]], %[[SEL1]] %1 = "tosa.clamp"(%arg0) {min_int = -130 : i64, max_int = 130 : i64, min_fp = 0.0 : f32, max_fp = 0.0 : f32} : (tensor<1xi8>) -> tensor<1xi8> @@ -508,9 +508,9 @@ // CHECK: [[SUB:%.+]] = arith.subi [[ZERO]], [[EXT]] // CHECK: [[MIN:%.+]] = arith.constant -128 // CHECK: [[MAX:%.+]] = arith.constant 127 - // CHECK: [[PRED1:%.+]] = arith.cmpi slt, [[SUB]], [[MIN]] + // CHECK: [[PRED1:%.+]] = arith.cmpi slt([[SUB]], [[MIN]]) // CHECK: [[LBOUND:%.+]] = arith.select [[PRED1]], [[MIN]], [[SUB]] - // CHECK: [[PRED2:%.+]] = arith.cmpi slt, [[MAX]], [[SUB]] + // CHECK: [[PRED2:%.+]] = arith.cmpi slt([[MAX]], [[SUB]]) // CHECK: [[UBOUND:%.+]] = arith.select [[PRED2]], [[MAX]], [[LBOUND]] // CHECK: [[TRUNC:%.+]] = arith.trunci [[UBOUND]] // CHECK: linalg.yield [[TRUNC]] @@ -966,8 +966,8 @@ // CHECK-DAG: [[SCALED_ZEROED:%.+]] = arith.addi [[SCALED]], [[C22]] // CHECK-DAG: [[CMIN:%.+]] = arith.constant -128 // CHECK-DAG: [[CMAX:%.+]] = arith.constant 127 - // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt, [[SCALED_ZEROED]], [[CMIN]] - // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt, [[CMAX]], [[SCALED_ZEROED]] + // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt([[SCALED_ZEROED]], [[CMIN]]) + // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt([[CMAX]], [[SCALED_ZEROED]]) // CHECK-DAG: [[LOWER:%.+]] = arith.select [[MINLT]], [[CMIN]], [[SCALED_ZEROED]] // CHECK-DAG: [[BOUNDED:%.+]] = arith.select [[MAXLT]], [[CMAX]], [[LOWER]] // CHECK-DAG: [[TRUNC:%.+]] = arith.trunci [[BOUNDED]] @@ -987,9 +987,9 @@ // CHECK-DAG: [[SCALED_ZEROED:%.+]] = arith.addi [[SCALED]], [[C22]] // CHECK-DAG: [[CMIN:%.+]] = arith.constant 0 // CHECK-DAG: [[CMAX:%.+]] = arith.constant 255 - // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt, [[SCALED_ZEROED]], [[CMIN]] + // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt([[SCALED_ZEROED]], [[CMIN]]) // CHECK-DAG: [[LOWER:%.+]] = arith.select [[MINLT]], [[CMIN]], [[SCALED_ZEROED]] - // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt, [[CMAX]], [[SCALED_ZEROED]] + // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt([[CMAX]], [[SCALED_ZEROED]]) // CHECK-DAG: [[BOUNDED:%.+]] = arith.select [[MAXLT]], [[CMAX]], [[LOWER]] // CHECK-DAG: [[TRUNC:%.+]] = arith.trunci [[BOUNDED]] // CHECK-DAG: [[CAST:%.+]] = builtin.unrealized_conversion_cast [[TRUNC]] : i8 to ui8 @@ -1040,9 +1040,9 @@ // CHECK-DAG: [[SCALED_ZEROED:%.+]] = arith.addi [[SCALED]], [[C22]] // CHECK-DAG: [[CMIN:%.+]] = arith.constant -128 // CHECK-DAG: [[CMAX:%.+]] = arith.constant 127 - // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt, [[SCALED_ZEROED]], [[CMIN]] + // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt([[SCALED_ZEROED]], [[CMIN]]) // CHECK-DAG: [[LOWER:%.+]] = arith.select [[MINLT]], [[CMIN]], [[SCALED_ZEROED]] - // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt, [[CMAX]], [[SCALED_ZEROED]] + // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt([[CMAX]], [[SCALED_ZEROED]]) // CHECK-DAG: [[BOUNDED:%.+]] = arith.select [[MAXLT]], [[CMAX]], [[LOWER]] // CHECK-DAG: [[TRUNC:%.+]] = arith.trunci [[BOUNDED]] // CHECK: linalg.yield [[TRUNC]] @@ -1071,8 +1071,8 @@ // CHECK-DAG: [[SCALED_ZEROED:%.+]] = arith.addi [[SCALED]], [[C252]] // CHECK-DAG: [[CMIN:%.+]] = arith.constant -128 // CHECK-DAG: [[CMAX:%.+]] = arith.constant 127 - // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt, [[SCALED_ZEROED]], [[CMIN]] - // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt, [[CMAX]], [[SCALED_ZEROED]] + // CHECK-DAG: [[MINLT:%.+]] = arith.cmpi slt([[SCALED_ZEROED]], [[CMIN]]) + // CHECK-DAG: [[MAXLT:%.+]] = arith.cmpi slt([[CMAX]], [[SCALED_ZEROED]]) // CHECK-DAG: [[LOWER:%.+]] = arith.select [[MINLT]], [[CMIN]], [[SCALED_ZEROED]] // CHECK-DAG: [[BOUNDED:%.+]] = arith.select [[MAXLT]], [[CMAX]], [[LOWER]] // CHECK-DAG: [[TRUNC:%.+]] = arith.trunci [[BOUNDED]] @@ -1332,7 +1332,7 @@ // CHECK: linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["reduction", "parallel"]} ins(%arg0 : tensor<3x2xi32>) outs([[IDX_FILL]], [[VAL_FILL]] : tensor<2xi32>, tensor<2xi32>) // CHECK: [[IDX:%.+]] = linalg.index 0 // CHECK: [[CAST:%.+]] = arith.index_cast [[IDX]] - // CHECK: [[CMP:%.+]] = arith.cmpi sgt, %arg2, %arg4 + // CHECK: [[CMP:%.+]] = arith.cmpi sgt(%arg2, %arg4) // CHECK: [[SELECT_VAL:%.+]] = arith.select [[CMP]], %arg2, %arg4 // CHECK: [[SELECT_IDX:%.+]] = arith.select [[CMP]], [[CAST]], %arg3 // CHECK: linalg.yield [[SELECT_IDX]], [[SELECT_VAL]] @@ -1347,7 +1347,7 @@ // CHECK: linalg.generic {indexing_maps = [#map0, #map2, #map2], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<3x2xi32>) outs([[IDX_FILL]], [[VAL_FILL]] : tensor<3xi32>, tensor<3xi32>) // CHECK: [[IDX:%.+]] = linalg.index 1 // CHECK: [[CAST:%.+]] = arith.index_cast [[IDX]] - // CHECK: [[CMP:%.+]] = arith.cmpi sgt, %arg2, %arg4 + // CHECK: [[CMP:%.+]] = arith.cmpi sgt(%arg2, %arg4) // CHECK: [[SELECT_VAL:%.+]] = arith.select [[CMP]], %arg2, %arg4 // CHECK: [[SELECT_IDX:%.+]] = arith.select [[CMP]], [[CAST]], %arg3 // CHECK: linalg.yield [[SELECT_IDX]], [[SELECT_VAL]] @@ -1382,7 +1382,7 @@ // CHECK: linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["reduction", "parallel"]} ins(%arg0 : tensor<3x?xi32>) outs(%[[IDX_FILL]], %[[VAL_FILL]] : tensor, tensor) // CHECK: %[[IDX:.+]] = linalg.index 0 // CHECK: %[[CAST:.+]] = arith.index_cast %[[IDX]] - // CHECK: %[[CMP:.+]] = arith.cmpi sgt, %arg1, %arg3 + // CHECK: %[[CMP:.+]] = arith.cmpi sgt(%arg1, %arg3) // CHECK: %[[SELECT_VAL:.+]] = arith.select %[[CMP]], %arg1, %arg3 // CHECK: %[[SELECT_IDX:.+]] = arith.select %[[CMP]], %[[CAST]], %arg2 // CHECK: linalg.yield %[[SELECT_IDX]], %[[SELECT_VAL]] @@ -1405,7 +1405,7 @@ // CHECK: linalg.generic {indexing_maps = [#[[$MAP0]], #[[$MAP1]], #[[$MAP1]]], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<3x?xi32>) outs(%[[IDX_FILL]], %[[VAL_FILL]] : tensor<3xi32>, tensor<3xi32>) // CHECK: %[[IDX:.+]] = linalg.index 1 // CHECK: %[[CAST:.+]] = arith.index_cast %[[IDX]] - // CHECK: %[[CMP:.+]] = arith.cmpi sgt, %arg1, %arg3 + // CHECK: %[[CMP:.+]] = arith.cmpi sgt(%arg1, %arg3) // CHECK: %[[SELECT_VAL:.+]] = arith.select %[[CMP]], %arg1, %arg3 // CHECK: %[[SELECT_IDX:.+]] = arith.select %[[CMP]], %[[CAST]], %arg2 // CHECK: linalg.yield %[[SELECT_IDX]], %[[SELECT_VAL]] @@ -1578,8 +1578,8 @@ // Round to the nearest index. // CHECK-DAG: %[[ROUND:.+]] = arith.constant 5.000000e-01 - // CHECK-DAG: %[[VAL16:.+]] = arith.cmpf oge, %[[VAL12]], %[[ROUND]] - // CHECK-DAG: %[[VAL17:.+]] = arith.cmpf oge, %[[VAL13]], %[[ROUND]] + // CHECK-DAG: %[[VAL16:.+]] = arith.cmpf oge(%[[VAL12]], %[[ROUND]]) + // CHECK-DAG: %[[VAL17:.+]] = arith.cmpf oge(%[[VAL13]], %[[ROUND]]) // CHECK-DAG: %[[ZERO:.+]] = arith.constant 0 // CHECK-DAG: %[[ONE:.+]] = arith.constant 1 // CHECK-DAG: %[[VAL18:.+]] = arith.select %[[VAL16]], %[[ONE]], %[[ZERO]] @@ -1589,13 +1589,13 @@ // This section applies bound checking to be within the input image. - // CHECK-DAG: %[[VAL22:.+]] = arith.cmpi slt, %[[VAL20]], %[[XYMIN]] + // CHECK-DAG: %[[VAL22:.+]] = arith.cmpi slt(%[[VAL20]], %[[XYMIN]]) // CHECK-DAG: %[[VAL23:.+]] = arith.select %[[VAL22]], %[[XYMIN]], %[[VAL20]] - // CHECK-DAG: %[[VAL24:.+]] = arith.cmpi slt, %[[YMAX]], %[[VAL20]] + // CHECK-DAG: %[[VAL24:.+]] = arith.cmpi slt(%[[YMAX]], %[[VAL20]]) // CHECK-DAG: %[[VAL25:.+]] = arith.select %[[VAL24]], %[[YMAX]], %[[VAL23]] - // CHECK-DAG: %[[VAL26:.+]] = arith.cmpi slt, %[[VAL21]], %[[XYMIN]] + // CHECK-DAG: %[[VAL26:.+]] = arith.cmpi slt(%[[VAL21]], %[[XYMIN]]) // CHECK-DAG: %[[VAL27:.+]] = arith.select %[[VAL26]], %[[XYMIN]], %[[VAL21]] - // CHECK-DAG: %[[VAL28:.+]] = arith.cmpi slt, %[[XMAX]], %[[VAL21]] + // CHECK-DAG: %[[VAL28:.+]] = arith.cmpi slt(%[[XMAX]], %[[VAL21]]) // CHECK-DAG: %[[VAL29:.+]] = arith.select %[[VAL28]], %[[XMAX]], %[[VAL27]] // Extract the nearest value using the computed indices. @@ -1640,24 +1640,24 @@ // Bound check each dimension. - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[Y0]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[Y0]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[Y0]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[YMAX]], %[[Y0]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[YMAX]], %[[Y0]]) // CHECK: %[[YLO:.+]] = arith.select %[[PRED]], %[[YMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[Y1]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[Y1]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[Y1]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[YMAX]], %[[Y1]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[YMAX]], %[[Y1]]) // CHECK: %[[YHI:.+]] = arith.select %[[PRED]], %[[YMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[X0]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[X0]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[X0]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[XMAX]], %[[X0]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[XMAX]], %[[X0]]) // CHECK: %[[XLO:.+]] = arith.select %[[PRED]], %[[XMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[X1]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[X1]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[X1]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[XMAX]], %[[X1]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[XMAX]], %[[X1]]) // CHECK: %[[XHI:.+]] = arith.select %[[PRED]], %[[XMAX]], %[[BOUND]] // Extract each corner of the bilinear interpolation. @@ -1729,8 +1729,8 @@ // Round to the nearest index. // CHECK-DAG: %[[ROUND:.+]] = arith.constant 128 - // CHECK-DAG: %[[VAL16:.+]] = arith.cmpi sge, %[[VAL12]], %[[ROUND]] - // CHECK-DAG: %[[VAL17:.+]] = arith.cmpi sge, %[[VAL13]], %[[ROUND]] + // CHECK-DAG: %[[VAL16:.+]] = arith.cmpi sge(%[[VAL12]], %[[ROUND]]) + // CHECK-DAG: %[[VAL17:.+]] = arith.cmpi sge(%[[VAL13]], %[[ROUND]]) // CHECK-DAG: %[[ZERO:.+]] = arith.constant 0 // CHECK-DAG: %[[ONE:.+]] = arith.constant 1 // CHECK-DAG: %[[VAL18:.+]] = arith.select %[[VAL16]], %[[ONE]], %[[ZERO]] @@ -1740,13 +1740,13 @@ // This section applies bound checking to be within the input image. - // CHECK-DAG: %[[VAL22:.+]] = arith.cmpi slt, %[[VAL20]], %[[XYMIN]] + // CHECK-DAG: %[[VAL22:.+]] = arith.cmpi slt(%[[VAL20]], %[[XYMIN]]) // CHECK-DAG: %[[VAL23:.+]] = arith.select %[[VAL22]], %[[XYMIN]], %[[VAL20]] - // CHECK-DAG: %[[VAL24:.+]] = arith.cmpi slt, %[[YMAX]], %[[VAL20]] + // CHECK-DAG: %[[VAL24:.+]] = arith.cmpi slt(%[[YMAX]], %[[VAL20]]) // CHECK-DAG: %[[VAL25:.+]] = arith.select %[[VAL24]], %[[YMAX]], %[[VAL23]] - // CHECK-DAG: %[[VAL26:.+]] = arith.cmpi slt, %[[VAL21]], %[[XYMIN]] + // CHECK-DAG: %[[VAL26:.+]] = arith.cmpi slt(%[[VAL21]], %[[XYMIN]]) // CHECK-DAG: %[[VAL27:.+]] = arith.select %[[VAL26]], %[[XYMIN]], %[[VAL21]] - // CHECK-DAG: %[[VAL28:.+]] = arith.cmpi slt, %[[XMAX]], %[[VAL21]] + // CHECK-DAG: %[[VAL28:.+]] = arith.cmpi slt(%[[XMAX]], %[[VAL21]]) // CHECK-DAG: %[[VAL29:.+]] = arith.select %[[VAL28]], %[[XMAX]], %[[VAL27]] // Extract the nearest value using the computed indices. @@ -1788,24 +1788,24 @@ // Bound check each dimension. - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[Y0]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[Y0]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[Y0]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[YMAX]], %[[Y0]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[YMAX]], %[[Y0]]) // CHECK: %[[YLO:.+]] = arith.select %[[PRED]], %[[YMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[Y1]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[Y1]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[Y1]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[YMAX]], %[[Y1]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[YMAX]], %[[Y1]]) // CHECK: %[[YHI:.+]] = arith.select %[[PRED]], %[[YMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[X0]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[X0]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[X0]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[XMAX]], %[[X0]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[XMAX]], %[[X0]]) // CHECK: %[[XLO:.+]] = arith.select %[[PRED]], %[[XMAX]], %[[BOUND]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[X1]], %[[XYMIN]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[X1]], %[[XYMIN]]) // CHECK: %[[BOUND:.+]] = arith.select %[[PRED]], %[[XYMIN]], %[[X1]] - // CHECK: %[[PRED:.+]] = arith.cmpi slt, %[[XMAX]], %[[X1]] + // CHECK: %[[PRED:.+]] = arith.cmpi slt(%[[XMAX]], %[[X1]]) // CHECK: %[[XHI:.+]] = arith.select %[[PRED]], %[[XMAX]], %[[BOUND]] // Extract each corner of the bilinear interpolation. diff --git a/mlir/test/Conversion/VectorToLLVM/vector-mask-to-llvm.mlir b/mlir/test/Conversion/VectorToLLVM/vector-mask-to-llvm.mlir --- a/mlir/test/Conversion/VectorToLLVM/vector-mask-to-llvm.mlir +++ b/mlir/test/Conversion/VectorToLLVM/vector-mask-to-llvm.mlir @@ -7,7 +7,7 @@ // CMP32: %[[T1:.*]] = arith.index_cast %[[ARG]] : index to i32 // CMP32: %[[T2:.*]] = llvm.insertelement %[[T1]], %{{.*}}[%{{.*}} : i32] : vector<11xi32> // CMP32: %[[T3:.*]] = llvm.shufflevector %[[T2]], %{{.*}} [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] : vector<11xi32> -// CMP32: %[[T4:.*]] = arith.cmpi slt, %[[T0]], %[[T3]] : vector<11xi32> +// CMP32: %[[T4:.*]] = arith.cmpi slt(%[[T0]], %[[T3]]) : vector<11xi32> // CMP32: return %[[T4]] : vector<11xi1> // CMP64-LABEL: @genbool_var_1d( @@ -16,7 +16,7 @@ // CMP64: %[[T1:.*]] = arith.index_cast %[[ARG]] : index to i64 // CMP64: %[[T2:.*]] = llvm.insertelement %[[T1]], %{{.*}}[%{{.*}} : i32] : vector<11xi64> // CMP64: %[[T3:.*]] = llvm.shufflevector %[[T2]], %{{.*}} [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] : vector<11xi64> -// CMP64: %[[T4:.*]] = arith.cmpi slt, %[[T0]], %[[T3]] : vector<11xi64> +// CMP64: %[[T4:.*]] = arith.cmpi slt(%[[T0]], %[[T3]]) : vector<11xi64> // CMP64: return %[[T4]] : vector<11xi1> func.func @genbool_var_1d(%arg0: index) -> vector<11xi1> { @@ -30,7 +30,7 @@ // CMP32: %[[T1:.*]] = arith.index_cast %[[ARG]] : index to i32 // CMP32: %[[T2:.*]] = llvm.insertelement %[[T1]], %{{.*}}[%{{.*}} : i32] : vector<[11]xi32> // CMP32: %[[T3:.*]] = llvm.shufflevector %[[T2]], %{{.*}} [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] : vector<[11]xi32> -// CMP32: %[[T4:.*]] = arith.cmpi slt, %[[T0]], %[[T3]] : vector<[11]xi32> +// CMP32: %[[T4:.*]] = arith.cmpi slt(%[[T0]], %[[T3]]) : vector<[11]xi32> // CMP32: return %[[T4]] : vector<[11]xi1> // CMP64-LABEL: @genbool_var_1d_scalable( @@ -39,7 +39,7 @@ // CMP64: %[[T1:.*]] = arith.index_cast %[[ARG]] : index to i64 // CMP64: %[[T2:.*]] = llvm.insertelement %[[T1]], %{{.*}}[%{{.*}} : i32] : vector<[11]xi64> // CMP64: %[[T3:.*]] = llvm.shufflevector %[[T2]], %{{.*}} [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] : vector<[11]xi64> -// CMP64: %[[T4:.*]] = arith.cmpi slt, %[[T0]], %[[T3]] : vector<[11]xi64> +// CMP64: %[[T4:.*]] = arith.cmpi slt(%[[T0]], %[[T3]]) : vector<[11]xi64> // CMP64: return %[[T4]] : vector<[11]xi1> func.func @genbool_var_1d_scalable(%arg0: index) -> vector<[11]xi1> { @@ -55,7 +55,7 @@ // CMP32: %[[B:.*]] = arith.index_cast %[[S]] : index to i32 // CMP32: %[[B0:.*]] = llvm.insertelement %[[B]], %{{.*}} : vector<16xi32> // CMP32: %[[BV:.*]] = llvm.shufflevector %[[B0]], {{.*}} : vector<16xi32> -// CMP32: %[[M:.*]] = arith.cmpi slt, %[[C]], %[[BV]] : vector<16xi32> +// CMP32: %[[M:.*]] = arith.cmpi slt(%[[C]], %[[BV]]) : vector<16xi32> // CMP32: %[[L:.*]] = llvm.intr.masked.load %{{.*}}, %[[M]], %{{.*}} // CMP32: return %[[L]] : vector<16xf32> @@ -67,7 +67,7 @@ // CMP64: %[[B:.*]] = arith.index_cast %[[S]] : index to i64 // CMP64: %[[B0:.*]] = llvm.insertelement %[[B]], %{{.*}} : vector<16xi64> // CMP64: %[[BV:.*]] = llvm.shufflevector %[[B0]], {{.*}} : vector<16xi64> -// CMP64: %[[M:.*]] = arith.cmpi slt, %[[C]], %[[BV]] : vector<16xi64> +// CMP64: %[[M:.*]] = arith.cmpi slt(%[[C]], %[[BV]]) : vector<16xi64> // CMP64: %[[L:.*]] = llvm.intr.masked.load %{{.*}}, %[[M]], %{{.*}} // CMP64: return %[[L]] : vector<16xf32> diff --git a/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir b/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir --- a/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir +++ b/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir @@ -418,7 +418,7 @@ // ----- - + func.func @shuffle_0D_direct(%arg0: vector) -> vector<3xf32> { %1 = vector.shuffle %arg0, %arg0 [0, 1, 0] : vector, vector return %1 : vector<3xf32> @@ -1522,7 +1522,7 @@ // CHECK: %[[btrunc:.*]] = arith.index_cast %[[BOUND]] : index to i32 // CHECK: %[[boundVecInsert:.*]] = llvm.insertelement %[[btrunc]] // CHECK: %[[boundVect:.*]] = llvm.shufflevector %[[boundVecInsert]] -// CHECK: %[[mask:.*]] = arith.cmpi slt, %[[linearIndex]], %[[boundVect]] +// CHECK: %[[mask:.*]] = arith.cmpi slt(%[[linearIndex]], %[[boundVect]]) // CHECK-SAME: : vector<17xi32> // // 4. Create pass-through vector. @@ -1553,8 +1553,8 @@ // CHECK: %[[btrunc_b:.*]] = arith.index_cast %[[BOUND_b]] : index to i32 // CHECK: %[[boundVecInsert_b:.*]] = llvm.insertelement %[[btrunc_b]] // CHECK: %[[boundVect_b:.*]] = llvm.shufflevector %[[boundVecInsert_b]] -// CHECK: %[[mask_b:.*]] = arith.cmpi slt, %[[linearIndex_b]], -// CHECK-SAME: %[[boundVect_b]] : vector<17xi32> +// CHECK: %[[mask_b:.*]] = arith.cmpi slt(%[[linearIndex_b]], +// CHECK-SAME: %[[boundVect_b]]) : vector<17xi32> // // 4. Bitcast to vector form. // CHECK: %[[gep_b:.*]] = llvm.getelementptr {{.*}} : @@ -1617,7 +1617,7 @@ // CHECK: %[[btrunc:.*]] = arith.index_cast %[[BOUND]] : index to i32 // CHECK: %[[boundVecInsert:.*]] = llvm.insertelement %[[btrunc]] // CHECK: %[[boundVect:.*]] = llvm.shufflevector %[[boundVecInsert]] -// CHECK: %[[mask:.*]] = arith.cmpi slt, %[[linearIndex]], %[[boundVect]] +// CHECK: %[[mask:.*]] = arith.cmpi slt(%[[linearIndex]], %[[boundVect]]) // ----- @@ -1754,7 +1754,7 @@ // CHECK: %[[arg_i32:.*]] = arith.index_cast %[[arg]] : index to i32 // CHECK: %[[bounds:.*]] = llvm.insertelement %[[arg_i32]] // CHECK: %[[boundsCast:.*]] = builtin.unrealized_conversion_cast %[[bounds]] : vector<1xi32> to vector -// CHECK: %[[result:.*]] = arith.cmpi slt, %[[indices]], %[[boundsCast]] : vector +// CHECK: %[[result:.*]] = arith.cmpi slt(%[[indices]], %[[boundsCast]]) : vector // CHECK: return %[[result]] : vector // ----- @@ -1770,7 +1770,7 @@ // CHECK: %[[arg_i32:.*]] = arith.index_cast %[[arg]] : index to i32 // CHECK: %[[boundsInsert:.*]] = llvm.insertelement %[[arg_i32]] // CHECK: %[[bounds:.*]] = llvm.shufflevector %[[boundsInsert]] -// CHECK: %[[result:.*]] = arith.cmpi slt, %[[indices]], %[[bounds]] : vector<4xi32> +// CHECK: %[[result:.*]] = arith.cmpi slt(%[[indices]], %[[bounds]]) : vector<4xi32> // CHECK: return %[[result]] : vector<4xi1> // ----- @@ -1786,7 +1786,7 @@ // CHECK: %[[arg_i32:.*]] = arith.index_cast %[[arg]] : index to i32 // CHECK: %[[boundsInsert:.*]] = llvm.insertelement %[[arg_i32]], {{.*}} : vector<[4]xi32> // CHECK: %[[bounds:.*]] = llvm.shufflevector %[[boundsInsert]], {{.*}} : vector<[4]xi32> -// CHECK: %[[result:.*]] = arith.cmpi slt, %[[indices]], %[[bounds]] : vector<[4]xi32> +// CHECK: %[[result:.*]] = arith.cmpi slt(%[[indices]], %[[bounds]]) : vector<[4]xi32> // CHECK: return %[[result]] : vector<[4]xi1> // ----- diff --git a/mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir b/mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir --- a/mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir +++ b/mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir @@ -234,7 +234,7 @@ // CHECK: scf.for %[[I:.*]] = %[[C0]] to %[[C3]] // CHECK: %[[dim:.*]] = memref.dim %[[A]], %[[C0]] : memref // CHECK: %[[add:.*]] = affine.apply #[[$MAP0]](%[[I]])[%[[base]]] - // CHECK: %[[cond1:.*]] = arith.cmpi sgt, %[[dim]], %[[add]] : index + // CHECK: %[[cond1:.*]] = arith.cmpi sgt(%[[dim]], %[[add]]) : index // CHECK: scf.if %[[cond1]] { // CHECK: %[[vec_1d:.*]] = vector.transfer_read %[[A]][%{{.*}}, %[[base]]], %[[C7]] : memref, vector<15xf32> // CHECK: memref.store %[[vec_1d]], %[[alloc_casted]][%[[I]]] : memref<3xvector<15xf32>> @@ -248,7 +248,7 @@ // FULL-UNROLL-DAG: %[[VEC0:.*]] = arith.constant dense<7.000000e+00> : vector<3x15xf32> // FULL-UNROLL-DAG: %[[C0:.*]] = arith.constant 0 : index // FULL-UNROLL: %[[DIM:.*]] = memref.dim %[[A]], %[[C0]] : memref - // FULL-UNROLL: cmpi sgt, %[[DIM]], %[[base]] : index + // FULL-UNROLL: arith.cmpi sgt(%[[DIM]], %[[base]]) : index // FULL-UNROLL: %[[VEC1:.*]] = scf.if %{{.*}} -> (vector<3x15xf32>) { // FULL-UNROLL: vector.transfer_read %[[A]][%[[base]], %[[base]]], %[[C7]] : memref, vector<15xf32> // FULL-UNROLL: vector.insert %{{.*}}, %[[VEC0]] [0] : vector<15xf32> into vector<3x15xf32> @@ -257,7 +257,7 @@ // FULL-UNROLL: scf.yield %{{.*}} : vector<3x15xf32> // FULL-UNROLL: } // FULL-UNROLL: affine.apply #[[$MAP1]]()[%[[base]]] - // FULL-UNROLL: cmpi sgt, %{{.*}}, %{{.*}} : index + // FULL-UNROLL: arith.cmpi sgt(%{{.*}}, %{{.*}}) : index // FULL-UNROLL: %[[VEC2:.*]] = scf.if %{{.*}} -> (vector<3x15xf32>) { // FULL-UNROLL: vector.transfer_read %[[A]][%{{.*}}, %[[base]]], %[[C7]] : memref, vector<15xf32> // FULL-UNROLL: vector.insert %{{.*}}, %[[VEC1]] [1] : vector<15xf32> into vector<3x15xf32> @@ -266,7 +266,7 @@ // FULL-UNROLL: scf.yield %{{.*}} : vector<3x15xf32> // FULL-UNROLL: } // FULL-UNROLL: affine.apply #[[$MAP2]]()[%[[base]]] - // FULL-UNROLL: cmpi sgt, %{{.*}}, %{{.*}} : index + // FULL-UNROLL: arith.cmpi sgt(%{{.*}}, %{{.*}}) : index // FULL-UNROLL: %[[VEC3:.*]] = scf.if %{{.*}} -> (vector<3x15xf32>) { // FULL-UNROLL: vector.transfer_read %[[A]][%{{.*}}, %[[base]]], %[[C7]] : memref, vector<15xf32> // FULL-UNROLL: vector.insert %{{.*}}, %[[VEC2]] [2] : vector<15xf32> into vector<3x15xf32> @@ -306,7 +306,7 @@ // CHECK: scf.for %[[I:.*]] = %[[C0]] to %[[C3]] // CHECK: %[[dim:.*]] = memref.dim %[[A]], %[[C0]] : memref // CHECK: %[[add:.*]] = affine.apply #[[$MAP0]](%[[I]])[%[[base]]] - // CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[dim]], %[[add]] : index + // CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[dim]], %[[add]]) : index // CHECK: scf.if %[[cmp]] { // CHECK: %[[vec_1d:.*]] = memref.load %[[vmemref]][%[[I]]] : memref<3xvector<15xf32>> // CHECK: vector.transfer_write %[[vec_1d]], %[[A]][{{.*}}, %[[base]]] : vector<15xf32>, memref @@ -315,19 +315,19 @@ // FULL-UNROLL: %[[C0:.*]] = arith.constant 0 : index // FULL-UNROLL: %[[DIM:.*]] = memref.dim %[[A]], %[[C0]] : memref - // FULL-UNROLL: %[[CMP0:.*]] = arith.cmpi sgt, %[[DIM]], %[[base]] : index + // FULL-UNROLL: %[[CMP0:.*]] = arith.cmpi sgt(%[[DIM]], %[[base]]) : index // FULL-UNROLL: scf.if %[[CMP0]] { // FULL-UNROLL: %[[V0:.*]] = vector.extract %[[vec]][0] : vector<3x15xf32> // FULL-UNROLL: vector.transfer_write %[[V0]], %[[A]][%[[base]], %[[base]]] : vector<15xf32>, memref // FULL-UNROLL: } // FULL-UNROLL: %[[I1:.*]] = affine.apply #[[$MAP1]]()[%[[base]]] - // FULL-UNROLL: %[[CMP1:.*]] = arith.cmpi sgt, %{{.*}}, %[[I1]] : index + // FULL-UNROLL: %[[CMP1:.*]] = arith.cmpi sgt(%{{.*}}, %[[I1]]) : index // FULL-UNROLL: scf.if %[[CMP1]] { // FULL-UNROLL: %[[V1:.*]] = vector.extract %[[vec]][1] : vector<3x15xf32> // FULL-UNROLL: vector.transfer_write %[[V1]], %[[A]][%{{.*}}, %[[base]]] : vector<15xf32>, memref // FULL-UNROLL: } // FULL-UNROLL: %[[I2:.*]] = affine.apply #[[$MAP2]]()[%[[base]]] - // FULL-UNROLL: %[[CMP2:.*]] = arith.cmpi sgt, %{{.*}}, %[[I2]] : index + // FULL-UNROLL: %[[CMP2:.*]] = arith.cmpi sgt(%{{.*}}, %[[I2]]) : index // FULL-UNROLL: scf.if %[[CMP2]] { // FULL-UNROLL: %[[V2:.*]] = vector.extract %[[vec]][2] : vector<3x15xf32> // FULL-UNROLL: vector.transfer_write %[[V2]], %[[A]][%{{.*}}, %[[base]]] : vector<15xf32>, memref @@ -416,7 +416,7 @@ // CHECK: %[[cast:.*]] = vector.type_cast %[[m]] : memref> to memref<3xvector<3xf32>> // CHECK: scf.for %[[arg1:.*]] = %[[c0]] to %[[c3]] // CHECK: %[[d:.*]] = memref.dim %[[A]], %[[c2]] : memref -// CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[d]], %[[arg1]] : index +// CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[d]], %[[arg1]]) : index // CHECK: scf.if %[[cmp]] { // CHECK: %[[tr:.*]] = vector.transfer_read %[[A]][%c0, %c0, %[[arg1]], %c0], %[[f0]] : memref, vector<3xf32> // CHECK: memref.store %[[tr]], %[[cast]][%[[arg1]]] : memref<3xvector<3xf32>> @@ -448,7 +448,7 @@ // CHECK: %[[cast:.*]] = vector.type_cast %[[m]] : memref> to memref<3xvector<3xf32>> // CHECK: scf.for %[[arg2:.*]] = %[[c0]] to %[[c3]] // CHECK: %[[d:.*]] = memref.dim %[[B]], %[[c2]] : memref -// CHECK: %[[cmp:.*]] = arith.cmpi sgt, %[[d]], %[[arg2]] : index +// CHECK: %[[cmp:.*]] = arith.cmpi sgt(%[[d]], %[[arg2]]) : index // CHECK: scf.if %[[cmp]] { // CHECK: %[[tmp:.*]] = memref.load %[[cast]][%[[arg2]]] : memref<3xvector<3xf32>> // CHECK: vector.transfer_write %[[tmp]], %[[B]][%[[c0]], %[[c0]], %[[arg2]], %[[c0]]] : vector<3xf32>, memref diff --git a/mlir/test/Dialect/Affine/parallelize.mlir b/mlir/test/Dialect/Affine/parallelize.mlir --- a/mlir/test/Dialect/Affine/parallelize.mlir +++ b/mlir/test/Dialect/Affine/parallelize.mlir @@ -26,7 +26,7 @@ affine.for %arg7 = 0 to 1 { %2 = affine.load %0[%arg0, %arg1, %arg2, %arg3] : memref<1x8x8x64xf32> %3 = affine.load %1[%arg0 + %arg4, %arg1 * 2 + %arg5, %arg2 * 2 + %arg6, %arg3 + %arg7] : memref<1x18x18x64xf32> - %4 = arith.cmpf ogt, %2, %3 : f32 + %4 = arith.cmpf ogt(%2, %3) : f32 %5 = arith.select %4, %2, %3 : f32 affine.store %5, %0[%arg0, %arg1, %arg2, %arg3] : memref<1x8x8x64xf32> } @@ -62,7 +62,7 @@ // CHECK: affine.parallel (%[[a7:.*]]) = (0) to (1) { // CHECK: %[[lhs:.*]] = affine.load %[[v0]][%[[a0]], %[[a1]], %[[a2]], %[[a3]]] : memref<1x8x8x64xf32> // CHECK: %[[rhs:.*]] = affine.load %[[v1]][%[[a0]] + %[[a4]], %[[a1]] * 2 + %[[a5]], %[[a2]] * 2 + %[[a6]], %[[a3]] + %[[a7]]] : memref<1x18x18x64xf32> -// CHECK: %[[res:.*]] = arith.cmpf ogt, %[[lhs]], %[[rhs]] : f32 +// CHECK: %[[res:.*]] = arith.cmpf ogt(%[[lhs]], %[[rhs]]) : f32 // CHECK: %[[sel:.*]] = arith.select %[[res]], %[[lhs]], %[[rhs]] : f32 // CHECK: affine.store %[[sel]], %[[v0]][%[[a0]], %[[a1]], %[[a2]], %[[a3]]] : memref<1x8x8x64xf32> // CHECK: } diff --git a/mlir/test/Dialect/Arithmetic/canonicalize.mlir b/mlir/test/Dialect/Arithmetic/canonicalize.mlir --- a/mlir/test/Dialect/Arithmetic/canonicalize.mlir +++ b/mlir/test/Dialect/Arithmetic/canonicalize.mlir @@ -10,7 +10,7 @@ // CHECK-LABEL: @select_cmp_eq_select // CHECK: return %arg1 func.func @select_cmp_eq_select(%arg0: i64, %arg1: i64) -> i64 { - %0 = arith.cmpi eq, %arg0, %arg1 : i64 + %0 = arith.cmpi eq(%arg0, %arg1) : i64 %1 = arith.select %0, %arg0, %arg1 : i64 return %1 : i64 } @@ -18,7 +18,7 @@ // CHECK-LABEL: @select_cmp_ne_select // CHECK: return %arg0 func.func @select_cmp_ne_select(%arg0: i64, %arg1: i64) -> i64 { - %0 = arith.cmpi ne, %arg0, %arg1 : i64 + %0 = arith.cmpi ne(%arg0, %arg1) : i64 %1 = arith.select %0, %arg0, %arg1 : i64 return %1 : i64 } @@ -85,16 +85,16 @@ // CHECK-SAME: %[[F]], %[[F]], %[[F]], %[[F]], %[[F]] func.func @cmpi_equal_operands(%arg0: i64) -> (i1, i1, i1, i1, i1, i1, i1, i1, i1, i1) { - %0 = arith.cmpi eq, %arg0, %arg0 : i64 - %1 = arith.cmpi sle, %arg0, %arg0 : i64 - %2 = arith.cmpi sge, %arg0, %arg0 : i64 - %3 = arith.cmpi ule, %arg0, %arg0 : i64 - %4 = arith.cmpi uge, %arg0, %arg0 : i64 - %5 = arith.cmpi ne, %arg0, %arg0 : i64 - %6 = arith.cmpi slt, %arg0, %arg0 : i64 - %7 = arith.cmpi sgt, %arg0, %arg0 : i64 - %8 = arith.cmpi ult, %arg0, %arg0 : i64 - %9 = arith.cmpi ugt, %arg0, %arg0 : i64 + %0 = arith.cmpi eq(%arg0, %arg0) : i64 + %1 = arith.cmpi sle(%arg0, %arg0) : i64 + %2 = arith.cmpi sge(%arg0, %arg0) : i64 + %3 = arith.cmpi ule(%arg0, %arg0) : i64 + %4 = arith.cmpi uge(%arg0, %arg0) : i64 + %5 = arith.cmpi ne(%arg0, %arg0) : i64 + %6 = arith.cmpi slt(%arg0, %arg0) : i64 + %7 = arith.cmpi sgt(%arg0, %arg0) : i64 + %8 = arith.cmpi ult(%arg0, %arg0) : i64 + %9 = arith.cmpi ugt(%arg0, %arg0) : i64 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } @@ -109,16 +109,16 @@ -> (vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>) { - %0 = arith.cmpi eq, %arg0, %arg0 : vector<1x8xi64> - %1 = arith.cmpi sle, %arg0, %arg0 : vector<1x8xi64> - %2 = arith.cmpi sge, %arg0, %arg0 : vector<1x8xi64> - %3 = arith.cmpi ule, %arg0, %arg0 : vector<1x8xi64> - %4 = arith.cmpi uge, %arg0, %arg0 : vector<1x8xi64> - %5 = arith.cmpi ne, %arg0, %arg0 : vector<1x8xi64> - %6 = arith.cmpi slt, %arg0, %arg0 : vector<1x8xi64> - %7 = arith.cmpi sgt, %arg0, %arg0 : vector<1x8xi64> - %8 = arith.cmpi ult, %arg0, %arg0 : vector<1x8xi64> - %9 = arith.cmpi ugt, %arg0, %arg0 : vector<1x8xi64> + %0 = arith.cmpi eq(%arg0, %arg0) : vector<1x8xi64> + %1 = arith.cmpi sle(%arg0, %arg0) : vector<1x8xi64> + %2 = arith.cmpi sge(%arg0, %arg0) : vector<1x8xi64> + %3 = arith.cmpi ule(%arg0, %arg0) : vector<1x8xi64> + %4 = arith.cmpi uge(%arg0, %arg0) : vector<1x8xi64> + %5 = arith.cmpi ne(%arg0, %arg0) : vector<1x8xi64> + %6 = arith.cmpi slt(%arg0, %arg0) : vector<1x8xi64> + %7 = arith.cmpi sgt(%arg0, %arg0) : vector<1x8xi64> + %8 = arith.cmpi ult(%arg0, %arg0) : vector<1x8xi64> + %9 = arith.cmpi ugt(%arg0, %arg0) : vector<1x8xi64> return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9 : vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, vector<1x8xi1>, @@ -131,31 +131,31 @@ // CHECK-LABEL: @cmpi_const_right( // CHECK-SAME: %[[ARG:.*]]: // CHECK: %[[C:.*]] = arith.constant 1 : i64 -// CHECK: %[[R0:.*]] = arith.cmpi eq, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R1:.*]] = arith.cmpi sge, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R2:.*]] = arith.cmpi sle, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R3:.*]] = arith.cmpi uge, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R4:.*]] = arith.cmpi ule, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R5:.*]] = arith.cmpi ne, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R6:.*]] = arith.cmpi sgt, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R7:.*]] = arith.cmpi slt, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R8:.*]] = arith.cmpi ugt, %[[ARG]], %[[C]] : i64 -// CHECK: %[[R9:.*]] = arith.cmpi ult, %[[ARG]], %[[C]] : i64 +// CHECK: %[[R0:.*]] = arith.cmpi eq(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R1:.*]] = arith.cmpi sge(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R2:.*]] = arith.cmpi sle(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R3:.*]] = arith.cmpi uge(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R4:.*]] = arith.cmpi ule(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R5:.*]] = arith.cmpi ne(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R6:.*]] = arith.cmpi sgt(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R7:.*]] = arith.cmpi slt(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R8:.*]] = arith.cmpi ugt(%[[ARG]], %[[C]]) : i64 +// CHECK: %[[R9:.*]] = arith.cmpi ult(%[[ARG]], %[[C]]) : i64 // CHECK: return %[[R0]], %[[R1]], %[[R2]], %[[R3]], %[[R4]], // CHECK-SAME: %[[R5]], %[[R6]], %[[R7]], %[[R8]], %[[R9]] func.func @cmpi_const_right(%arg0: i64) -> (i1, i1, i1, i1, i1, i1, i1, i1, i1, i1) { %c1 = arith.constant 1 : i64 - %0 = arith.cmpi eq, %c1, %arg0 : i64 - %1 = arith.cmpi sle, %c1, %arg0 : i64 - %2 = arith.cmpi sge, %c1, %arg0 : i64 - %3 = arith.cmpi ule, %c1, %arg0 : i64 - %4 = arith.cmpi uge, %c1, %arg0 : i64 - %5 = arith.cmpi ne, %c1, %arg0 : i64 - %6 = arith.cmpi slt, %c1, %arg0 : i64 - %7 = arith.cmpi sgt, %c1, %arg0 : i64 - %8 = arith.cmpi ult, %c1, %arg0 : i64 - %9 = arith.cmpi ugt, %c1, %arg0 : i64 + %0 = arith.cmpi eq(%c1, %arg0) : i64 + %1 = arith.cmpi sle(%c1, %arg0) : i64 + %2 = arith.cmpi sge(%c1, %arg0) : i64 + %3 = arith.cmpi ule(%c1, %arg0) : i64 + %4 = arith.cmpi uge(%c1, %arg0) : i64 + %5 = arith.cmpi ne(%c1, %arg0) : i64 + %6 = arith.cmpi slt(%c1, %arg0) : i64 + %7 = arith.cmpi sgt(%c1, %arg0) : i64 + %8 = arith.cmpi ult(%c1, %arg0) : i64 + %9 = arith.cmpi ugt(%c1, %arg0) : i64 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } @@ -167,7 +167,7 @@ func.func @cmpOfExtSI(%arg0: i1) -> i1 { %ext = arith.extsi %arg0 : i1 to i64 %c0 = arith.constant 0 : i64 - %res = arith.cmpi ne, %ext, %c0 : i64 + %res = arith.cmpi ne(%ext, %c0) : i64 return %res : i1 } @@ -176,7 +176,7 @@ func.func @cmpOfExtUI(%arg0: i1) -> i1 { %ext = arith.extui %arg0 : i1 to i64 %c0 = arith.constant 0 : i64 - %res = arith.cmpi ne, %ext, %c0 : i64 + %res = arith.cmpi ne(%ext, %c0) : i64 return %res : i1 } @@ -212,42 +212,42 @@ // ----- // CHECK-LABEL: @cmpIExtSINE -// CHECK: %[[comb:.+]] = arith.cmpi ne, %arg0, %arg1 : i8 +// CHECK: %[[comb:.+]] = arith.cmpi ne(%arg0, %arg1) : i8 // CHECK: return %[[comb]] func.func @cmpIExtSINE(%arg0: i8, %arg1: i8) -> i1 { %ext0 = arith.extsi %arg0 : i8 to i64 %ext1 = arith.extsi %arg1 : i8 to i64 - %res = arith.cmpi ne, %ext0, %ext1 : i64 + %res = arith.cmpi ne(%ext0, %ext1) : i64 return %res : i1 } // CHECK-LABEL: @cmpIExtSIEQ -// CHECK: %[[comb:.+]] = arith.cmpi eq, %arg0, %arg1 : i8 +// CHECK: %[[comb:.+]] = arith.cmpi eq(%arg0, %arg1) : i8 // CHECK: return %[[comb]] func.func @cmpIExtSIEQ(%arg0: i8, %arg1: i8) -> i1 { %ext0 = arith.extsi %arg0 : i8 to i64 %ext1 = arith.extsi %arg1 : i8 to i64 - %res = arith.cmpi eq, %ext0, %ext1 : i64 + %res = arith.cmpi eq(%ext0, %ext1) : i64 return %res : i1 } // CHECK-LABEL: @cmpIExtUINE -// CHECK: %[[comb:.+]] = arith.cmpi ne, %arg0, %arg1 : i8 +// CHECK: %[[comb:.+]] = arith.cmpi ne(%arg0, %arg1) : i8 // CHECK: return %[[comb]] func.func @cmpIExtUINE(%arg0: i8, %arg1: i8) -> i1 { %ext0 = arith.extui %arg0 : i8 to i64 %ext1 = arith.extui %arg1 : i8 to i64 - %res = arith.cmpi ne, %ext0, %ext1 : i64 + %res = arith.cmpi ne(%ext0, %ext1) : i64 return %res : i1 } // CHECK-LABEL: @cmpIExtUIEQ -// CHECK: %[[comb:.+]] = arith.cmpi eq, %arg0, %arg1 : i8 +// CHECK: %[[comb:.+]] = arith.cmpi eq(%arg0, %arg1) : i8 // CHECK: return %[[comb]] func.func @cmpIExtUIEQ(%arg0: i8, %arg1: i8) -> i1 { %ext0 = arith.extui %arg0 : i8 to i64 %ext1 = arith.extui %arg1 : i8 to i64 - %res = arith.cmpi eq, %ext0, %ext1 : i64 + %res = arith.cmpi eq(%ext0, %ext1) : i64 return %res : i1 } @@ -626,111 +626,111 @@ } // CHECK-LABEL: @notCmpEQ -// CHECK: %[[cres:.+]] = arith.cmpi ne, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi ne(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpEQ(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "eq", %arg0, %arg1 : i8 + %cmp = arith.cmpi eq(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpEQ2 -// CHECK: %[[cres:.+]] = arith.cmpi ne, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi ne(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpEQ2(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "eq", %arg0, %arg1 : i8 + %cmp = arith.cmpi eq(%arg0, %arg1) : i8 %ncmp = arith.xori %true, %cmp : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpNE -// CHECK: %[[cres:.+]] = arith.cmpi eq, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi eq(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpNE(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "ne", %arg0, %arg1 : i8 + %cmp = arith.cmpi ne(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpSLT -// CHECK: %[[cres:.+]] = arith.cmpi sge, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi sge(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpSLT(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "slt", %arg0, %arg1 : i8 + %cmp = arith.cmpi slt(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpSLE -// CHECK: %[[cres:.+]] = arith.cmpi sgt, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi sgt(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpSLE(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "sle", %arg0, %arg1 : i8 + %cmp = arith.cmpi sle(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpSGT -// CHECK: %[[cres:.+]] = arith.cmpi sle, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi sle(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpSGT(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "sgt", %arg0, %arg1 : i8 + %cmp = arith.cmpi sgt(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpSGE -// CHECK: %[[cres:.+]] = arith.cmpi slt, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi slt(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpSGE(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "sge", %arg0, %arg1 : i8 + %cmp = arith.cmpi sge(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpULT -// CHECK: %[[cres:.+]] = arith.cmpi uge, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi uge(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpULT(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "ult", %arg0, %arg1 : i8 + %cmp = arith.cmpi ult(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpULE -// CHECK: %[[cres:.+]] = arith.cmpi ugt, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi ugt(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpULE(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "ule", %arg0, %arg1 : i8 + %cmp = arith.cmpi ule(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpUGT -// CHECK: %[[cres:.+]] = arith.cmpi ule, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi ule(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpUGT(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "ugt", %arg0, %arg1 : i8 + %cmp = arith.cmpi ugt(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } // CHECK-LABEL: @notCmpUGE -// CHECK: %[[cres:.+]] = arith.cmpi ult, %arg0, %arg1 : i8 +// CHECK: %[[cres:.+]] = arith.cmpi ult(%arg0, %arg1) : i8 // CHECK: return %[[cres]] func.func @notCmpUGE(%arg0: i8, %arg1: i8) -> i1 { %true = arith.constant true - %cmp = arith.cmpi "uge", %arg0, %arg1 : i8 + %cmp = arith.cmpi uge(%arg0, %arg1) : i8 %ncmp = arith.xori %cmp, %true : i1 return %ncmp : i1 } @@ -1105,10 +1105,10 @@ // CHECK-DAG: %[[F:.*]] = arith.constant false // CHECK: return %[[F]], %[[F]], %[[T]], %[[T]] %nan = arith.constant 0x7fffffff : f32 - %0 = arith.cmpf olt, %nan, %arg0 : f32 - %1 = arith.cmpf olt, %arg0, %nan : f32 - %2 = arith.cmpf ugt, %nan, %arg0 : f32 - %3 = arith.cmpf ugt, %arg0, %nan : f32 + %0 = arith.cmpf olt(%nan, %arg0) : f32 + %1 = arith.cmpf olt(%arg0, %nan) : f32 + %2 = arith.cmpf ugt(%nan, %arg0) : f32 + %3 = arith.cmpf ugt(%arg0, %nan) : f32 return %0, %1, %2, %3 : i1, i1, i1, i1 } @@ -1261,9 +1261,9 @@ func.func @test1(%arg0: i32) -> i1 { %cst = arith.constant 0.000000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf ole, %1, %cst : f64 + %2 = arith.cmpf ole(%1, %cst) : f64 // CHECK: %[[c0:.+]] = arith.constant 0 : i32 - // CHECK: arith.cmpi ule, %[[arg0]], %[[c0]] : i32 + // CHECK: arith.cmpi ule(%[[arg0]], %[[c0]]) : i32 return %2 : i1 } @@ -1272,10 +1272,10 @@ func.func @test2(%arg0: i32) -> i1 { %cst = arith.constant 0.000000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf olt, %1, %cst : f64 + %2 = arith.cmpf olt(%1, %cst) : f64 return %2 : i1 // CHECK: %[[c0:.+]] = arith.constant 0 : i32 - // CHECK: arith.cmpi ult, %[[arg0]], %[[c0]] : i32 + // CHECK: arith.cmpi ult(%[[arg0]], %[[c0]]) : i32 } // CHECK-LABEL: @test3( @@ -1283,10 +1283,10 @@ func.func @test3(%arg0: i32) -> i1 { %cst = arith.constant 0.000000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf oge, %1, %cst : f64 + %2 = arith.cmpf oge(%1, %cst) : f64 return %2 : i1 // CHECK: %[[c0:.+]] = arith.constant 0 : i32 - // CHECK: arith.cmpi uge, %[[arg0]], %[[c0]] : i32 + // CHECK: arith.cmpi uge(%[[arg0]], %[[c0]]) : i32 } // CHECK-LABEL: @test4( @@ -1294,9 +1294,9 @@ func.func @test4(%arg0: i32) -> i1 { %cst = arith.constant 0.000000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf ogt, %1, %cst : f64 + %2 = arith.cmpf ogt(%1, %cst) : f64 // CHECK: %[[c0:.+]] = arith.constant 0 : i32 - // CHECK: arith.cmpi ugt, %[[arg0]], %[[c0]] : i32 + // CHECK: arith.cmpi ugt(%[[arg0]], %[[c0]]) : i32 return %2 : i1 } @@ -1304,7 +1304,7 @@ func.func @test5(%arg0: i32) -> i1 { %cst = arith.constant -4.400000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf ogt, %1, %cst : f64 + %2 = arith.cmpf ogt(%1, %cst) : f64 return %2 : i1 // CHECK: %[[true:.+]] = arith.constant true // CHECK: return %[[true]] : i1 @@ -1314,7 +1314,7 @@ func.func @test6(%arg0: i32) -> i1 { %cst = arith.constant -4.400000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf olt, %1, %cst : f64 + %2 = arith.cmpf olt(%1, %cst) : f64 return %2 : i1 // CHECK: %[[false:.+]] = arith.constant false // CHECK: return %[[false]] : i1 @@ -1327,10 +1327,10 @@ func.func @test7(%arg0: i32) -> i1 { %cst = arith.constant 3.200000e+00 : f64 %1 = arith.uitofp %arg0: i32 to f64 - %2 = arith.cmpf oge, %1, %cst : f64 + %2 = arith.cmpf oge(%1, %cst) : f64 return %2 : i1 // CHECK: %[[c3:.+]] = arith.constant 3 : i32 - // CHECK: arith.cmpi ugt, %[[arg0]], %[[c3]] : i32 + // CHECK: arith.cmpi ugt(%[[arg0]], %[[c3]]) : i32 } // ----- diff --git a/mlir/test/Dialect/Arithmetic/expand-ops.mlir b/mlir/test/Dialect/Arithmetic/expand-ops.mlir --- a/mlir/test/Dialect/Arithmetic/expand-ops.mlir +++ b/mlir/test/Dialect/Arithmetic/expand-ops.mlir @@ -10,7 +10,7 @@ // CHECK: [[ONE:%.+]] = arith.constant 1 : i32 // CHECK: [[ZERO:%.+]] = arith.constant 0 : i32 // CHECK: [[MINONE:%.+]] = arith.constant -1 : i32 -// CHECK: [[CMP1:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : i32 +// CHECK: [[CMP1:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : i32 // CHECK: [[X:%.+]] = arith.select [[CMP1]], [[MINONE]], [[ONE]] : i32 // CHECK: [[TRUE1:%.+]] = arith.addi [[X]], [[ARG0]] : i32 // CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : i32 @@ -18,10 +18,10 @@ // CHECK: [[FALSE1:%.+]] = arith.subi [[ZERO]], [[ARG0]] : i32 // CHECK: [[FALSE2:%.+]] = arith.divsi [[FALSE1]], [[ARG1]] : i32 // CHECK: [[FALSE3:%.+]] = arith.subi [[ZERO]], [[FALSE2]] : i32 -// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : i32 -// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : i32 -// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : i32 -// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : i32 +// CHECK: [[NNEG:%.+]] = arith.cmpi slt([[ARG0]], [[ZERO]]) : i32 +// CHECK: [[NPOS:%.+]] = arith.cmpi sgt([[ARG0]], [[ZERO]]) : i32 +// CHECK: [[MNEG:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : i32 +// CHECK: [[MPOS:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : i32 // CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MNEG]] : i1 // CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MPOS]] : i1 // CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1 @@ -40,7 +40,7 @@ // CHECK: [[ONE:%.+]] = arith.constant 1 : index // CHECK: [[ZERO:%.+]] = arith.constant 0 : index // CHECK: [[MINONE:%.+]] = arith.constant -1 : index -// CHECK: [[CMP1:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : index +// CHECK: [[CMP1:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : index // CHECK: [[X:%.+]] = arith.select [[CMP1]], [[MINONE]], [[ONE]] : index // CHECK: [[TRUE1:%.+]] = arith.addi [[X]], [[ARG0]] : index // CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : index @@ -48,10 +48,10 @@ // CHECK: [[FALSE1:%.+]] = arith.subi [[ZERO]], [[ARG0]] : index // CHECK: [[FALSE2:%.+]] = arith.divsi [[FALSE1]], [[ARG1]] : index // CHECK: [[FALSE3:%.+]] = arith.subi [[ZERO]], [[FALSE2]] : index -// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : index -// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : index -// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : index -// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : index +// CHECK: [[NNEG:%.+]] = arith.cmpi slt([[ARG0]], [[ZERO]]) : index +// CHECK: [[NPOS:%.+]] = arith.cmpi sgt([[ARG0]], [[ZERO]]) : index +// CHECK: [[MNEG:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : index +// CHECK: [[MPOS:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : index // CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MNEG]] : i1 // CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MPOS]] : i1 // CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1 @@ -69,16 +69,16 @@ // CHECK: [[ONE:%.+]] = arith.constant 1 : i32 // CHECK: [[ZERO:%.+]] = arith.constant 0 : i32 // CHECK: [[MIN1:%.+]] = arith.constant -1 : i32 -// CHECK: [[CMP1:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : i32 +// CHECK: [[CMP1:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : i32 // CHECK: [[X:%.+]] = arith.select [[CMP1]], [[ONE]], [[MIN1]] : i32 // CHECK: [[TRUE1:%.+]] = arith.subi [[X]], [[ARG0]] : i32 // CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : i32 // CHECK: [[TRUE3:%.+]] = arith.subi [[MIN1]], [[TRUE2]] : i32 // CHECK: [[FALSE:%.+]] = arith.divsi [[ARG0]], [[ARG1]] : i32 -// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : i32 -// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : i32 -// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : i32 -// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : i32 +// CHECK: [[NNEG:%.+]] = arith.cmpi slt([[ARG0]], [[ZERO]]) : i32 +// CHECK: [[NPOS:%.+]] = arith.cmpi sgt([[ARG0]], [[ZERO]]) : i32 +// CHECK: [[MNEG:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : i32 +// CHECK: [[MPOS:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : i32 // CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MPOS]] : i1 // CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MNEG]] : i1 // CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1 @@ -96,16 +96,16 @@ // CHECK: [[ONE:%.+]] = arith.constant 1 : index // CHECK: [[ZERO:%.+]] = arith.constant 0 : index // CHECK: [[MIN1:%.+]] = arith.constant -1 : index -// CHECK: [[CMP1:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : index +// CHECK: [[CMP1:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : index // CHECK: [[X:%.+]] = arith.select [[CMP1]], [[ONE]], [[MIN1]] : index // CHECK: [[TRUE1:%.+]] = arith.subi [[X]], [[ARG0]] : index // CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : index // CHECK: [[TRUE3:%.+]] = arith.subi [[MIN1]], [[TRUE2]] : index // CHECK: [[FALSE:%.+]] = arith.divsi [[ARG0]], [[ARG1]] : index -// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : index -// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : index -// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : index -// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : index +// CHECK: [[NNEG:%.+]] = arith.cmpi slt([[ARG0]], [[ZERO]]) : index +// CHECK: [[NPOS:%.+]] = arith.cmpi sgt([[ARG0]], [[ZERO]]) : index +// CHECK: [[MNEG:%.+]] = arith.cmpi slt([[ARG1]], [[ZERO]]) : index +// CHECK: [[MPOS:%.+]] = arith.cmpi sgt([[ARG1]], [[ZERO]]) : index // CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MPOS]] : i1 // CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MNEG]] : i1 // CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1 @@ -121,7 +121,7 @@ %res = arith.ceildivui %arg0, %arg1 : i32 return %res : i32 // CHECK: [[ZERO:%.+]] = arith.constant 0 : i32 -// CHECK: [[ISZERO:%.+]] = arith.cmpi eq, %arg0, [[ZERO]] : i32 +// CHECK: [[ISZERO:%.+]] = arith.cmpi eq(%arg0, [[ZERO]]) : i32 // CHECK: [[ONE:%.+]] = arith.constant 1 : i32 // CHECK: [[SUB:%.+]] = arith.subi %arg0, [[ONE]] : i32 // CHECK: [[DIV:%.+]] = arith.divui [[SUB]], %arg1 : i32 @@ -138,7 +138,7 @@ %res = arith.ceildivui %arg0, %arg1 : index return %res : index // CHECK: [[ZERO:%.+]] = arith.constant 0 : index -// CHECK: [[ISZERO:%.+]] = arith.cmpi eq, %arg0, [[ZERO]] : index +// CHECK: [[ISZERO:%.+]] = arith.cmpi eq(%arg0, [[ZERO]]) : index // CHECK: [[ONE:%.+]] = arith.constant 1 : index // CHECK: [[SUB:%.+]] = arith.subi %arg0, [[ONE]] : index // CHECK: [[DIV:%.+]] = arith.divui [[SUB]], %arg1 : index @@ -154,9 +154,9 @@ return %result : f32 } // CHECK-SAME: %[[LHS:.*]]: f32, %[[RHS:.*]]: f32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ugt, %[[LHS]], %[[RHS]] : f32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ugt(%[[LHS]], %[[RHS]]) : f32 // CHECK-NEXT: %[[SELECT:.*]] = arith.select %[[CMP]], %[[LHS]], %[[RHS]] : f32 -// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno, %[[RHS]], %[[RHS]] : f32 +// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno(%[[RHS]], %[[RHS]]) : f32 // CHECK-NEXT: %[[RESULT:.*]] = arith.select %[[IS_NAN]], %[[RHS]], %[[SELECT]] : f32 // CHECK-NEXT: return %[[RESULT]] : f32 @@ -168,9 +168,9 @@ return %result : vector<4xf16> } // CHECK-SAME: %[[LHS:.*]]: vector<4xf16>, %[[RHS:.*]]: vector<4xf16>) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ugt, %[[LHS]], %[[RHS]] : vector<4xf16> +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ugt(%[[LHS]], %[[RHS]]) : vector<4xf16> // CHECK-NEXT: %[[SELECT:.*]] = arith.select %[[CMP]], %[[LHS]], %[[RHS]] -// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno, %[[RHS]], %[[RHS]] : vector<4xf16> +// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno(%[[RHS]], %[[RHS]]) : vector<4xf16> // CHECK-NEXT: %[[RESULT:.*]] = arith.select %[[IS_NAN]], %[[RHS]], %[[SELECT]] // CHECK-NEXT: return %[[RESULT]] : vector<4xf16> @@ -182,9 +182,9 @@ return %result : f32 } // CHECK-SAME: %[[LHS:.*]]: f32, %[[RHS:.*]]: f32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ult, %[[LHS]], %[[RHS]] : f32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpf ult(%[[LHS]], %[[RHS]]) : f32 // CHECK-NEXT: %[[SELECT:.*]] = arith.select %[[CMP]], %[[LHS]], %[[RHS]] : f32 -// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno, %[[RHS]], %[[RHS]] : f32 +// CHECK-NEXT: %[[IS_NAN:.*]] = arith.cmpf uno(%[[RHS]], %[[RHS]]) : f32 // CHECK-NEXT: %[[RESULT:.*]] = arith.select %[[IS_NAN]], %[[RHS]], %[[SELECT]] : f32 // CHECK-NEXT: return %[[RESULT]] : f32 @@ -197,7 +197,7 @@ return %result : i32 } // CHECK-SAME: %[[LHS:.*]]: i32, %[[RHS:.*]]: i32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi sgt, %[[LHS]], %[[RHS]] : i32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi sgt(%[[LHS]], %[[RHS]]) : i32 // ----- @@ -207,7 +207,7 @@ return %result : i32 } // CHECK-SAME: %[[LHS:.*]]: i32, %[[RHS:.*]]: i32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi slt, %[[LHS]], %[[RHS]] : i32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi slt(%[[LHS]], %[[RHS]]) : i32 // ----- @@ -218,7 +218,7 @@ return %result : i32 } // CHECK-SAME: %[[LHS:.*]]: i32, %[[RHS:.*]]: i32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi ugt, %[[LHS]], %[[RHS]] : i32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi ugt(%[[LHS]], %[[RHS]]) : i32 // ----- @@ -229,4 +229,4 @@ return %result : i32 } // CHECK-SAME: %[[LHS:.*]]: i32, %[[RHS:.*]]: i32) -// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi ult, %[[LHS]], %[[RHS]] : i32 +// CHECK-NEXT: %[[CMP:.*]] = arith.cmpi ult(%[[LHS]], %[[RHS]]) : i32 diff --git a/mlir/test/Dialect/Arithmetic/int-range-interface.mlir b/mlir/test/Dialect/Arithmetic/int-range-interface.mlir --- a/mlir/test/Dialect/Arithmetic/int-range-interface.mlir +++ b/mlir/test/Dialect/Arithmetic/int-range-interface.mlir @@ -23,8 +23,8 @@ %0 = arith.maxsi %a, %c1 : i32 %1 = arith.maxsi %b, %c1 : i32 %2 = arith.addi %0, %1 : i32 - %3 = arith.cmpi sge, %2, %c2 : i32 - %4 = arith.cmpi uge, %2, %c2 : i32 + %3 = arith.cmpi sge(%2, %c2) : i32 + %4 = arith.cmpi uge(%2, %c2) : i32 %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -40,8 +40,8 @@ %0 = arith.minsi %v, %c2 : i64 %1 = arith.maxsi %0, %c-5 : i64 %2 = arith.subi %1, %c2 : i64 - %3 = arith.cmpi sle, %2, %c0 : i64 - %4 = arith.cmpi ule, %2, %c0 : i64 + %3 = arith.cmpi sle(%2, %c0) : i64 + %4 = arith.cmpi ule(%2, %c0) : i64 %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -61,8 +61,8 @@ %2 = arith.minsi %b, %c_1 : index %3 = arith.maxsi %2, %c_4 : index %4 = arith.muli %1, %3 : index - %5 = arith.cmpi slt, %4, %c_12 : index - %6 = arith.cmpi slt, %c_1, %4 : index + %5 = arith.cmpi slt(%4, %c_12) : index + %6 = arith.cmpi slt(%c_1, %4) : index %7 = arith.ori %5, %6 : i1 func.return %7 : i1 } @@ -78,8 +78,8 @@ %0 = arith.andi %a, %c_mask : i16 %1 = arith.minui %b, %c4 : i16 %2 = arith.muli %0, %1 : i16 - %3 = arith.cmpi uge, %2, %c0 : i16 - %4 = arith.cmpi ule, %2, %c_bound : i16 + %3 = arith.cmpi uge(%2, %c0) : i16 + %4 = arith.cmpi ule(%2, %c_bound) : i16 %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -96,7 +96,7 @@ %10 = arith.addi %arg0, %arg1 : index scf.yield %10 : index } - %1 = arith.cmpi ule, %0, %c16 : index + %1 = arith.cmpi ule(%0, %c16) : index func.return %1 : i1 } @@ -109,7 +109,7 @@ %c4 = arith.constant 4 : index %true = arith.constant true %0 = scf.for %arg0 = %c0 to %c4 step %c1 iter_args(%arg1 = %true) -> i1 { - %10 = arith.cmpi ule, %arg0, %c4 : index + %10 = arith.cmpi ule(%arg0, %c4) : index %11 = arith.andi %10, %arg1 : i1 scf.yield %11 : i1 } @@ -126,7 +126,7 @@ %c2 = arith.constant 2 : index %0 = arith.divui %arg0, %c2 : index %1 = scf.while (%arg1 = %0) : (index) -> index { - %2 = arith.cmpi slt, %arg1, %c0 : index + %2 = arith.cmpi slt(%arg1, %c0) : index scf.condition(%2) %arg1 : index } do { ^bb0(%arg2 : index): @@ -146,10 +146,10 @@ %1 = arith.divsi %c4, %0 : index %2 = arith.divui %c4, %0 : index - %3 = arith.cmpi sge, %1, %c0 : index - %4 = arith.cmpi sle, %1, %c2 : index - %5 = arith.cmpi sge, %2, %c0 : index - %6 = arith.cmpi sle, %1, %c2 : index + %3 = arith.cmpi sge(%1, %c0) : index + %4 = arith.cmpi sle(%1, %c2) : index + %5 = arith.cmpi sge(%2, %c0) : index + %6 = arith.cmpi sle(%1, %c2) : index %7 = arith.andi %3, %4 : i1 %8 = arith.andi %7, %5 : i1 @@ -168,9 +168,9 @@ %1 = arith.divsi %c4, %0 : index %2 = arith.divui %c4, %0 : index - %3 = arith.cmpi sle, %1, %c0 : index - %4 = arith.cmpi sge, %1, %c_2 : index - %5 = arith.cmpi eq, %2, %c0 : index + %3 = arith.cmpi sle(%1, %c0) : index + %4 = arith.cmpi sge(%1, %c_2) : index + %5 = arith.cmpi eq(%2, %c0) : index %7 = arith.andi %3, %4 : i1 %8 = arith.andi %7, %5 : i1 @@ -186,7 +186,7 @@ %c4 = arith.constant 4 : index %0 = arith.andi %arg0, %c1 : index %1 = arith.divui %c4, %0 : index - %2 = arith.cmpi ule, %1, %c4 : index + %2 = arith.cmpi ule(%1, %c4) : index func.return %2 : i1 } @@ -202,11 +202,11 @@ %0 = arith.minui %arg0, %c3 : index %1 = arith.maxui %0, %c1 : index %2 = arith.ceildivui %1, %c4 : index - %3 = arith.cmpi eq, %2, %c1 : index + %3 = arith.cmpi eq(%2, %c1) : index %4 = arith.maxui %0, %c0 : index %5 = arith.ceildivui %4, %c4 : index - %6 = arith.cmpi eq, %5, %c1 : index + %6 = arith.cmpi eq(%5, %c1) : index %7 = arith.andi %3, %6 : i1 func.return %7 : i1 } @@ -224,14 +224,14 @@ %0 = arith.minsi %arg0, %c3 : index %1 = arith.maxsi %0, %c1 : index %2 = arith.ceildivsi %1, %c4 : index - %3 = arith.cmpi eq, %2, %c1 : index + %3 = arith.cmpi eq(%2, %c1) : index %4 = arith.ceildivsi %1, %c-4 : index - %5 = arith.cmpi eq, %4, %c0 : index + %5 = arith.cmpi eq(%4, %c0) : index %6 = arith.andi %3, %5 : i1 %7 = arith.maxsi %0, %c0 : index %8 = arith.ceildivsi %7, %c4 : index - %9 = arith.cmpi eq, %8, %c1 : index + %9 = arith.cmpi eq(%8, %c1) : index %10 = arith.andi %6, %9 : i1 func.return %10 : i1 } @@ -248,7 +248,7 @@ %0 = arith.minsi %arg0, %c-1 : index %1 = arith.maxsi %0, %c-4 : index %2 = arith.floordivsi %1, %c4 : index - %3 = arith.cmpi eq, %2, %c-1 : index + %3 = arith.cmpi eq(%2, %c-1) : index func.return %3 : i1 } @@ -262,7 +262,7 @@ %0 = arith.minui %arg1, %c4 : index %1 = arith.maxui %0, %c2 : index %2 = arith.remui %arg0, %1 : index - %3 = arith.cmpi ult, %2, %c4 : index + %3 = arith.cmpi ult(%2, %c4) : index func.return %3 : i1 } @@ -279,9 +279,9 @@ %0 = arith.minsi %arg1, %c4 : index %1 = arith.maxsi %0, %c2 : index %2 = arith.remsi %arg0, %1 : index - %3 = arith.cmpi sgt, %2, %c-4 : index - %4 = arith.cmpi slt, %2, %c4 : index - %5 = arith.cmpi sge, %2, %c0 : index + %3 = arith.cmpi sgt(%2, %c-4) : index + %4 = arith.cmpi slt(%2, %c4) : index + %5 = arith.cmpi sge(%2, %c0) : index %6 = arith.andi %3, %4 : i1 %7 = arith.andi %5, %6 : i1 func.return %7 : i1 @@ -300,8 +300,8 @@ %1 = arith.maxsi %0, %c2 : index %2 = arith.maxsi %arg0, %c0 : index %3 = arith.remsi %2, %1 : index - %4 = arith.cmpi sge, %3, %c0 : index - %5 = arith.cmpi slt, %3, %c4 : index + %4 = arith.cmpi sge(%3, %c0) : index + %5 = arith.cmpi slt(%3, %c4) : index %6 = arith.andi %4, %5 : i1 func.return %6 : i1 } @@ -317,8 +317,8 @@ %0 = arith.minui %arg0, %c3 : index %1 = arith.maxui %0, %c2 : index %2 = arith.remui %1, %c4 : index - %3 = arith.cmpi ule, %2, %c3 : index - %4 = arith.cmpi uge, %2, %c2 : index + %3 = arith.cmpi ule(%2, %c3) : index + %4 = arith.cmpi uge(%2, %c2) : index %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -334,8 +334,8 @@ %0 = arith.minsi %arg0, %c3 : index %1 = arith.maxsi %0, %c2 : index %2 = arith.remsi %1, %c-4 : index - %3 = arith.cmpi ule, %2, %c3 : index - %4 = arith.cmpi uge, %2, %c2 : index + %3 = arith.cmpi ule(%2, %c3) : index + %4 = arith.cmpi uge(%2, %c2) : index %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -352,7 +352,7 @@ %0 = arith.minui %arg0, %c5 : index %1 = arith.maxui %0, %c3 : index %2 = arith.remui %1, %c4 : index - %3 = arith.cmpi ne, %2, %c2 : index + %3 = arith.cmpi ne(%2, %c2) : index func.return %3 : i1 } @@ -368,7 +368,7 @@ %0 = arith.minsi %arg0, %c5 : index %1 = arith.maxsi %0, %c3 : index %2 = arith.remsi %1, %c-4 : index - %3 = arith.cmpi ne, %2, %c2 : index + %3 = arith.cmpi ne(%2, %c2) : index func.return %3 : i1 } @@ -383,8 +383,8 @@ %0 = arith.minsi %arg0, %c5 : index %1 = arith.maxsi %0, %c2 : index %2 = arith.andi %1, %c7 : index - %3 = arith.cmpi ugt, %2, %c5 : index - %4 = arith.cmpi ule, %2, %c7 : index + %3 = arith.cmpi ugt(%2, %c5) : index + %4 = arith.cmpi ule(%2, %c7) : index %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -397,7 +397,7 @@ %c1 = arith.constant 1 : index %0 = arith.addi %arg0, %c1 : index %1 = arith.andi %arg0, %0 : index - %2 = arith.cmpi sge, %1, %c0 : index + %2 = arith.cmpi sge(%1, %c0) : index func.return %2 : i1 } @@ -411,7 +411,7 @@ %0 = arith.minsi %arg1, %c-1 : i128 %1 = arith.ori %arg0, %0 : i128 - %2 = arith.cmpi slt, %1, %c0 : i128 + %2 = arith.cmpi slt(%1, %c0) : i128 func.return %2 : i1 } @@ -427,7 +427,7 @@ %0 = arith.minui %arg0, %c7 : i64 %1 = arith.minui %arg1, %c15 : i64 %2 = arith.xori %0, %1 : i64 - %3 = arith.cmpi sle, %2, %c15 : i64 + %3 = arith.cmpi sle(%2, %c15) : i64 %4 = arith.xori %3, %true : i1 func.return %4 : i1 } @@ -438,7 +438,7 @@ func.func @extui(%arg0 : i16) -> i1 { %ci16_max = arith.constant 0xffff : i32 %0 = arith.extui %arg0 : i16 to i32 - %1 = arith.cmpi ule, %0, %ci16_max : i32 + %1 = arith.cmpi ule(%0, %ci16_max) : i32 func.return %1 : i1 } @@ -449,8 +449,8 @@ %ci16_smax = arith.constant 0x7fff : i32 %ci16_smin = arith.constant 0xffff8000 : i32 %0 = arith.extsi %arg0 : i16 to i32 - %1 = arith.cmpi sle, %0, %ci16_smax : i32 - %2 = arith.cmpi sge, %0, %ci16_smin : i32 + %1 = arith.cmpi sle(%0, %ci16_smax) : i32 + %2 = arith.cmpi sge(%0, %ci16_smin) : i32 %3 = arith.andi %1, %2 : i1 func.return %3 : i1 } @@ -465,10 +465,10 @@ %0 = arith.minsi %arg0, %c-14_i32 : i32 %1 = arith.maxsi %0, %ci16_smin : i32 %2 = arith.trunci %1 : i32 to i16 - %3 = arith.cmpi sle, %2, %c-14_i16 : i16 + %3 = arith.cmpi sle(%2, %c-14_i16) : i16 %4 = arith.extsi %2 : i16 to i32 - %5 = arith.cmpi sle, %4, %c-14_i32 : i32 - %6 = arith.cmpi sge, %4, %ci16_smin : i32 + %5 = arith.cmpi sle(%4, %c-14_i32) : i32 + %6 = arith.cmpi sge(%4, %ci16_smin) : i32 %7 = arith.andi %3, %5 : i1 %8 = arith.andi %7, %6 : i1 func.return %8 : i1 @@ -482,7 +482,7 @@ %0 = arith.index_cast %arg0 : index to i32 %1 = arith.index_cast %0 : i32 to index %2 = arith.index_cast %ci32_smin : i64 to index - %3 = arith.cmpi sge, %1, %2 : index + %3 = arith.cmpi sge(%1, %2) : index func.return %3 : i1 } @@ -500,9 +500,9 @@ %1 = arith.minsi %0, %c2 : i32 %2 = arith.select %arg1, %c2, %c4 : i32 %3 = arith.shli %1, %2 : i32 - %4 = arith.cmpi sge, %3, %c-16 : i32 - %5 = arith.cmpi sle, %3, %c32 : i32 - %6 = arith.cmpi sgt, %3, %c8 : i32 + %4 = arith.cmpi sge(%3, %c-16) : i32 + %5 = arith.cmpi sle(%3, %c32) : i32 + %6 = arith.cmpi sgt(%3, %c8) : i32 %7 = arith.andi %4, %5 : i1 %8 = arith.andi %7, %6 : i1 func.return %8 : i1 @@ -518,9 +518,9 @@ %c32 = arith.constant 32 : i32 %0 = arith.select %arg0, %c2, %c4 : i32 %1 = arith.shrui %c32, %0 : i32 - %2 = arith.cmpi ule, %1, %c8 : i32 - %3 = arith.cmpi uge, %1, %c2 : i32 - %4 = arith.cmpi uge, %1, %c8 : i32 + %2 = arith.cmpi ule(%1, %c8) : i32 + %3 = arith.cmpi uge(%1, %c2) : i32 + %4 = arith.cmpi uge(%1, %c8) : i32 %5 = arith.andi %2, %3 : i1 %6 = arith.andi %5, %4 : i1 func.return %6 : i1 @@ -540,9 +540,9 @@ %1 = arith.minsi %0, %c32 : i32 %2 = arith.select %arg1, %c2, %c4 : i32 %3 = arith.shrsi %1, %2 : i32 - %4 = arith.cmpi sge, %3, %c-8 : i32 - %5 = arith.cmpi sle, %3, %c8 : i32 - %6 = arith.cmpi slt, %3, %c2 : i32 + %4 = arith.cmpi sge(%3, %c-8) : i32 + %5 = arith.cmpi sle(%3, %c8) : i32 + %6 = arith.cmpi slt(%3, %c2) : i32 %7 = arith.andi %4, %5 : i1 %8 = arith.andi %7, %6 : i1 func.return %8 : i1 @@ -555,7 +555,7 @@ %c1 = arith.constant 1 : index %0 = arith.andi %arg0, %c1 : index %1 = arith.minui %arg0, %c1 : index - %2 = arith.cmpi eq, %0, %1 : index + %2 = arith.cmpi eq(%0, %1) : index func.return %2 : i1 } @@ -571,8 +571,8 @@ %0 = arith.remui %arg0, %c64 : index %1 = arith.addi %0, %c128 : index %2 = arith.select %arg1, %0, %1 : index - %3 = arith.cmpi slt, %2, %c192 : index - %4 = arith.cmpi ne, %c100, %2 : index + %3 = arith.cmpi slt(%2, %c192) : index + %4 = arith.cmpi ne(%c100, %2) : index %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -593,8 +593,8 @@ %20 = arith.muli %0, %c-1 : index scf.yield %20 : index } - %2 = arith.cmpi sle, %1, %c16 : index - %3 = arith.cmpi sge, %1, %c-4 : index + %2 = arith.cmpi sle(%1, %c16) : index + %3 = arith.cmpi sge(%1, %c-4) : index %4 = arith.andi %2, %3 : i1 func.return %4 : i1 } @@ -616,8 +616,8 @@ %2 = arith.muli %0, %c-1 : index cf.br ^bb3(%2 : index) ^bb3(%3 : index) : - %4 = arith.cmpi sle, %3, %c16 : index - %5 = arith.cmpi sge, %3, %c-4 : index + %4 = arith.cmpi sle(%3, %c16) : index + %5 = arith.cmpi sge(%3, %c-4) : index %6 = arith.andi %4, %5 : i1 func.return %6 : i1 } @@ -637,11 +637,11 @@ %2 = arith.addi %1, %c1 : index cf.br ^bb2(%2 : index) ^bb2(%3 : index): - %4 = arith.cmpi ult, %3, %c4 : index + %4 = arith.cmpi ult(%3, %c4) : index cf.cond_br %4, ^bb1(%3 : index), ^bb3(%3 : index) ^bb3(%5 : index) : - %6 = arith.cmpi sge, %5, %c0 : index - %7 = arith.cmpi slt, %5, %c4 : index + %6 = arith.cmpi sge(%5, %c0) : index + %7 = arith.cmpi slt(%5, %c4) : index %8 = arith.andi %6, %7 : i1 func.return %8 : i1 } @@ -676,8 +676,8 @@ %0 = arith.maxui %arg0, %c0_i16 : i16 %1 = arith.minui %0, %c130_i16 : i16 %2 = arith.trunci %1 : i16 to i8 - %3 = arith.cmpi sge, %2, %c0_i8 : i8 - %4 = arith.cmpi uge, %2, %c0_i8 : i8 + %3 = arith.cmpi sge(%2, %c0_i8) : i8 + %4 = arith.cmpi uge(%2, %c0_i8) : i8 %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } @@ -692,7 +692,7 @@ %0 = arith.maxui %arg0, %c256_i16 : i16 %1 = arith.minui %0, %c257_i16 : i16 %2 = arith.trunci %1 : i16 to i8 - %3 = arith.cmpi sge, %2, %c2_i8 : i8 + %3 = arith.cmpi sge(%2, %c2_i8) : i8 func.return %3 : i1 } @@ -707,8 +707,8 @@ %0 = arith.maxsi %arg0, %c-2_i16 : i16 %1 = arith.minsi %0, %c2_i16 : i16 %2 = arith.trunci %1 : i16 to i8 - %3 = arith.cmpi sge, %2, %c-2_i8 : i8 - %4 = arith.cmpi sle, %2, %c2_i8 : i8 + %3 = arith.cmpi sge(%2, %c-2_i8) : i8 + %4 = arith.cmpi sle(%2, %c2_i8) : i8 %5 = arith.andi %3, %4 : i1 func.return %5 : i1 } diff --git a/mlir/test/Dialect/Arithmetic/invalid.mlir b/mlir/test/Dialect/Arithmetic/invalid.mlir --- a/mlir/test/Dialect/Arithmetic/invalid.mlir +++ b/mlir/test/Dialect/Arithmetic/invalid.mlir @@ -160,7 +160,7 @@ // Comparison are defined for arguments of the same type. func.func @func_with_ops(i32, i64) { ^bb0(%a : i32, %b : i64): // expected-note {{prior use here}} - %r = arith.cmpi eq, %a, %b : i32 // expected-error {{use of value '%b' expects different type than prior uses}} + %r = arith.cmpi eq(%a, %b) : i32 // expected-error {{use of value '%b' expects different type than prior uses}} } // ----- @@ -176,7 +176,7 @@ // Integer comparisons are not recognized for float types. func.func @func_with_ops(f32, f32) { ^bb0(%a : f32, %b : f32): - %r = arith.cmpi eq, %a, %b : f32 // expected-error {{'lhs' must be signless-integer-like, but got 'f32'}} + %r = arith.cmpi eq(%a, %b) : f32 // expected-error {{'lhs' must be signless-integer-like, but got 'f32'}} } // ----- @@ -208,7 +208,7 @@ func.func @invalid_cmp_shape(%idx : () -> ()) { // expected-error@+1 {{'lhs' must be signless-integer-like, but got '() -> ()'}} - %cmp = arith.cmpi eq, %idx, %idx : () -> () + %cmp = arith.cmpi eq(%idx, %idx) : () -> () // ----- @@ -227,21 +227,21 @@ func.func @cmpf_canonical_invalid_predicate_value(%a : f32) { // expected-error@+1 {{expected string or keyword containing one of the following enum values}} - %r = arith.cmpf foo, %a, %a : f32 + %r = arith.cmpf foo(%a, %a) : f32 } // ----- func.func @cmpf_canonical_invalid_predicate_value_signed(%a : f32) { // expected-error@+1 {{expected string or keyword containing one of the following enum values}} - %r = arith.cmpf sge, %a, %a : f32 + %r = arith.cmpf sge(%a, %a) : f32 } // ----- func.func @cmpf_canonical_invalid_predicate_value_no_order(%a : f32) { // expected-error@+1 {{expected string or keyword containing one of the following enum values}} - %r = arith.cmpf eq, %a, %a : f32 + %r = arith.cmpf eq(%a, %a) : f32 } // ----- @@ -260,7 +260,7 @@ // ----- func.func @cmpf_wrong_type(%a : i32, %b : i32) { - %r = arith.cmpf oeq, %a, %b : i32 // expected-error {{must be floating-point-like}} + %r = arith.cmpf oeq(%a, %b) : i32 // expected-error {{must be floating-point-like}} } // ----- @@ -273,7 +273,7 @@ // ----- func.func @cmpf_canonical_wrong_result_type(%a : f32, %b : f32) -> f32 { - %r = arith.cmpf oeq, %a, %b : f32 // expected-note {{prior use here}} + %r = arith.cmpf oeq(%a, %b) : f32 // expected-note {{prior use here}} // expected-error@+1 {{use of value '%r' expects different type than prior uses}} return %r : f32 } @@ -303,7 +303,7 @@ func.func @cmpf_canonical_type_mismatch(%a : f32, %b : f64) { // expected-note {{prior use here}} // expected-error@+1 {{use of value '%b' expects different type than prior uses}} - %r = arith.cmpf oeq, %a, %b : f32 + %r = arith.cmpf oeq(%a, %b) : f32 } // ----- diff --git a/mlir/test/Dialect/Arithmetic/ops.mlir b/mlir/test/Dialect/Arithmetic/ops.mlir --- a/mlir/test/Dialect/Arithmetic/ops.mlir +++ b/mlir/test/Dialect/Arithmetic/ops.mlir @@ -843,55 +843,55 @@ // CHECK-LABEL: test_cmpi func.func @test_cmpi(%arg0 : i64, %arg1 : i64) -> i1 { - %0 = arith.cmpi ne, %arg0, %arg1 : i64 + %0 = arith.cmpi ne(%arg0, %arg1) : i64 return %0 : i1 } // CHECK-LABEL: test_cmpi_tensor func.func @test_cmpi_tensor(%arg0 : tensor<8x8xi64>, %arg1 : tensor<8x8xi64>) -> tensor<8x8xi1> { - %0 = arith.cmpi slt, %arg0, %arg1 : tensor<8x8xi64> + %0 = arith.cmpi slt(%arg0, %arg1) : tensor<8x8xi64> return %0 : tensor<8x8xi1> } // CHECK-LABEL: test_cmpi_vector func.func @test_cmpi_vector(%arg0 : vector<8xi64>, %arg1 : vector<8xi64>) -> vector<8xi1> { - %0 = arith.cmpi ult, %arg0, %arg1 : vector<8xi64> + %0 = arith.cmpi ult(%arg0, %arg1) : vector<8xi64> return %0 : vector<8xi1> } // CHECK-LABEL: test_cmpi_scalable_vector func.func @test_cmpi_scalable_vector(%arg0 : vector<[8]xi64>, %arg1 : vector<[8]xi64>) -> vector<[8]xi1> { - %0 = arith.cmpi ult, %arg0, %arg1 : vector<[8]xi64> + %0 = arith.cmpi ult(%arg0, %arg1) : vector<[8]xi64> return %0 : vector<[8]xi1> } // CHECK-LABEL: test_cmpi_vector_0d func.func @test_cmpi_vector_0d(%arg0 : vector, %arg1 : vector) -> vector { - %0 = arith.cmpi ult, %arg0, %arg1 : vector + %0 = arith.cmpi ult(%arg0, %arg1) : vector return %0 : vector } // CHECK-LABEL: test_cmpf func.func @test_cmpf(%arg0 : f64, %arg1 : f64) -> i1 { - %0 = arith.cmpf oeq, %arg0, %arg1 : f64 + %0 = arith.cmpf oeq(%arg0, %arg1) : f64 return %0 : i1 } // CHECK-LABEL: test_cmpf_tensor func.func @test_cmpf_tensor(%arg0 : tensor<8x8xf64>, %arg1 : tensor<8x8xf64>) -> tensor<8x8xi1> { - %0 = arith.cmpf olt, %arg0, %arg1 : tensor<8x8xf64> + %0 = arith.cmpf olt(%arg0, %arg1) : tensor<8x8xf64> return %0 : tensor<8x8xi1> } // CHECK-LABEL: test_cmpf_vector func.func @test_cmpf_vector(%arg0 : vector<8xf64>, %arg1 : vector<8xf64>) -> vector<8xi1> { - %0 = arith.cmpf ult, %arg0, %arg1 : vector<8xf64> + %0 = arith.cmpf ult(%arg0, %arg1) : vector<8xf64> return %0 : vector<8xi1> } // CHECK-LABEL: test_cmpf_scalable_vector func.func @test_cmpf_scalable_vector(%arg0 : vector<[8]xf64>, %arg1 : vector<[8]xf64>) -> vector<[8]xi1> { - %0 = arith.cmpf ult, %arg0, %arg1 : vector<[8]xf64> + %0 = arith.cmpf ult(%arg0, %arg1) : vector<[8]xf64> return %0 : vector<[8]xi1> } diff --git a/mlir/test/Dialect/Arithmetic/unsigned-when-equivalent.mlir b/mlir/test/Dialect/Arithmetic/unsigned-when-equivalent.mlir --- a/mlir/test/Dialect/Arithmetic/unsigned-when-equivalent.mlir +++ b/mlir/test/Dialect/Arithmetic/unsigned-when-equivalent.mlir @@ -25,10 +25,10 @@ %6 = arith.minsi %1, %c4 : i32 %7 = arith.maxsi %1, %c4 : i32 %8 = arith.extsi %1 : i32 to i64 - %9 = arith.cmpi sle, %1, %c4 : i32 - %10 = arith.cmpi slt, %1, %c4 : i32 - %11 = arith.cmpi sge, %1, %c4 : i32 - %12 = arith.cmpi sgt, %1, %c4 : i32 + %9 = arith.cmpi sle(%1, %c4) : i32 + %10 = arith.cmpi slt(%1, %c4) : i32 + %11 = arith.cmpi sge(%1, %c4) : i32 + %12 = arith.cmpi sgt(%1, %c4) : i32 func.return } @@ -57,10 +57,10 @@ %6 = arith.minsi %1, %c4 : i32 %7 = arith.maxsi %1, %c4 : i32 %8 = arith.extsi %1 : i32 to i64 - %9 = arith.cmpi sle, %1, %c4 : i32 - %10 = arith.cmpi slt, %1, %c4 : i32 - %11 = arith.cmpi sge, %1, %c4 : i32 - %12 = arith.cmpi sgt, %1, %c4 : i32 + %9 = arith.cmpi sle(%1, %c4) : i32 + %10 = arith.cmpi slt(%1, %c4) : i32 + %11 = arith.cmpi sge(%1, %c4) : i32 + %12 = arith.cmpi sgt(%1, %c4) : i32 func.return } @@ -68,7 +68,7 @@ // CHECK: scf.for %[[arg1:.*]] = // CHECK: %[[v:.*]] = arith.remui %[[arg1]] // CHECK: %[[w:.*]] = arith.addi %[[v]], %[[v]] -// CHECK: %[[test:.*]] = arith.cmpi ule, %[[w]] +// CHECK: %[[test:.*]] = arith.cmpi ule(%[[w]] // CHECK: scf.if %[[test]] // CHECK: memref.store %[[w]] func.func @preserves_structure(%arg0 : memref<8xindex>) { @@ -79,7 +79,7 @@ scf.for %arg1 = %c0 to %c8 step %c1 { %v = arith.remsi %arg1, %c4 : index %w = arith.addi %v, %v : index - %test = arith.cmpi sle, %w, %c4 : index + %test = arith.cmpi sle(%w, %c4) : index scf.if %test { memref.store %w, %arg0[%arg1] : memref<8xindex> } diff --git a/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir b/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir --- a/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir +++ b/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir @@ -93,9 +93,9 @@ // CHECK: llvm.mlir.constant(dense<0> : vector<[4]xi32>) : vector<[4]xi32> %z = arith.subi %a, %a : vector<[4]xi32> // CHECK: llvm.icmp "sge" {{.*}}: vector<[4]xi32> - %agb = arith.cmpi sge, %a, %b : vector<[4]xi32> + %agb = arith.cmpi sge(%a, %b) : vector<[4]xi32> // CHECK: llvm.icmp "slt" {{.*}}: vector<[4]xi32> - %bga = arith.cmpi slt, %a, %b : vector<[4]xi32> + %bga = arith.cmpi slt(%a, %b) : vector<[4]xi32> // CHECK: "arm_sve.intr.sub"{{.*}}: (vector<[4]xi1>, vector<[4]xi32>, vector<[4]xi32>) -> vector<[4]xi32> %0 = arm_sve.masked.subi %agb, %a, %b : vector<[4]xi1>, vector<[4]xi32> diff --git a/mlir/test/Dialect/Async/async-parallel-for-async-dispatch.mlir b/mlir/test/Dialect/Async/async-parallel-for-async-dispatch.mlir --- a/mlir/test/Dialect/Async/async-parallel-for-async-dispatch.mlir +++ b/mlir/test/Dialect/Async/async-parallel-for-async-dispatch.mlir @@ -8,7 +8,7 @@ // CHECK: %[[RANGE:.*]] = arith.subi %[[UB]], %[[LB]] // CHECK: %[[TRIP_CNT:.*]] = arith.ceildivsi %[[RANGE]], %[[STEP]] - // CHECK: %[[IS_NOOP:.*]] = arith.cmpi eq, %[[TRIP_CNT]], %[[C0]] : index + // CHECK: %[[IS_NOOP:.*]] = arith.cmpi eq(%[[TRIP_CNT]], %[[C0]]) : index // CHECK: scf.if %[[IS_NOOP]] { // CHECK-NEXT: } else { @@ -44,7 +44,7 @@ // While loop `before` block decides if we need to dispatch more tasks. // CHECK: { // CHECK: %[[DIFF0:.*]] = arith.subi %[[E0]], %[[S0]] -// CHECK: %[[COND:.*]] = arith.cmpi sgt, %[[DIFF0]], %[[C1]] +// CHECK: %[[COND:.*]] = arith.cmpi sgt(%[[DIFF0]], %[[C1]]) // CHECK: scf.condition(%[[COND]]) // While loop `after` block splits the range in half and submits async task // to process the second half using the call to the same dispatch function. diff --git a/mlir/test/Dialect/Async/async-parallel-for-num-worker-threads.mlir b/mlir/test/Dialect/Async/async-parallel-for-num-worker-threads.mlir --- a/mlir/test/Dialect/Async/async-parallel-for-num-worker-threads.mlir +++ b/mlir/test/Dialect/Async/async-parallel-for-num-worker-threads.mlir @@ -17,15 +17,15 @@ // CHECK-DAG: %[[bracketLowerBound64:.*]] = arith.constant 64 : index // CHECK-DAG: %[[scalingCst64:.*]] = arith.constant 6.000000e-01 : f32 // CHECK: %[[workersIndex:.*]] = async.runtime.num_worker_threads : index - // CHECK: %[[inBracket4:.*]] = arith.cmpi sgt, %[[workersIndex]], %[[bracketLowerBound4]] : index + // CHECK: %[[inBracket4:.*]] = arith.cmpi sgt(%[[workersIndex]], %[[bracketLowerBound4]]) : index // CHECK: %[[scalingFactor4:.*]] = arith.select %[[inBracket4]], %[[scalingCst4]], %[[scalingCstInit]] : f32 - // CHECK: %[[inBracket8:.*]] = arith.cmpi sgt, %[[workersIndex]], %[[bracketLowerBound8]] : index + // CHECK: %[[inBracket8:.*]] = arith.cmpi sgt(%[[workersIndex]], %[[bracketLowerBound8]]) : index // CHECK: %[[scalingFactor8:.*]] = arith.select %[[inBracket8]], %[[scalingCst8]], %[[scalingFactor4]] : f32 - // CHECK: %[[inBracket16:.*]] = arith.cmpi sgt, %[[workersIndex]], %[[bracketLowerBound16]] : index + // CHECK: %[[inBracket16:.*]] = arith.cmpi sgt(%[[workersIndex]], %[[bracketLowerBound16]]) : index // CHECK: %[[scalingFactor16:.*]] = arith.select %[[inBracket16]], %[[scalingCst16]], %[[scalingFactor8]] : f32 - // CHECK: %[[inBracket32:.*]] = arith.cmpi sgt, %[[workersIndex]], %[[bracketLowerBound32]] : index + // CHECK: %[[inBracket32:.*]] = arith.cmpi sgt(%[[workersIndex]], %[[bracketLowerBound32]]) : index // CHECK: %[[scalingFactor32:.*]] = arith.select %[[inBracket32]], %[[scalingCst32]], %[[scalingFactor16]] : f32 - // CHECK: %[[inBracket64:.*]] = arith.cmpi sgt, %[[workersIndex]], %[[bracketLowerBound64]] : index + // CHECK: %[[inBracket64:.*]] = arith.cmpi sgt(%[[workersIndex]], %[[bracketLowerBound64]]) : index // CHECK: %[[scalingFactor64:.*]] = arith.select %[[inBracket64]], %[[scalingCst64]], %[[scalingFactor32]] : f32 // CHECK: %[[workersInt:.*]] = arith.index_cast %[[workersIndex]] : index to i32 // CHECK: %[[workersFloat:.*]] = arith.sitofp %[[workersInt]] : i32 to f32 diff --git a/mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation.mlir b/mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation.mlir --- a/mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation.mlir +++ b/mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation.mlir @@ -618,7 +618,7 @@ func.func @nested_region_control_flow( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -648,7 +648,7 @@ func.func @nested_region_control_flow_div( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -860,7 +860,7 @@ func.func @nestedRegionControlFlowAlloca( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -894,7 +894,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = memref.alloc() : memref<2xf32> scf.yield %3 : memref<2xf32> } @@ -935,7 +935,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { scf.yield %0 : memref<2xf32> } else { @@ -975,7 +975,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { %4 = memref.alloc() : memref<2xf32> scf.yield %4 : memref<2xf32> @@ -1031,7 +1031,7 @@ %3 = scf.for %i3 = %lb to %ub step %step iter_args(%iterBuf3 = %iterBuf2) -> memref<2xf32> { %4 = memref.alloc() : memref<2xf32> - %5 = arith.cmpi eq, %i, %ub : index + %5 = arith.cmpi eq(%i, %ub) : index %6 = scf.if %5 -> (memref<2xf32>) { %7 = memref.alloc() : memref<2xf32> scf.yield %7 : memref<2xf32> @@ -1124,7 +1124,7 @@ cf.br ^loopHeader(%const0, %arg2 : i32, memref) ^loopHeader(%i : i32, %buff : memref): - %lessThan = arith.cmpi slt, %i, %arg1 : i32 + %lessThan = arith.cmpi slt(%i, %arg1) : i32 cf.cond_br %lessThan, ^loopBody(%i, %buff : i32, memref), ^exit(%buff : memref) @@ -1163,7 +1163,7 @@ cf.br ^loopHeader(%inc, %alloc1 : i32, memref<2xf32>) ^loopHeader(%i : i32, %buff : memref<2xf32>): - %lessThan = arith.cmpi slt, %i, %arg1 : i32 + %lessThan = arith.cmpi slt(%i, %arg1) : i32 cf.cond_br %lessThan, ^loopBody(%i, %buff : i32, memref<2xf32>), ^exit(%buff : memref<2xf32>) diff --git a/mlir/test/Dialect/Bufferization/Transforms/buffer-hoisting.mlir b/mlir/test/Dialect/Bufferization/Transforms/buffer-hoisting.mlir --- a/mlir/test/Dialect/Bufferization/Transforms/buffer-hoisting.mlir +++ b/mlir/test/Dialect/Bufferization/Transforms/buffer-hoisting.mlir @@ -384,7 +384,7 @@ func.func @nested_region_control_flow( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -410,7 +410,7 @@ func.func @nested_region_control_flow_div( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -436,7 +436,7 @@ func.func @nested_region_control_flow_div_nested( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { %3 = scf.if %0 -> (memref) { @@ -661,7 +661,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = memref.alloc() : memref<2xf32> scf.yield %3 : memref<2xf32> } @@ -688,7 +688,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { %4 = memref.alloc() : memref<2xf32> scf.yield %4 : memref<2xf32> @@ -725,7 +725,7 @@ %3 = scf.for %i3 = %lb to %ub step %step iter_args(%iterBuf3 = %iterBuf2) -> memref<2xf32> { %4 = memref.alloc() : memref<2xf32> - %5 = arith.cmpi eq, %i, %ub : index + %5 = arith.cmpi eq(%i, %ub) : index %6 = scf.if %5 -> (memref<2xf32>) { %7 = memref.alloc() : memref<2xf32> scf.yield %7 : memref<2xf32> @@ -766,7 +766,7 @@ iter_args(%iterBuf2 = %iterBuf) -> memref { %3 = scf.for %i3 = %lb to %ub step %step iter_args(%iterBuf3 = %iterBuf2) -> memref { - %5 = arith.cmpi eq, %i, %ub : index + %5 = arith.cmpi eq(%i, %ub) : index %6 = scf.if %5 -> (memref) { %7 = memref.alloc(%i3) : memref scf.yield %7 : memref diff --git a/mlir/test/Dialect/Bufferization/Transforms/buffer-loop-hoisting.mlir b/mlir/test/Dialect/Bufferization/Transforms/buffer-loop-hoisting.mlir --- a/mlir/test/Dialect/Bufferization/Transforms/buffer-loop-hoisting.mlir +++ b/mlir/test/Dialect/Bufferization/Transforms/buffer-loop-hoisting.mlir @@ -110,7 +110,7 @@ func.func @nested_region_control_flow( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -141,7 +141,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = memref.alloc() : memref<2xf32> scf.yield %3 : memref<2xf32> } @@ -168,7 +168,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { %4 = memref.alloc() : memref<2xf32> scf.yield %4 : memref<2xf32> @@ -206,7 +206,7 @@ %3 = scf.for %i3 = %lb to %ub step %step iter_args(%iterBuf3 = %iterBuf2) -> memref<2xf32> { %4 = memref.alloc() : memref<2xf32> - %5 = arith.cmpi eq, %i, %ub : index + %5 = arith.cmpi eq(%i, %ub) : index %6 = scf.if %5 -> (memref<2xf32>) { %7 = memref.alloc() : memref<2xf32> %8 = memref.alloc() : memref<2xf32> @@ -253,7 +253,7 @@ %3 = scf.for %i3 = %lb to %ub step %step iter_args(%iterBuf3 = %iterBuf2) -> memref { %4 = memref.alloc(%i3) : memref - %5 = arith.cmpi eq, %i, %ub : index + %5 = arith.cmpi eq(%i, %ub) : index %6 = scf.if %5 -> (memref) { %7 = memref.alloc(%i3) : memref scf.yield %7 : memref @@ -360,7 +360,7 @@ %res: memref<2xf32>) { %0 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %1 = arith.cmpi eq, %i, %ub : index + %1 = arith.cmpi eq(%i, %ub) : index %2 = scf.if %1 -> (memref<2xf32>) { %3 = memref.alloc() : memref<2xf32> scf.yield %3 : memref<2xf32> @@ -387,7 +387,7 @@ %buf: memref<2xf32>, %res: memref<2xf32>) { %0 = memref.alloc() : memref<2xf32> - %1 = arith.cmpi eq, %lb, %ub : index + %1 = arith.cmpi eq(%lb, %ub) : index %2 = scf.if %1 -> (memref<2xf32>) { %3 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { diff --git a/mlir/test/Dialect/Func/func-bufferize.mlir b/mlir/test/Dialect/Func/func-bufferize.mlir --- a/mlir/test/Dialect/Func/func-bufferize.mlir +++ b/mlir/test/Dialect/Func/func-bufferize.mlir @@ -72,7 +72,7 @@ func.func @bufferize_while(%arg0: i64, %arg1: i64) -> i64 { %c2_i64 = arith.constant 2 : i64 %0:2 = scf.while (%arg2 = %arg0) : (i64) -> (i64, i64) { - %1 = arith.cmpi slt, %arg2, %arg1 : i64 + %1 = arith.cmpi slt(%arg2, %arg1) : i64 scf.condition(%1) %arg2, %arg2 : i64, i64 } do { ^bb0(%arg2: i64, %arg3: i64): diff --git a/mlir/test/Dialect/GPU/all-reduce-max.mlir b/mlir/test/Dialect/GPU/all-reduce-max.mlir --- a/mlir/test/Dialect/GPU/all-reduce-max.mlir +++ b/mlir/test/Dialect/GPU/all-reduce-max.mlir @@ -35,16 +35,16 @@ // CHECK: [[VAL_27:%.*]] = arith.addi [[VAL_25]], [[VAL_18]] : i32 // CHECK: [[VAL_28:%.*]] = arith.muli [[VAL_26]], [[VAL_16]] : i32 // CHECK: [[VAL_29:%.*]] = arith.andi [[VAL_27]], [[VAL_2]] : i32 - // CHECK: [[VAL_30:%.*]] = arith.cmpi eq, [[VAL_29]], [[VAL_3]] : i32 + // CHECK: [[VAL_30:%.*]] = arith.cmpi eq([[VAL_29]], [[VAL_3]]) : i32 // CHECK: [[VAL_31:%.*]] = arith.subi [[VAL_27]], [[VAL_29]] : i32 // CHECK: [[VAL_32:%.*]] = arith.subi [[VAL_28]], [[VAL_31]] : i32 - // CHECK: [[VAL_33:%.*]] = arith.cmpi slt, [[VAL_32]], [[VAL_5]] : i32 + // CHECK: [[VAL_33:%.*]] = arith.cmpi slt([[VAL_32]], [[VAL_5]]) : i32 // CHECK: cf.cond_br [[VAL_33]], ^bb1, ^bb17 // CHECK: ^bb1: // CHECK: [[VAL_34:%.*]], [[VAL_35:%.*]] = gpu.shuffle xor [[VAL_0]], [[VAL_6]], [[VAL_32]] : f32 // CHECK: cf.cond_br [[VAL_35]], ^bb2, ^bb3 // CHECK: ^bb2: - // CHECK: [[VAL_36:%.*]] = arith.cmpf ugt, [[VAL_0]], [[VAL_34]] : f32 + // CHECK: [[VAL_36:%.*]] = arith.cmpf ugt([[VAL_0]], [[VAL_34]]) : f32 // CHECK: [[VAL_37:%.*]] = arith.select [[VAL_36]], [[VAL_0]], [[VAL_34]] : f32 // CHECK: cf.br ^bb4([[VAL_37]] : f32) // CHECK: ^bb3: @@ -53,7 +53,7 @@ // CHECK: [[VAL_39:%.*]], [[VAL_40:%.*]] = gpu.shuffle xor [[VAL_38]], [[VAL_7]], [[VAL_32]] : f32 // CHECK: cf.cond_br [[VAL_40]], ^bb5, ^bb6 // CHECK: ^bb5: - // CHECK: [[VAL_41:%.*]] = arith.cmpf ugt, [[VAL_38]], [[VAL_39]] : f32 + // CHECK: [[VAL_41:%.*]] = arith.cmpf ugt([[VAL_38]], [[VAL_39]]) : f32 // CHECK: [[VAL_42:%.*]] = arith.select [[VAL_41]], [[VAL_38]], [[VAL_39]] : f32 // CHECK: cf.br ^bb7([[VAL_42]] : f32) // CHECK: ^bb6: @@ -62,7 +62,7 @@ // CHECK: [[VAL_44:%.*]], [[VAL_45:%.*]] = gpu.shuffle xor [[VAL_43]], [[VAL_8]], [[VAL_32]] : f32 // CHECK: cf.cond_br [[VAL_45]], ^bb8, ^bb9 // CHECK: ^bb8: - // CHECK: [[VAL_46:%.*]] = arith.cmpf ugt, [[VAL_43]], [[VAL_44]] : f32 + // CHECK: [[VAL_46:%.*]] = arith.cmpf ugt([[VAL_43]], [[VAL_44]]) : f32 // CHECK: [[VAL_47:%.*]] = arith.select [[VAL_46]], [[VAL_43]], [[VAL_44]] : f32 // CHECK: cf.br ^bb10([[VAL_47]] : f32) // CHECK: ^bb9: @@ -71,7 +71,7 @@ // CHECK: [[VAL_49:%.*]], [[VAL_50:%.*]] = gpu.shuffle xor [[VAL_48]], [[VAL_9]], [[VAL_32]] : f32 // CHECK: cf.cond_br [[VAL_50]], ^bb11, ^bb12 // CHECK: ^bb11: - // CHECK: [[VAL_51:%.*]] = arith.cmpf ugt, [[VAL_48]], [[VAL_49]] : f32 + // CHECK: [[VAL_51:%.*]] = arith.cmpf ugt([[VAL_48]], [[VAL_49]]) : f32 // CHECK: [[VAL_52:%.*]] = arith.select [[VAL_51]], [[VAL_48]], [[VAL_49]] : f32 // CHECK: cf.br ^bb13([[VAL_52]] : f32) // CHECK: ^bb12: @@ -80,7 +80,7 @@ // CHECK: [[VAL_54:%.*]], [[VAL_55:%.*]] = gpu.shuffle xor [[VAL_53]], [[VAL_10]], [[VAL_32]] : f32 // CHECK: cf.cond_br [[VAL_55]], ^bb14, ^bb15 // CHECK: ^bb14: - // CHECK: [[VAL_56:%.*]] = arith.cmpf ugt, [[VAL_53]], [[VAL_54]] : f32 + // CHECK: [[VAL_56:%.*]] = arith.cmpf ugt([[VAL_53]], [[VAL_54]]) : f32 // CHECK: [[VAL_57:%.*]] = arith.select [[VAL_56]], [[VAL_53]], [[VAL_54]] : f32 // CHECK: cf.br ^bb16([[VAL_57]] : f32) // CHECK: ^bb15: @@ -89,19 +89,19 @@ // CHECK: cf.br ^bb18([[VAL_58]] : f32) // CHECK: ^bb17: // CHECK: [[VAL_59:%.*]], [[VAL_60:%.*]] = gpu.shuffle xor [[VAL_0]], [[VAL_6]], [[VAL_5]] : f32 - // CHECK: [[VAL_61:%.*]] = arith.cmpf ugt, [[VAL_0]], [[VAL_59]] : f32 + // CHECK: [[VAL_61:%.*]] = arith.cmpf ugt([[VAL_0]], [[VAL_59]]) : f32 // CHECK: [[VAL_62:%.*]] = arith.select [[VAL_61]], [[VAL_0]], [[VAL_59]] : f32 // CHECK: [[VAL_63:%.*]], [[VAL_64:%.*]] = gpu.shuffle xor [[VAL_62]], [[VAL_7]], [[VAL_5]] : f32 - // CHECK: [[VAL_65:%.*]] = arith.cmpf ugt, [[VAL_62]], [[VAL_63]] : f32 + // CHECK: [[VAL_65:%.*]] = arith.cmpf ugt([[VAL_62]], [[VAL_63]]) : f32 // CHECK: [[VAL_66:%.*]] = arith.select [[VAL_65]], [[VAL_62]], [[VAL_63]] : f32 // CHECK: [[VAL_67:%.*]], [[VAL_68:%.*]] = gpu.shuffle xor [[VAL_66]], [[VAL_8]], [[VAL_5]] : f32 - // CHECK: [[VAL_69:%.*]] = arith.cmpf ugt, [[VAL_66]], [[VAL_67]] : f32 + // CHECK: [[VAL_69:%.*]] = arith.cmpf ugt([[VAL_66]], [[VAL_67]]) : f32 // CHECK: [[VAL_70:%.*]] = arith.select [[VAL_69]], [[VAL_66]], [[VAL_67]] : f32 // CHECK: [[VAL_71:%.*]], [[VAL_72:%.*]] = gpu.shuffle xor [[VAL_70]], [[VAL_9]], [[VAL_5]] : f32 - // CHECK: [[VAL_73:%.*]] = arith.cmpf ugt, [[VAL_70]], [[VAL_71]] : f32 + // CHECK: [[VAL_73:%.*]] = arith.cmpf ugt([[VAL_70]], [[VAL_71]]) : f32 // CHECK: [[VAL_74:%.*]] = arith.select [[VAL_73]], [[VAL_70]], [[VAL_71]] : f32 // CHECK: [[VAL_75:%.*]], [[VAL_76:%.*]] = gpu.shuffle xor [[VAL_74]], [[VAL_10]], [[VAL_5]] : f32 - // CHECK: [[VAL_77:%.*]] = arith.cmpf ugt, [[VAL_74]], [[VAL_75]] : f32 + // CHECK: [[VAL_77:%.*]] = arith.cmpf ugt([[VAL_74]], [[VAL_75]]) : f32 // CHECK: [[VAL_78:%.*]] = arith.select [[VAL_77]], [[VAL_74]], [[VAL_75]] : f32 // CHECK: cf.br ^bb18([[VAL_78]] : f32) // CHECK: ^bb18([[VAL_79:%.*]]: f32): @@ -117,18 +117,18 @@ // CHECK: gpu.barrier // CHECK: [[VAL_82:%.*]] = arith.addi [[VAL_28]], [[VAL_2]] : i32 // CHECK: [[VAL_83:%.*]] = arith.divsi [[VAL_82]], [[VAL_5]] : i32 - // CHECK: [[VAL_84:%.*]] = arith.cmpi slt, [[VAL_27]], [[VAL_83]] : i32 + // CHECK: [[VAL_84:%.*]] = arith.cmpi slt([[VAL_27]], [[VAL_83]]) : i32 // CHECK: cf.cond_br [[VAL_84]], ^bb22, ^bb41 // CHECK: ^bb22: // CHECK: [[VAL_85:%.*]] = arith.index_cast [[VAL_27]] : i32 to index // CHECK: [[VAL_86:%.*]] = memref.load [[VAL_1]]{{\[}}[[VAL_85]]] : memref<32xf32, 3> - // CHECK: [[VAL_87:%.*]] = arith.cmpi slt, [[VAL_83]], [[VAL_5]] : i32 + // CHECK: [[VAL_87:%.*]] = arith.cmpi slt([[VAL_83]], [[VAL_5]]) : i32 // CHECK: cf.cond_br [[VAL_87]], ^bb23, ^bb39 // CHECK: ^bb23: // CHECK: [[VAL_88:%.*]], [[VAL_89:%.*]] = gpu.shuffle xor [[VAL_86]], [[VAL_6]], [[VAL_83]] : f32 // CHECK: cf.cond_br [[VAL_89]], ^bb24, ^bb25 // CHECK: ^bb24: - // CHECK: [[VAL_90:%.*]] = arith.cmpf ugt, [[VAL_86]], [[VAL_88]] : f32 + // CHECK: [[VAL_90:%.*]] = arith.cmpf ugt([[VAL_86]], [[VAL_88]]) : f32 // CHECK: [[VAL_91:%.*]] = arith.select [[VAL_90]], [[VAL_86]], [[VAL_88]] : f32 // CHECK: cf.br ^bb26([[VAL_91]] : f32) // CHECK: ^bb25: @@ -137,7 +137,7 @@ // CHECK: [[VAL_93:%.*]], [[VAL_94:%.*]] = gpu.shuffle xor [[VAL_92]], [[VAL_7]], [[VAL_83]] : f32 // CHECK: cf.cond_br [[VAL_94]], ^bb27, ^bb28 // CHECK: ^bb27: - // CHECK: [[VAL_95:%.*]] = arith.cmpf ugt, [[VAL_92]], [[VAL_93]] : f32 + // CHECK: [[VAL_95:%.*]] = arith.cmpf ugt([[VAL_92]], [[VAL_93]]) : f32 // CHECK: [[VAL_96:%.*]] = arith.select [[VAL_95]], [[VAL_92]], [[VAL_93]] : f32 // CHECK: cf.br ^bb29([[VAL_96]] : f32) // CHECK: ^bb28: @@ -146,7 +146,7 @@ // CHECK: [[VAL_98:%.*]], [[VAL_99:%.*]] = gpu.shuffle xor [[VAL_97]], [[VAL_8]], [[VAL_83]] : f32 // CHECK: cf.cond_br [[VAL_99]], ^bb30, ^bb31 // CHECK: ^bb30: - // CHECK: [[VAL_100:%.*]] = arith.cmpf ugt, [[VAL_97]], [[VAL_98]] : f32 + // CHECK: [[VAL_100:%.*]] = arith.cmpf ugt([[VAL_97]], [[VAL_98]]) : f32 // CHECK: [[VAL_101:%.*]] = arith.select [[VAL_100]], [[VAL_97]], [[VAL_98]] : f32 // CHECK: cf.br ^bb32([[VAL_101]] : f32) // CHECK: ^bb31: @@ -155,7 +155,7 @@ // CHECK: [[VAL_103:%.*]], [[VAL_104:%.*]] = gpu.shuffle xor [[VAL_102]], [[VAL_9]], [[VAL_83]] : f32 // CHECK: cf.cond_br [[VAL_104]], ^bb33, ^bb34 // CHECK: ^bb33: - // CHECK: [[VAL_105:%.*]] = arith.cmpf ugt, [[VAL_102]], [[VAL_103]] : f32 + // CHECK: [[VAL_105:%.*]] = arith.cmpf ugt([[VAL_102]], [[VAL_103]]) : f32 // CHECK: [[VAL_106:%.*]] = arith.select [[VAL_105]], [[VAL_102]], [[VAL_103]] : f32 // CHECK: cf.br ^bb35([[VAL_106]] : f32) // CHECK: ^bb34: @@ -164,7 +164,7 @@ // CHECK: [[VAL_108:%.*]], [[VAL_109:%.*]] = gpu.shuffle xor [[VAL_107]], [[VAL_10]], [[VAL_83]] : f32 // CHECK: cf.cond_br [[VAL_109]], ^bb36, ^bb37 // CHECK: ^bb36: - // CHECK: [[VAL_110:%.*]] = arith.cmpf ugt, [[VAL_107]], [[VAL_108]] : f32 + // CHECK: [[VAL_110:%.*]] = arith.cmpf ugt([[VAL_107]], [[VAL_108]]) : f32 // CHECK: [[VAL_111:%.*]] = arith.select [[VAL_110]], [[VAL_107]], [[VAL_108]] : f32 // CHECK: cf.br ^bb38([[VAL_111]] : f32) // CHECK: ^bb37: @@ -173,19 +173,19 @@ // CHECK: cf.br ^bb40([[VAL_112]] : f32) // CHECK: ^bb39: // CHECK: [[VAL_113:%.*]], [[VAL_114:%.*]] = gpu.shuffle xor [[VAL_86]], [[VAL_6]], [[VAL_5]] : f32 - // CHECK: [[VAL_115:%.*]] = arith.cmpf ugt, [[VAL_86]], [[VAL_113]] : f32 + // CHECK: [[VAL_115:%.*]] = arith.cmpf ugt([[VAL_86]], [[VAL_113]]) : f32 // CHECK: [[VAL_116:%.*]] = arith.select [[VAL_115]], [[VAL_86]], [[VAL_113]] : f32 // CHECK: [[VAL_117:%.*]], [[VAL_118:%.*]] = gpu.shuffle xor [[VAL_116]], [[VAL_7]], [[VAL_5]] : f32 - // CHECK: [[VAL_119:%.*]] = arith.cmpf ugt, [[VAL_116]], [[VAL_117]] : f32 + // CHECK: [[VAL_119:%.*]] = arith.cmpf ugt([[VAL_116]], [[VAL_117]]) : f32 // CHECK: [[VAL_120:%.*]] = arith.select [[VAL_119]], [[VAL_116]], [[VAL_117]] : f32 // CHECK: [[VAL_121:%.*]], [[VAL_122:%.*]] = gpu.shuffle xor [[VAL_120]], [[VAL_8]], [[VAL_5]] : f32 - // CHECK: [[VAL_123:%.*]] = arith.cmpf ugt, [[VAL_120]], [[VAL_121]] : f32 + // CHECK: [[VAL_123:%.*]] = arith.cmpf ugt([[VAL_120]], [[VAL_121]]) : f32 // CHECK: [[VAL_124:%.*]] = arith.select [[VAL_123]], [[VAL_120]], [[VAL_121]] : f32 // CHECK: [[VAL_125:%.*]], [[VAL_126:%.*]] = gpu.shuffle xor [[VAL_124]], [[VAL_9]], [[VAL_5]] : f32 - // CHECK: [[VAL_127:%.*]] = arith.cmpf ugt, [[VAL_124]], [[VAL_125]] : f32 + // CHECK: [[VAL_127:%.*]] = arith.cmpf ugt([[VAL_124]], [[VAL_125]]) : f32 // CHECK: [[VAL_128:%.*]] = arith.select [[VAL_127]], [[VAL_124]], [[VAL_125]] : f32 // CHECK: [[VAL_129:%.*]], [[VAL_130:%.*]] = gpu.shuffle xor [[VAL_128]], [[VAL_10]], [[VAL_5]] : f32 - // CHECK: [[VAL_131:%.*]] = arith.cmpf ugt, [[VAL_128]], [[VAL_129]] : f32 + // CHECK: [[VAL_131:%.*]] = arith.cmpf ugt([[VAL_128]], [[VAL_129]]) : f32 // CHECK: [[VAL_132:%.*]] = arith.select [[VAL_131]], [[VAL_128]], [[VAL_129]] : f32 // CHECK: cf.br ^bb40([[VAL_132]] : f32) // CHECK: ^bb40([[VAL_133:%.*]]: f32): diff --git a/mlir/test/Dialect/GPU/all-reduce.mlir b/mlir/test/Dialect/GPU/all-reduce.mlir --- a/mlir/test/Dialect/GPU/all-reduce.mlir +++ b/mlir/test/Dialect/GPU/all-reduce.mlir @@ -35,10 +35,10 @@ // CHECK: [[VAL_27:%.*]] = arith.addi [[VAL_25]], [[VAL_18]] : i32 // CHECK: [[VAL_28:%.*]] = arith.muli [[VAL_26]], [[VAL_16]] : i32 // CHECK: [[VAL_29:%.*]] = arith.andi [[VAL_27]], [[VAL_2]] : i32 - // CHECK: [[VAL_30:%.*]] = arith.cmpi eq, [[VAL_29]], [[VAL_3]] : i32 + // CHECK: [[VAL_30:%.*]] = arith.cmpi eq([[VAL_29]], [[VAL_3]]) : i32 // CHECK: [[VAL_31:%.*]] = arith.subi [[VAL_27]], [[VAL_29]] : i32 // CHECK: [[VAL_32:%.*]] = arith.subi [[VAL_28]], [[VAL_31]] : i32 - // CHECK: [[VAL_33:%.*]] = arith.cmpi slt, [[VAL_32]], [[VAL_5]] : i32 + // CHECK: [[VAL_33:%.*]] = arith.cmpi slt([[VAL_32]], [[VAL_5]]) : i32 // CHECK: cf.cond_br [[VAL_33]], ^bb1, ^bb17 // CHECK: ^bb1: // CHECK: [[VAL_34:%.*]], [[VAL_35:%.*]] = gpu.shuffle xor [[VAL_0]], [[VAL_6]], [[VAL_32]] : f32 @@ -107,12 +107,12 @@ // CHECK: gpu.barrier // CHECK: [[VAL_72:%.*]] = arith.addi [[VAL_28]], [[VAL_2]] : i32 // CHECK: [[VAL_73:%.*]] = arith.divsi [[VAL_72]], [[VAL_5]] : i32 - // CHECK: [[VAL_74:%.*]] = arith.cmpi slt, [[VAL_27]], [[VAL_73]] : i32 + // CHECK: [[VAL_74:%.*]] = arith.cmpi slt([[VAL_27]], [[VAL_73]]) : i32 // CHECK: cf.cond_br [[VAL_74]], ^bb22, ^bb41 // CHECK: ^bb22: // CHECK: [[VAL_75:%.*]] = arith.index_cast [[VAL_27]] : i32 to index // CHECK: [[VAL_76:%.*]] = memref.load [[VAL_1]]{{\[}}[[VAL_75]]] : memref<32xf32, 3> - // CHECK: [[VAL_77:%.*]] = arith.cmpi slt, [[VAL_73]], [[VAL_5]] : i32 + // CHECK: [[VAL_77:%.*]] = arith.cmpi slt([[VAL_73]], [[VAL_5]]) : i32 // CHECK: cf.cond_br [[VAL_77]], ^bb23, ^bb39 // CHECK: ^bb23: // CHECK: [[VAL_78:%.*]], [[VAL_79:%.*]] = gpu.shuffle xor [[VAL_76]], [[VAL_6]], [[VAL_73]] : f32 diff --git a/mlir/test/Dialect/Linalg/canonicalize-duplicate-inputs.mlir b/mlir/test/Dialect/Linalg/canonicalize-duplicate-inputs.mlir --- a/mlir/test/Dialect/Linalg/canonicalize-duplicate-inputs.mlir +++ b/mlir/test/Dialect/Linalg/canonicalize-duplicate-inputs.mlir @@ -111,7 +111,7 @@ %1 = arith.addf %b0, %b0: f32 linalg.yield %1, %1, %1, %1 : f32, f32, f32, f32 } -> (tensor, tensor, tensor, tensor) - return %0#0, %0#2 : tensor, tensor + return %0#0, %0#2 : tensor, tensor } // CHECK-DAG: #[[MAP0:.+]] = affine_map<(d0, d1, d2) -> (d0, d1, d2)> // CHECK-DAG: #[[MAP1:.+]] = affine_map<(d0, d1, d2) -> (d0, d2, d1)> @@ -141,9 +141,9 @@ ^bb0(%b0: f32, %b1: f32, %b2: i32): %8 = linalg.index 0 : index %9 = arith.index_cast %8 : index to i32 - %10 = arith.cmpf oge, %b0, %b1 : f32 + %10 = arith.cmpf oge(%b0, %b1) : f32 %11 = arith.select %10, %b0, %b1 : f32 - %12 = arith.cmpf oeq, %b0, %b1 : f32 + %12 = arith.cmpf oeq(%b0, %b1) : f32 %13 = arith.minsi %9, %b2 : i32 %14 = arith.select %10, %9, %b2 : i32 %15 = arith.select %12, %13, %14 : i32 diff --git a/mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir b/mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir --- a/mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir +++ b/mlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir @@ -80,8 +80,8 @@ // CHECK-SAME: ins(%[[ARG0]], %[[ARG1]] // CHECK-SAME: outs(%[[INIT]] // CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32, %{{.*}}: i1): - // CHECK: arith.cmpf olt, %{{.*}}, %{{.*}} : f32 - %0 = arith.cmpf olt, %arg0, %arg1 : tensor + // CHECK: arith.cmpf olt(%{{.*}}, %{{.*}}) : f32 + %0 = arith.cmpf olt(%arg0, %arg1) : tensor return %0 : tensor } @@ -103,8 +103,7 @@ // CHECK-SAME: ins(%[[ARG0]], %[[ARG1]] // CHECK-SAME: outs(%[[INIT]] // CHECK: ^bb0(%{{.*}}: f32, %{{.*}}: f32, %{{.*}}: i1): - // CHECK: arith.cmpf olt, %{{.*}}, %{{.*}} : f32 - %0 = arith.cmpf olt, %arg0, %arg1 : tensor<4x?x?x8x2x?xf32> + // CHECK: arith.cmpf olt(%{{.*}}, %{{.*}}) : f32 + %0 = arith.cmpf olt(%arg0, %arg1) : tensor<4x?x?x8x2x?xf32> return %0 : tensor<4x?x?x8x2x?xi1> } - diff --git a/mlir/test/Dialect/Linalg/detensorize_if.mlir b/mlir/test/Dialect/Linalg/detensorize_if.mlir --- a/mlir/test/Dialect/Linalg/detensorize_if.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_if.mlir @@ -19,8 +19,8 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %5 = tensor.extract %4[] : tensor @@ -31,7 +31,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -46,7 +46,7 @@ // CHECK-DAG: arith.constant 10 // CHECK: cf.br ^[[bb1:.*]](%{{.*}}: i32) // CHECK-NEXT: ^[[bb1]](%{{.*}}: i32): -// CHECK-NEXT: arith.cmpi slt, %{{.*}}, %{{.*}} +// CHECK-NEXT: arith.cmpi slt(%{{.*}}, %{{.*}}) // CHECK-NEXT: cf.cond_br %{{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^bb3(%{{.*}} : i32) // CHECK-NEXT: ^[[bb2]](%{{.*}}: i32) // CHECK-NEXT: arith.addi %{{.*}}, %{{.*}} @@ -80,8 +80,8 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %5 = tensor.extract %4[] : tensor @@ -92,7 +92,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -110,7 +110,7 @@ // CHECK-DAG: arith.constant 10 // CHECK: cf.br ^[[bb1:.*]](%{{.*}}: i32) // CHECK-NEXT: ^[[bb1]](%{{.*}}: i32): -// CHECK-NEXT: arith.cmpi slt, %{{.*}}, %{{.*}} +// CHECK-NEXT: arith.cmpi slt(%{{.*}}, %{{.*}}) // CHECK-NEXT: cf.cond_br %{{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^bb3(%{{.*}} : i32) // CHECK-NEXT: ^[[bb2]](%{{.*}}: i32) // CHECK-NEXT: arith.addi %{{.*}}, %{{.*}} @@ -143,8 +143,8 @@ %4 = linalg.generic #attrs ins(%2, %1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %5 = tensor.extract %4[] : tensor @@ -160,7 +160,7 @@ %8 = linalg.generic #attrs ins(%6, %12 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -175,7 +175,7 @@ // CHECK-DAG: arith.constant 10 // CHECK: cf.br ^[[bb1:.*]](%{{.*}}: i32) // CHECK-NEXT: ^[[bb1]](%{{.*}}: i32): -// CHECK-NEXT: arith.cmpi slt, %{{.*}}, %{{.*}} +// CHECK-NEXT: arith.cmpi slt(%{{.*}}, %{{.*}}) // CHECK-NEXT: cf.cond_br %{{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^bb2(%{{.*}} : i32) // CHECK-NEXT: ^[[bb2]](%{{.*}}: i32) // CHECK-NEXT: arith.addi %{{.*}}, %{{.*}} diff --git a/mlir/test/Dialect/Linalg/detensorize_trivial.mlir b/mlir/test/Dialect/Linalg/detensorize_trivial.mlir --- a/mlir/test/Dialect/Linalg/detensorize_trivial.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_trivial.mlir @@ -17,7 +17,7 @@ ins(%farg0, %1 : tensor, tensor) outs(%3 : tensor) { ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor return %4 : tensor @@ -27,7 +27,7 @@ // DET-ALL-LABEL: func @main(%{{.*}}: tensor) // DET-ALL-NEXT: arith.constant 10 // DET-ALL-NEXT: tensor.extract %{{.*}}[] -// DET-ALL-NEXT: arith.cmpi slt, %{{.*}}, %{{.*}} +// DET-ALL-NEXT: arith.cmpi slt(%{{.*}}, %{{.*}}) // DET-ALL-NEXT: tensor.from_elements %{{.*}} // DET-ALL-NEXT: return %{{.*}} : tensor // DET-ALL-NEXT: } @@ -37,7 +37,7 @@ // DET-CF-NEXT: linalg.init_tensor [] : tensor // DET-CF-NEXT: linalg.generic // DET-CF-NEXT: ^{{.*}}(%{{.*}}: i32, %{{.*}}: i32, %{{.*}}: i1) -// DET-CF-NEXT: arith.cmpi slt, %{{.*}}, %{{.*}} +// DET-CF-NEXT: arith.cmpi slt(%{{.*}}, %{{.*}}) // DET-CF-NEXT: linalg.yield %{{.*}} // DET-CF-NEXT: } -> tensor // DET-CF-NEXT: return %{{.*}} diff --git a/mlir/test/Dialect/Linalg/detensorize_while.mlir b/mlir/test/Dialect/Linalg/detensorize_while.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while.mlir @@ -16,8 +16,8 @@ %2 = linalg.generic #attrs ins(%0, %farg1 : tensor, tensor) outs(%1 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %3 = tensor.extract %2[] : tensor @@ -28,7 +28,7 @@ %6 = linalg.generic #attrs ins(%4, %4 : tensor, tensor) outs(%5 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %8 = arith.addi %arg0, %arg1 : i32 linalg.yield %8 : i32 } -> tensor @@ -45,7 +45,7 @@ // DET-ALL: tensor.extract {{.*}} // DET-ALL: cf.br ^[[bb1:.*]](%{{.*}} : i32) // DET-ALL: ^[[bb1]](%{{.*}}: i32) -// DET-ALL: arith.cmpi slt, {{.*}} +// DET-ALL: arith.cmpi slt({{.*}} // DET-ALL: cf.cond_br {{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^[[bb3:.*]](%{{.*}} : i32) // DET-ALL: ^[[bb2]](%{{.*}}: i32) // DET-ALL: arith.addi {{.*}} @@ -61,7 +61,7 @@ // DET-CF: tensor.extract {{.*}} // DET-CF: cf.br ^[[bb1:.*]](%{{.*}} : i32) // DET-CF: ^[[bb1]](%{{.*}}: i32) -// DET-CF: arith.cmpi slt, {{.*}} +// DET-CF: arith.cmpi slt({{.*}} // DET-CF: cf.cond_br {{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^[[bb3:.*]](%{{.*}} : i32) // DET-CF: ^[[bb2]](%{{.*}}: i32) // DET-CF: arith.addi {{.*}} diff --git a/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir b/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while_impure_cf.mlir @@ -38,8 +38,8 @@ %4 = linalg.generic #attrs ins(%2, %farg1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %5 = tensor.extract %4[] : tensor @@ -68,12 +68,12 @@ // DET-ALL: ^[[bb1]](%{{.*}}: tensor<10xi32>) // DET-ALL: linalg.init_tensor [] : tensor // DET-ALL: linalg.generic {{{.*}}} ins(%{{.*}} : tensor<10xi32>) outs(%{{.*}} : tensor) { -// DET-ALL: ^bb0(%{{.*}}: i32, %{{.*}}: i32): +// DET-ALL: ^bb0(%{{.*}}: i32, %{{.*}}: i32): // DET-ALL: %{{.*}} = arith.addi %{{.*}}, %{{.*}} // DET-ALL: linalg.yield %{{.*}} : i32 // DET-ALL: } -> tensor // DET-ALL: tensor.extract %{{.*}}[] : tensor -// DET-ALL: cmpi slt, %{{.*}}, %{{.*}} : i32 +// DET-ALL: arith.cmpi slt(%{{.*}}, %{{.*}}) : i32 // DET-ALL: cf.cond_br %{{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^[[bb3:.*]](%{{.*}} : i32) // DET-ALL: ^[[bb2]](%{{.*}}: i32) // DET-ALL: tensor.from_elements %{{.*}} : tensor @@ -94,7 +94,7 @@ // DET-CF: ^bb1(%{{.*}}: tensor<10xi32>) // DET-CF: %{{.*}} = linalg.generic {{{.*}}} ins(%{{.*}} : tensor<10xi32>) outs(%{{.*}} : tensor) { // DET-CF: tensor.extract %{{.*}}[] : tensor -// DET-CF: cmpi slt, %{{.*}}, %{{.*}} : i32 +// DET-CF: arith.cmpi slt(%{{.*}}, %{{.*}}) : i32 // DET-CF: cf.cond_br %{{.*}}, ^bb2(%{{.*}} : tensor), ^bb3(%{{.*}} : tensor) // DET-CF: ^bb2(%{{.*}}: tensor) // DET-CF: %{{.*}} = linalg.generic {{{.*}}} ins(%{{.*}} : tensor) outs(%{{.*}} : tensor<10xi32>) { diff --git a/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir b/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir --- a/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir +++ b/mlir/test/Dialect/Linalg/detensorize_while_pure_cf.mlir @@ -21,8 +21,8 @@ %4 = linalg.generic #attrs ins(%2, %reshaped1 : tensor, tensor) outs(%3 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): - %8 = arith.cmpi slt, %arg0, %arg1 : i32 + ^bb0(%arg0: i32, %arg1: i32, %arg2: i1): + %8 = arith.cmpi slt(%arg0, %arg1) : i32 linalg.yield %8 : i1 } -> tensor %5 = tensor.extract %4[] : tensor @@ -33,7 +33,7 @@ %8 = linalg.generic #attrs ins(%6, %6 : tensor, tensor) outs(%7 : tensor) { - ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): + ^bb0(%arg0: i32, %arg1: i32, %arg2: i32): %9 = arith.addi %arg0, %arg1 : i32 linalg.yield %9 : i32 } -> tensor @@ -48,7 +48,7 @@ // CHECK-NEXT: arith.constant 10 // CHECK-NEXT: cf.br ^[[bb1:.*]](%{{.*}} : i32) // CHECK-NEXT: ^[[bb1]](%{{.*}}: i32) -// CHECK-NEXT: %{{.*}} = arith.cmpi slt, %{{.*}}, %{{.*}} +// CHECK-NEXT: %{{.*}} = arith.cmpi slt(%{{.*}}, %{{.*}}) // CHECK-NEXT: cf.cond_br %{{.*}}, ^[[bb2:.*]](%{{.*}} : i32), ^[[bb3:.*]] // CHECK-NEXT: ^[[bb2]](%{{.*}}: i32) // CHECK-NEXT: %{{.*}} = arith.addi %{{.*}}, %{{.*}} diff --git a/mlir/test/Dialect/Linalg/loops.mlir b/mlir/test/Dialect/Linalg/loops.mlir --- a/mlir/test/Dialect/Linalg/loops.mlir +++ b/mlir/test/Dialect/Linalg/loops.mlir @@ -527,7 +527,7 @@ ^bb(%a: f32, %b: f32, %c: f32) : %i = linalg.index 0 : index %0 = arith.constant 0 : index - %1 = arith.cmpi eq, %0, %i : index + %1 = arith.cmpi eq(%0, %i) : index %2 = arith.select %1, %b, %c : f32 %3 = arith.addf %a, %2 : f32 linalg.yield %3 : f32 @@ -568,7 +568,7 @@ func.func @generic_const_init(%arg0: memref) { %cst = arith.constant 1.0 : f32 linalg.generic #trait_const_fill outs(%arg0 : memref) { - ^bb0(%arg1: f32): + ^bb0(%arg1: f32): linalg.yield %cst : f32 } return diff --git a/mlir/test/Dialect/Linalg/roundtrip.mlir b/mlir/test/Dialect/Linalg/roundtrip.mlir --- a/mlir/test/Dialect/Linalg/roundtrip.mlir +++ b/mlir/test/Dialect/Linalg/roundtrip.mlir @@ -214,10 +214,10 @@ ins(%arg0, %arg1 : tensor, tensor) outs(%1, %3 : tensor, tensor) { ^bb0(%arg3: i32, %arg4: i32, %arg5: i32, %arg6: i32): - %5 = arith.cmpi sge, %arg3, %arg5 : i32 + %5 = arith.cmpi sge(%arg3, %arg5) : i32 %6 = arith.select %5, %arg3, %arg5 : i32 - %7 = arith.cmpi eq, %arg3, %arg5 : i32 - %8 = arith.cmpi slt, %arg4, %arg6 : i32 + %7 = arith.cmpi eq(%arg3, %arg5) : i32 + %8 = arith.cmpi slt(%arg4, %arg6) : i32 %9 = arith.select %8, %arg4, %arg6 : i32 %10 = arith.select %5, %arg4, %arg6 : i32 %11 = arith.select %7, %9, %10 : i32 diff --git a/mlir/test/Dialect/Linalg/tile-and-distribute.mlir b/mlir/test/Dialect/Linalg/tile-and-distribute.mlir --- a/mlir/test/Dialect/Linalg/tile-and-distribute.mlir +++ b/mlir/test/Dialect/Linalg/tile-and-distribute.mlir @@ -42,8 +42,8 @@ // CHECK-DAG: %[[BIDX:.*]] = gpu.block_id x // CHECK: %[[ITERY:.*]] = affine.apply #[[MAP0]]()[%[[BIDY]]] // CHECK: %[[ITERX:.*]] = affine.apply #[[MAP0]]()[%[[BIDX]]] -// CHECK: %[[INBOUNDSY:.*]] = arith.cmpi slt, %[[ITERY]], %{{.*}} -// CHECK: %[[INBOUNDSX:.*]] = arith.cmpi slt, %[[ITERX]], %{{.*}} +// CHECK: %[[INBOUNDSY:.*]] = arith.cmpi slt(%[[ITERY]], %{{.*}}) +// CHECK: %[[INBOUNDSX:.*]] = arith.cmpi slt(%[[ITERX]], %{{.*}}) // CHECK: %[[INBOUNDS:.*]] = arith.andi %[[INBOUNDSY]], %[[INBOUNDSX]] // CHECK: scf.if %[[INBOUNDS]] // CHECK: scf.for %[[ARG3:.*]] = @@ -102,7 +102,7 @@ // CHECK-DAG: %[[BIDY:.*]] = gpu.block_id y // CHECK-DAG: %[[BIDX:.*]] = gpu.block_id x // CHECK: %[[LBX:.*]] = affine.apply #[[MAP0]]()[%[[BIDX]]] -// CHECK: %[[INBOUNDS:.*]] = arith.cmpi slt, %[[LBX]], %{{.*}} +// CHECK: %[[INBOUNDS:.*]] = arith.cmpi slt(%[[LBX]], %{{.*}}) // CHECK: scf.if %[[INBOUNDS]] // CHECK: scf.for %[[ARG3:.*]] = // CHECK: %[[OFFSETY:.*]] = affine.apply #[[MAP0]]()[%[[BIDY]]] @@ -134,7 +134,7 @@ // CHECK: %[[LBY:.*]] = affine.apply #[[MAP0]]()[%[[BIDY]]] // CHECK: %[[LBX:.*]] = affine.apply #[[MAP0]]()[%[[BIDX]]] // CHECK: %[[STEPX:.*]] = affine.apply #[[MAP0]]()[%[[NBLOCKSX]]] -// CHECK: %[[INBOUNDS:.*]] = arith.cmpi slt, %[[LBY]], %{{.*}} +// CHECK: %[[INBOUNDS:.*]] = arith.cmpi slt(%[[LBY]], %{{.*}}) // CHECK: scf.if %[[INBOUNDS]] // CHECK: scf.parallel (%[[ARG3:.*]]) = (%[[LBX]]) to (%{{.*}}) step (%[[STEPX]]) // CHECK: scf.for %[[ARG4:.*]] = @@ -216,4 +216,3 @@ // CHECK: return %[[TD0]] : tensor return %0 : tensor } - diff --git a/mlir/test/Dialect/Linalg/tile-scalarize-dynamic-dims.mlir b/mlir/test/Dialect/Linalg/tile-scalarize-dynamic-dims.mlir --- a/mlir/test/Dialect/Linalg/tile-scalarize-dynamic-dims.mlir +++ b/mlir/test/Dialect/Linalg/tile-scalarize-dynamic-dims.mlir @@ -56,7 +56,7 @@ %13 = tensor.insert_slice %12 into %arg6[%arg5, 0] [32, 258] [1, 1] : tensor<32x258xf32> into tensor scf.yield %13 : tensor } - %7 = arith.cmpi slt, %5, %2 : index + %7 = arith.cmpi slt(%5, %2) : index %8 = scf.if %7 -> (tensor) { %10 = affine.apply #map2(%2)[%2] %11 = tensor.extract_slice %3[%5, 0] [%10, 259] [1, 1] : tensor to tensor diff --git a/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir b/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir --- a/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir @@ -21,7 +21,7 @@ // The first application computes the total size. // CHECK: %{{.*}} = affine.apply #[[$MAP13]]() // CHECK: %[[SIZE:.+]] = affine.apply #[[$MAP13]]() - // CHECK: %[[COND:.+]] = arith.cmpi eq, %[[SIZE]], %{{.*}} + // CHECK: %[[COND:.+]] = arith.cmpi eq(%[[SIZE]], %{{.*}}) // CHECK: cf.assert %[[COND]], "could not compute dynamic multi-size tile shapes" return %0 : tensor<13x42xf32> @@ -67,6 +67,6 @@ %0 = linalg.matmul ins(%arg0, %arg1: tensor, tensor) outs(%arg2: tensor) -> tensor - + return %0 : tensor } diff --git a/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir b/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir --- a/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir +++ b/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir @@ -33,7 +33,7 @@ outs(%D : tensor) { ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): %16 = arith.maxf %arg3, %cst : f32 - %17 = arith.cmpf ogt, %arg2, %cst : f32 + %17 = arith.cmpf ogt(%arg2, %cst) : f32 %18 = arith.select %17, %cst, %16 : f32 linalg.yield %18 : f32 } -> tensor @@ -93,7 +93,7 @@ outs(%D : tensor) { ^bb0(%arg2: f32, %arg3: f32, %arg4: f32): %16 = arith.maxf %arg3, %cst : f32 - %17 = arith.cmpf ogt, %arg2, %cst : f32 + %17 = arith.cmpf ogt(%arg2, %cst) : f32 %18 = arith.select %17, %cst, %16 : f32 linalg.yield %18 : f32 } -> tensor diff --git a/mlir/test/Dialect/Linalg/vectorization.mlir b/mlir/test/Dialect/Linalg/vectorization.mlir --- a/mlir/test/Dialect/Linalg/vectorization.mlir +++ b/mlir/test/Dialect/Linalg/vectorization.mlir @@ -344,8 +344,8 @@ %arg14 : f32): // CHECK: %[[ADD:.*]] = arith.addf %[[V0]], %[[V1]] : vector<4x256xf32> %6 = arith.addf %arg4, %arg6 : f32 - // CHECK: %[[CMP:.*]] = arith.cmpf ogt, %[[V2]], %[[V1]] : vector<4x256xf32> - %7 = arith.cmpf ogt, %arg3, %arg6 : f32 + // CHECK: %[[CMP:.*]] = arith.cmpf ogt(%[[V2]], %[[V1]]) : vector<4x256xf32> + %7 = arith.cmpf ogt(%arg3, %arg6) : f32 // CHECK: %[[ARG3B:.*]] = vector.broadcast %[[ARG3]] : f32 to vector<4x256xf32> %8 = arith.constant 2.0 : f32 // CHECK: %[[DIV:.*]] = arith.divf %[[V3]], %[[ARG3B]] : vector<4x256xf32> @@ -422,8 +422,8 @@ // CHECK: %[[V1:.*]] = vector.transfer_read %[[ARG0]][%[[C0]], %[[C0]]], {{.*}} : tensor<4x256xf32>, vector<4x256xf32> // CHECK: %[[ADD:.*]] = arith.addf %[[V0]], %[[V1]] : vector<4x256xf32> %6 = arith.addf %arg4, %arg6 : f32 - // CHECK: %[[CMP:.*]] = arith.cmpf ogt, %[[V2]], %[[V1]] : vector<4x256xf32> - %7 = arith.cmpf ogt, %arg3, %arg6 : f32 + // CHECK: %[[CMP:.*]] = arith.cmpf ogt(%[[V2]], %[[V1]]) : vector<4x256xf32> + %7 = arith.cmpf ogt(%arg3, %arg6) : f32 // CHECK: %[[ARG3B:.*]] = vector.broadcast %[[ARG3]] : f32 to vector<4x256xf32> %8 = arith.constant 2.0 : f32 // CHECK: %[[DIV:.*]] = arith.divf %[[V3]], %[[ARG3B]] : vector<4x256xf32> @@ -1083,7 +1083,7 @@ // ----- // This test checks that vectorization does not occur when an input indexing map -// is not a projected permutation. In the future, this can be converted to a +// is not a projected permutation. In the future, this can be converted to a // positive test when support is added. // CHECK-LABEL: func @not_projected_permutation diff --git a/mlir/test/Dialect/Math/expand-math.mlir b/mlir/test/Dialect/Math/expand-math.mlir --- a/mlir/test/Dialect/Math/expand-math.mlir +++ b/mlir/test/Dialect/Math/expand-math.mlir @@ -18,7 +18,7 @@ // CHECK: %[[DIVIDEND2:.+]] = arith.subf %[[EXP2]], %[[ONE]] : f32 // CHECK: %[[DIVISOR2:.+]] = arith.addf %[[EXP2]], %[[ONE]] : f32 // CHECK: %[[RES2:.+]] = arith.divf %[[DIVIDEND2]], %[[DIVISOR2]] : f32 -// CHECK: %[[COND:.+]] = arith.cmpf oge, %arg0, %[[ZERO]] : f32 +// CHECK: %[[COND:.+]] = arith.cmpf oge(%arg0, %[[ZERO]]) : f32 // CHECK: %[[RESULT:.+]] = arith.select %[[COND]], %[[RES1]], %[[RES2]] : f32 // CHECK: return %[[RESULT]] @@ -30,7 +30,7 @@ // CHECK: %[[C32:.+]] = arith.constant 32 : i32 // CHECK: %[[C1:.+]] = arith.constant 1 : i32 // CHECK: %[[WHILE:.+]]:3 = scf.while (%[[A1:.+]] = %arg0, %[[A2:.+]] = %[[C32]], %[[A3:.+]] = %[[C0]]) - // CHECK: %[[CMP:.+]] = arith.cmpi ne, %[[A1]], %[[A3]] + // CHECK: %[[CMP:.+]] = arith.cmpi ne(%[[A1]], %[[A3]]) // CHECK: scf.condition(%[[CMP]]) %[[A1]], %[[A2]], %[[A3]] // CHECK: %[[SHR:.+]] = arith.shrui %[[A1]], %[[C1]] // CHECK: %[[SUB:.+]] = arith.subi %[[A2]], %[[C1]] diff --git a/mlir/test/Dialect/Math/polynomial-approximation.mlir b/mlir/test/Dialect/Math/polynomial-approximation.mlir --- a/mlir/test/Dialect/Math/polynomial-approximation.mlir +++ b/mlir/test/Dialect/Math/polynomial-approximation.mlir @@ -37,10 +37,10 @@ // CHECK-DAG: %[[val_cst_26:.*]] = arith.constant 8.000000e-01 : f32 // CHECK-DAG: %[[val_cst_27:.*]] = arith.constant 2.000000e+00 : f32 // CHECK-DAG: %[[val_cst_28:.*]] = arith.constant 3.750000e+00 : f32 -// CHECK: %[[val_0:.*]] = arith.cmpf olt, %[[val_arg0]], %[[val_cst]] : f32 +// CHECK: %[[val_0:.*]] = arith.cmpf olt(%[[val_arg0]], %[[val_cst]]) : f32 // CHECK: %[[val_1:.*]] = arith.negf %[[val_arg0]] : f32 // CHECK: %[[val_2:.*]] = arith.select %[[val_0]], %[[val_1]], %[[val_arg0]] : f32 -// CHECK: %[[val_3:.*]] = arith.cmpf olt, %[[val_2]], %[[val_cst_26]] : f32 +// CHECK: %[[val_3:.*]] = arith.cmpf olt(%[[val_2]], %[[val_cst_26]]) : f32 // CHECK: %[[val_4:.*]] = arith.select %[[val_3]], %[[val_cst_1]], %[[val_cst_5]] : f32 // CHECK: %[[val_5:.*]] = arith.select %[[val_3]], %[[val_cst_14]], %[[val_cst_18]] : f32 // CHECK: %[[val_6:.*]] = arith.select %[[val_3]], %[[val_cst_2]], %[[val_cst_6]] : f32 @@ -49,7 +49,7 @@ // CHECK: %[[val_9:.*]] = arith.select %[[val_3]], %[[val_cst_16]], %[[val_cst_20]] : f32 // CHECK: %[[val_10:.*]] = arith.select %[[val_3]], %[[val_cst_4]], %[[val_cst_8]] : f32 // CHECK: %[[val_11:.*]] = arith.select %[[val_3]], %[[val_cst_17]], %[[val_cst_21]] : f32 -// CHECK: %[[val_12:.*]] = arith.cmpf olt, %[[val_2]], %[[val_cst_27]] : f32 +// CHECK: %[[val_12:.*]] = arith.cmpf olt(%[[val_2]], %[[val_cst_27]]) : f32 // CHECK: %[[val_13:.*]] = arith.select %[[val_12]], %[[val_cst]], %[[val_cst_9]] : f32 // CHECK: %[[val_14:.*]] = arith.select %[[val_12]], %[[val_4]], %[[val_cst_10]] : f32 // CHECK: %[[val_15:.*]] = arith.select %[[val_12]], %[[val_5]], %[[val_cst_22]] : f32 @@ -60,7 +60,7 @@ // CHECK: %[[val_20:.*]] = arith.select %[[val_12]], %[[val_10]], %[[val_cst_13]] : f32 // CHECK: %[[val_21:.*]] = arith.select %[[val_12]], %[[val_11]], %[[val_cst_25]] : f32 // CHECK: %[[val_22:.*]] = arith.select %[[val_12]], %[[val_cst]], %[[val_cst_0]] : f32 -// CHECK: %[[val_23:.*]] = arith.cmpf ult, %[[val_2]], %[[val_cst_28]] : f32 +// CHECK: %[[val_23:.*]] = arith.cmpf ult(%[[val_2]], %[[val_cst_28]]) : f32 // CHECK: %[[val_24:.*]] = math.fma %[[val_2]], %[[val_20]], %[[val_18]] : f32 // CHECK: %[[val_25:.*]] = math.fma %[[val_2]], %[[val_24]], %[[val_16]] : f32 // CHECK: %[[val_26:.*]] = math.fma %[[val_2]], %[[val_25]], %[[val_14]] : f32 @@ -110,7 +110,7 @@ // CHECK-DAG: %[[VAL_12:.*]] = arith.constant 1.17549435E-38 : f32 // CHECK-DAG: %[[VAL_13:.*]] = arith.constant 127 : i32 // CHECK-DAG: %[[VAL_14:.*]] = arith.constant -127 : i32 -// CHECK: %[[IS_NAN:.*]] = arith.cmpf uno, %[[VAL_0]], %[[VAL_0]] : f32 +// CHECK: %[[IS_NAN:.*]] = arith.cmpf uno(%[[VAL_0]], %[[VAL_0]]) : f32 // CHECK: %[[VAL_15:.*]] = arith.mulf %[[VAL_0]], %[[VAL_2]] : f32 // CHECK: %[[VAL_16:.*]] = math.floor %[[VAL_15]] : f32 // CHECK: %[[VAL_17:.*]] = arith.mulf %[[VAL_16]], %[[VAL_1]] : f32 @@ -127,11 +127,11 @@ // CHECK: %[[VAL_28:.*]] = arith.shli %[[VAL_27]], %[[VAL_8]] : i32 // CHECK: %[[VAL_29:.*]] = arith.bitcast %[[VAL_28]] : i32 to f32 // CHECK: %[[VAL_30:.*]] = arith.mulf %[[VAL_25]], %[[VAL_29]] : f32 -// CHECK: %[[VAL_31:.*]] = arith.cmpi sle, %[[VAL_26]], %[[VAL_13]] : i32 -// CHECK: %[[VAL_32:.*]] = arith.cmpi sge, %[[VAL_26]], %[[VAL_14]] : i32 -// CHECK: %[[VAL_33:.*]] = arith.cmpf oeq, %[[VAL_0]], %[[VAL_11]] : f32 -// CHECK: %[[VAL_34:.*]] = arith.cmpf oeq, %[[VAL_0]], %[[VAL_10]] : f32 -// CHECK: %[[VAL_35:.*]] = arith.cmpf ogt, %[[VAL_0]], %[[VAL_9]] : f32 +// CHECK: %[[VAL_31:.*]] = arith.cmpi sle(%[[VAL_26]], %[[VAL_13]]) : i32 +// CHECK: %[[VAL_32:.*]] = arith.cmpi sge(%[[VAL_26]], %[[VAL_14]]) : i32 +// CHECK: %[[VAL_33:.*]] = arith.cmpf oeq(%[[VAL_0]], %[[VAL_11]]) : f32 +// CHECK: %[[VAL_34:.*]] = arith.cmpf oeq(%[[VAL_0]], %[[VAL_10]]) : f32 +// CHECK: %[[VAL_35:.*]] = arith.cmpf ogt(%[[VAL_0]], %[[VAL_9]]) : f32 // CHECK: %[[VAL_36:.*]] = arith.andi %[[VAL_31]], %[[VAL_32]] : i1 // CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_35]], %[[VAL_10]], %[[VAL_12]] : f32 // CHECK: %[[VAL_38:.*]] = arith.select %[[VAL_36]], %[[VAL_30]], %[[VAL_37]] : f32 @@ -165,13 +165,13 @@ // CHECK-NOT: exp // CHECK-COUNT-4: select // CHECK: %[[EXP_X:.*]] = arith.select -// CHECK: %[[IS_ONE_OR_NAN:.*]] = arith.cmpf ueq, %[[EXP_X]], %[[CST_ONE]] : f32 +// CHECK: %[[IS_ONE_OR_NAN:.*]] = arith.cmpf ueq(%[[EXP_X]], %[[CST_ONE]]) : f32 // CHECK: %[[VAL_59:.*]] = arith.subf %[[EXP_X]], %[[CST_ONE]] : f32 -// CHECK: %[[VAL_60:.*]] = arith.cmpf oeq, %[[VAL_59]], %[[CST_MINUSONE]] : f32 +// CHECK: %[[VAL_60:.*]] = arith.cmpf oeq(%[[VAL_59]], %[[CST_MINUSONE]]) : f32 // CHECK-NOT: log // CHECK-COUNT-5: select // CHECK: %[[LOG_U:.*]] = arith.select -// CHECK: %[[VAL_104:.*]] = arith.cmpf oeq, %[[LOG_U]], %[[EXP_X]] : f32 +// CHECK: %[[VAL_104:.*]] = arith.cmpf oeq(%[[LOG_U]], %[[EXP_X]]) : f32 // CHECK: %[[VAL_105:.*]] = arith.divf %[[X]], %[[LOG_U]] : f32 // CHECK: %[[VAL_106:.*]] = arith.mulf %[[VAL_59]], %[[VAL_105]] : f32 // CHECK: %[[VAL_107:.*]] = arith.select %[[VAL_104]], %[[EXP_X]], %[[VAL_106]] : f32 @@ -225,7 +225,7 @@ // CHECK: %[[VAL_20:.*]] = arith.constant 1056964608 : i32 // CHECK: %[[VAL_21:.*]] = arith.constant 23 : i32 // CHECK: %[[VAL_22:.*]] = arith.constant 0.693147182 : f32 -// CHECK: %[[VAL_23:.*]] = arith.cmpf ugt, %[[X]], %[[VAL_4]] : f32 +// CHECK: %[[VAL_23:.*]] = arith.cmpf ugt(%[[X]], %[[VAL_4]]) : f32 // CHECK: %[[VAL_24:.*]] = arith.select %[[VAL_23]], %[[X]], %[[VAL_4]] : f32 // CHECK-NOT: frexp // CHECK: %[[VAL_25:.*]] = arith.bitcast %[[VAL_24]] : f32 to i32 @@ -236,7 +236,7 @@ // CHECK: %[[VAL_30:.*]] = arith.shrui %[[VAL_29]], %[[VAL_21]] : i32 // CHECK: %[[VAL_31:.*]] = arith.sitofp %[[VAL_30]] : i32 to f32 // CHECK: %[[VAL_32:.*]] = arith.subf %[[VAL_31]], %[[VAL_18]] : f32 -// CHECK: %[[VAL_33:.*]] = arith.cmpf olt, %[[VAL_28]], %[[VAL_8]] : f32 +// CHECK: %[[VAL_33:.*]] = arith.cmpf olt(%[[VAL_28]], %[[VAL_8]]) : f32 // CHECK: %[[VAL_34:.*]] = arith.select %[[VAL_33]], %[[VAL_28]], %[[VAL_1]] : f32 // CHECK: %[[VAL_35:.*]] = arith.subf %[[VAL_28]], %[[VAL_2]] : f32 // CHECK: %[[VAL_36:.*]] = arith.select %[[VAL_33]], %[[VAL_2]], %[[VAL_1]] : f32 @@ -256,9 +256,9 @@ // CHECK: %[[VAL_50:.*]] = math.fma %[[VAL_3]], %[[VAL_39]], %[[VAL_49]] : f32 // CHECK: %[[VAL_51:.*]] = arith.addf %[[VAL_38]], %[[VAL_50]] : f32 // CHECK: %[[VAL_52:.*]] = math.fma %[[VAL_37]], %[[VAL_22]], %[[VAL_51]] : f32 -// CHECK: %[[VAL_53:.*]] = arith.cmpf ult, %[[X]], %[[VAL_1]] : f32 -// CHECK: %[[VAL_54:.*]] = arith.cmpf oeq, %[[X]], %[[VAL_1]] : f32 -// CHECK: %[[VAL_55:.*]] = arith.cmpf oeq, %[[X]], %[[VAL_6]] : f32 +// CHECK: %[[VAL_53:.*]] = arith.cmpf ult(%[[X]], %[[VAL_1]]) : f32 +// CHECK: %[[VAL_54:.*]] = arith.cmpf oeq(%[[X]], %[[VAL_1]]) : f32 +// CHECK: %[[VAL_55:.*]] = arith.cmpf oeq(%[[X]], %[[VAL_6]]) : f32 // CHECK: %[[VAL_56:.*]] = arith.select %[[VAL_55]], %[[VAL_6]], %[[VAL_52]] : f32 // CHECK: %[[VAL_57:.*]] = arith.select %[[VAL_53]], %[[VAL_7]], %[[VAL_56]] : f32 // CHECK: %[[VAL_58:.*]] = arith.select %[[VAL_54]], %[[VAL_5]], %[[VAL_57]] : f32 @@ -309,11 +309,11 @@ // CHECK-SAME: %[[X:.*]]: f32) -> f32 { // CHECK: %[[CST_ONE:.*]] = arith.constant 1.000000e+00 : f32 // CHECK: %[[U:.*]] = arith.addf %[[X]], %[[CST_ONE]] : f32 -// CHECK: %[[U_SMALL:.*]] = arith.cmpf oeq, %[[U]], %[[CST_ONE]] : f32 +// CHECK: %[[U_SMALL:.*]] = arith.cmpf oeq(%[[U]], %[[CST_ONE]]) : f32 // CHECK-NOT: log // CHECK-COUNT-5: select // CHECK: %[[LOG_U:.*]] = arith.select -// CHECK: %[[U_INF:.*]] = arith.cmpf oeq, %[[U]], %[[LOG_U]] : f32 +// CHECK: %[[U_INF:.*]] = arith.cmpf oeq(%[[U]], %[[LOG_U]]) : f32 // CHECK: %[[VAL_69:.*]] = arith.subf %[[U]], %[[CST_ONE]] : f32 // CHECK: %[[VAL_70:.*]] = arith.divf %[[LOG_U]], %[[VAL_69]] : f32 // CHECK: %[[LOG_LARGE:.*]] = arith.mulf %[[X]], %[[VAL_70]] : f32 @@ -355,12 +355,12 @@ // CHECK: %[[VAL_12:.*]] = arith.constant 0.00226843474 : f32 // CHECK: %[[VAL_13:.*]] = arith.constant 1.18534706E-4 : f32 // CHECK: %[[VAL_14:.*]] = arith.constant 1.19825836E-6 : f32 -// CHECK: %[[VAL_15:.*]] = arith.cmpf ult, %[[VAL_0]], %[[VAL_2]] : f32 +// CHECK: %[[VAL_15:.*]] = arith.cmpf ult(%[[VAL_0]], %[[VAL_2]]) : f32 // CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_15]], %[[VAL_0]], %[[VAL_2]] : f32 -// CHECK: %[[VAL_17:.*]] = arith.cmpf ugt, %[[VAL_16]], %[[VAL_1]] : f32 +// CHECK: %[[VAL_17:.*]] = arith.cmpf ugt(%[[VAL_16]], %[[VAL_1]]) : f32 // CHECK: %[[VAL_18:.*]] = arith.select %[[VAL_17]], %[[VAL_16]], %[[VAL_1]] : f32 // CHECK: %[[VAL_19:.*]] = math.absf %[[VAL_0]] : f32 -// CHECK: %[[VAL_20:.*]] = arith.cmpf olt, %[[VAL_19]], %[[VAL_3]] : f32 +// CHECK: %[[VAL_20:.*]] = arith.cmpf olt(%[[VAL_19]], %[[VAL_3]]) : f32 // CHECK: %[[VAL_21:.*]] = arith.mulf %[[VAL_18]], %[[VAL_18]] : f32 // CHECK: %[[VAL_22:.*]] = math.fma %[[VAL_21]], %[[VAL_10]], %[[VAL_9]] : f32 // CHECK: %[[VAL_23:.*]] = math.fma %[[VAL_21]], %[[VAL_22]], %[[VAL_8]] : f32 @@ -413,8 +413,8 @@ // AVX2: %[[VAL_3:.*]] = arith.constant dense<-5.000000e-01> : vector<8xf32> // AVX2: %[[VAL_4:.*]] = arith.constant dense<1.17549435E-38> : vector<8xf32> // AVX2: %[[VAL_5:.*]] = arith.mulf %[[VAL_0]], %[[VAL_3]] : vector<8xf32> -// AVX2: %[[VAL_6:.*]] = arith.cmpf olt, %[[VAL_0]], %[[VAL_4]] : vector<8xf32> -// AVX2: %[[VAL_7:.*]] = arith.cmpf oeq, %[[VAL_0]], %[[VAL_1]] : vector<8xf32> +// AVX2: %[[VAL_6:.*]] = arith.cmpf olt(%[[VAL_0]], %[[VAL_4]]) : vector<8xf32> +// AVX2: %[[VAL_7:.*]] = arith.cmpf oeq(%[[VAL_0]], %[[VAL_1]]) : vector<8xf32> // AVX2: %[[VAL_8:.*]] = arith.ori %[[VAL_6]], %[[VAL_7]] : vector<8xi1> // AVX2: %[[VAL_9:.*]] = x86vector.avx.rsqrt %[[VAL_0]] : vector<8xf32> // AVX2: %[[VAL_10:.*]] = arith.mulf %[[VAL_5]], %[[VAL_9]] : vector<8xf32> @@ -519,7 +519,7 @@ // CHECK-DAG: %[[HALF_PI:.+]] = arith.constant 1.57079637 // CHECK-DAG: %[[ABS:.+]] = math.absf %arg0 // CHECK-DAG: %[[DIV:.+]] = arith.divf %cst, %[[ABS]] -// CHECK-DAG: %[[CMP:.+]] = arith.cmpf olt, %[[ABS]], %[[DIV]] +// CHECK-DAG: %[[CMP:.+]] = arith.cmpf olt(%[[ABS]], %[[DIV]]) // CHECK-DAG: %[[SEL:.+]] = arith.select %[[CMP]], %[[ABS]], %[[DIV]] // CHECK-DAG: %[[P0:.+]] = math.fma %[[SEL]], %[[N1]], %[[N2]] // CHECK-DAG: %[[P1:.+]] = math.fma %[[SEL]], %[[P0]], %[[N3]] @@ -549,7 +549,7 @@ // CHECK-DAG: %[[RATIO:.+]] = arith.divf %[[ARG0]], %[[ARG1]] // CHECK-DAG: %[[ABS:.+]] = math.absf %[[RATIO]] // CHECK-DAG: %[[DIV:.+]] = arith.divf %cst, %[[ABS]] -// CHECK-DAG: %[[CMP:.+]] = arith.cmpf olt, %[[ABS]], %[[DIV]] +// CHECK-DAG: %[[CMP:.+]] = arith.cmpf olt(%[[ABS]], %[[DIV]]) // CHECK-DAG: %[[SEL:.+]] = arith.select %[[CMP]], %[[ABS]], %[[DIV]] // CHECK-DAG: %[[P0:.+]] = math.fma %[[SEL]], %[[N1]], %[[N2]] // CHECK-DAG: %[[P1:.+]] = math.fma %[[SEL]], %[[P0]], %[[N3]] @@ -564,25 +564,25 @@ // CHECK-DAG: %[[PI:.+]] = arith.constant 3.14159274 // CHECK-DAG: %[[ADD_PI:.+]] = arith.addf %[[ATAN]], %[[PI]] // CHECK-DAG: %[[SUB_PI:.+]] = arith.subf %[[ATAN]], %[[PI]] -// CHECK-DAG: %[[CMP_ATAN:.+]] = arith.cmpf ogt, %[[ATAN]], %[[ZERO]] +// CHECK-DAG: %[[CMP_ATAN:.+]] = arith.cmpf ogt(%[[ATAN]], %[[ZERO]]) // CHECK-DAG: %[[ATAN_ADJUST:.+]] = arith.select %[[CMP_ATAN]], %[[SUB_PI]], %[[ADD_PI]] -// CHECK-DAG: %[[X_NEG:.+]] = arith.cmpf ogt, %[[ARG1]], %[[ZERO]] +// CHECK-DAG: %[[X_NEG:.+]] = arith.cmpf ogt(%[[ARG1]], %[[ZERO]]) // CHECK-DAG: %[[ATAN_EST:.+]] = arith.select %[[X_NEG]], %[[ATAN]], %[[ATAN_ADJUST]] // Handle PI / 2 edge case: -// CHECK-DAG: %[[X_ZERO:.+]] = arith.cmpf oeq, %[[ARG1]], %[[ZERO]] -// CHECK-DAG: %[[Y_POS:.+]] = arith.cmpf ogt, %[[ARG0]], %[[ZERO]] +// CHECK-DAG: %[[X_ZERO:.+]] = arith.cmpf oeq(%[[ARG1]], %[[ZERO]]) +// CHECK-DAG: %[[Y_POS:.+]] = arith.cmpf ogt(%[[ARG0]], %[[ZERO]]) // CHECK-DAG: %[[IS_HALF_PI:.+]] = arith.andi %[[X_ZERO]], %[[Y_POS]] // CHECK-DAG: %[[EDGE1:.+]] = arith.select %[[IS_HALF_PI]], %[[HALF_PI]], %[[ATAN_EST]] // Handle -PI / 2 edge case: // CHECK-DAG: %[[NEG_HALF_PI:.+]] = arith.constant -1.57079637 -// CHECK-DAG: %[[Y_NEG:.+]] = arith.cmpf olt, %[[ARG0]], %[[ZERO]] +// CHECK-DAG: %[[Y_NEG:.+]] = arith.cmpf olt(%[[ARG0]], %[[ZERO]]) // CHECK-DAG: %[[IS_NEG_HALF_PI:.+]] = arith.andi %[[X_ZERO]], %[[Y_NEG]] // CHECK-DAG: %[[EDGE2:.+]] = arith.select %[[IS_NEG_HALF_PI]], %[[NEG_HALF_PI]], %[[EDGE1]] // Handle Nan edgecase: -// CHECK-DAG: %[[Y_ZERO:.+]] = arith.cmpf oeq, %[[ARG0]], %[[ZERO]] +// CHECK-DAG: %[[Y_ZERO:.+]] = arith.cmpf oeq(%[[ARG0]], %[[ZERO]]) // CHECK-DAG: %[[X_Y_ZERO:.+]] = arith.andi %[[X_ZERO]], %[[Y_ZERO]] // CHECK-DAG: %[[NAN:.+]] = arith.constant 0x7FC00000 // CHECK-DAG: %[[EDGE3:.+]] = arith.select %[[X_Y_ZERO]], %[[NAN]], %[[EDGE2]] diff --git a/mlir/test/Dialect/MemRef/expand-ops.mlir b/mlir/test/Dialect/MemRef/expand-ops.mlir --- a/mlir/test/Dialect/MemRef/expand-ops.mlir +++ b/mlir/test/Dialect/MemRef/expand-ops.mlir @@ -8,7 +8,7 @@ } // CHECK: %0 = memref.generic_atomic_rmw %arg0[%arg2] : memref<10xf32> { // CHECK: ^bb0([[CUR_VAL:%.*]]: f32): -// CHECK: [[CMP:%.*]] = arith.cmpf ogt, [[CUR_VAL]], [[f]] : f32 +// CHECK: [[CMP:%.*]] = arith.cmpf ogt([[CUR_VAL]], [[f]]) : f32 // CHECK: [[SELECT:%.*]] = arith.select [[CMP]], [[CUR_VAL]], [[f]] : f32 // CHECK: memref.atomic_yield [[SELECT]] : f32 // CHECK: } diff --git a/mlir/test/Dialect/SCF/bufferize.mlir b/mlir/test/Dialect/SCF/bufferize.mlir --- a/mlir/test/Dialect/SCF/bufferize.mlir +++ b/mlir/test/Dialect/SCF/bufferize.mlir @@ -90,7 +90,7 @@ func.func @bufferize_while(%arg0: i64, %arg1: i64, %arg2: tensor) -> (i64, tensor) { %c2_i64 = arith.constant 2 : i64 %0:3 = scf.while (%arg3 = %arg0, %arg4 = %arg2) : (i64, tensor) -> (i64, i64, tensor) { - %1 = arith.cmpi slt, %arg3, %arg1 : i64 + %1 = arith.cmpi slt(%arg3, %arg1) : i64 scf.condition(%1) %arg3, %arg3, %arg4 : i64, i64, tensor } do { ^bb0(%arg5: i64, %arg6: i64, %arg7: tensor): diff --git a/mlir/test/Dialect/SCF/canonicalize.mlir b/mlir/test/Dialect/SCF/canonicalize.mlir --- a/mlir/test/Dialect/SCF/canonicalize.mlir +++ b/mlir/test/Dialect/SCF/canonicalize.mlir @@ -324,7 +324,7 @@ // CHECK: [[V0:%.*]] = arith.select {{.*}}, [[C0]], [[C1]] // CHECK: scf.if {{.*}} { // CHECK: "test.op"() : () -> () -// CHECK: } +// CHECK: } // CHECK: return [[V0]] : index // ----- @@ -547,7 +547,7 @@ scf.yield %0, %1 : i32, f32 } } - return + return } // CHECK-LABEL: @merge_yielding_nested_if_nv2 @@ -557,7 +557,7 @@ // CHECK: %[[PRE1:.*]] = "test.op1"() : () -> i32 // CHECK: %[[COND:.*]] = arith.andi %[[ARG0]], %[[ARG1]] // CHECK: %[[RES:.*]] = arith.select %[[ARG0]], %[[PRE0]], %[[PRE1]] -// CHECK: scf.if %[[COND]] +// CHECK: scf.if %[[COND]] // CHECK: "test.run"() : () -> () // CHECK: } // CHECK: return %[[RES]] @@ -986,7 +986,7 @@ // CHECK-NEXT: %[[cmp:.+]] = "test.condition"() : () -> i1 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[cmp]] : i1 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg0: i1): +// CHECK-NEXT: ^bb0(%arg0: i1): // CHECK-NEXT: "test.use"(%[[true]]) : (i1) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -1009,7 +1009,7 @@ // CHECK-NEXT: %[[cmp:.*]] = "test.condition"(%[[arg2]]) : (i32) -> i1 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[arg2]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%[[post:.+]]: i32): +// CHECK-NEXT: ^bb0(%[[post:.+]]: i32): // CHECK-NEXT: %[[next:.+]] = "test.use"(%[[post]]) : (i32) -> i32 // CHECK-NEXT: scf.yield %[[next]] : i32 // CHECK-NEXT: } @@ -1025,7 +1025,7 @@ %cst_42 = arith.constant dense<42> : tensor %0:5 = scf.while (%arg0 = %cst_0, %arg1 = %f_arg0, %arg2 = %cst_1, %arg3 = %cst_1, %arg4 = %cst_0) : (tensor, tensor, tensor, tensor, tensor) -> (tensor, tensor, tensor, tensor, tensor) { - %1 = arith.cmpi slt, %arg0, %cst_42 : tensor + %1 = arith.cmpi slt(%arg0, %cst_42) : tensor %2 = tensor.extract %1[] : tensor scf.condition(%2) %arg0, %arg1, %arg2, %arg3, %arg4 : tensor, tensor, tensor, tensor, tensor } do { @@ -1041,7 +1041,7 @@ // CHECK: %[[ONE:.*]] = arith.constant dense<1> // CHECK: %[[CST42:.*]] = arith.constant dense<42> // CHECK: %[[WHILE:.*]]:3 = scf.while (%[[ARG0:.*]] = %[[ZERO]], %[[ARG2:.*]] = %[[ONE]], %[[ARG3:.*]] = %[[ONE]]) -// CHECK: arith.cmpi slt, %[[ARG0]], %{{.*}} +// CHECK: arith.cmpi slt(%[[ARG0]], %{{.*}}) // CHECK: tensor.extract %{{.*}}[] // CHECK: scf.condition(%{{.*}}) %[[ARG0]], %[[ARG2]], %[[ARG3]] // CHECK: } do { @@ -1059,7 +1059,7 @@ %cst_42 = arith.constant dense<42> : tensor %0:6 = scf.while (%arg0 = %cst_0, %arg1 = %cst_1, %arg2 = %cst_1, %arg3 = %cst_1, %arg4 = %cst_0) : (tensor, tensor, tensor, tensor, tensor) -> (tensor, tensor, tensor, tensor, tensor, tensor) { - %1 = arith.cmpi slt, %arg0, %cst_42 : tensor + %1 = arith.cmpi slt(%arg0, %cst_42) : tensor %2 = tensor.extract %1[] : tensor scf.condition(%2) %arg1, %arg0, %arg2, %arg0, %arg3, %arg4 : tensor, tensor, tensor, tensor, tensor, tensor } do { @@ -1074,7 +1074,7 @@ // CHECK: %[[ONE:.*]] = arith.constant dense<1> // CHECK: %[[CST42:.*]] = arith.constant dense<42> // CHECK: %[[WHILE:.*]]:2 = scf.while (%[[ARG1:.*]] = %[[ONE]], %[[ARG4:.*]] = %[[ZERO]]) -// CHECK: arith.cmpi slt, %[[ZERO]], %[[CST42]] +// CHECK: arith.cmpi slt(%[[ZERO]], %[[CST42]]) // CHECK: tensor.extract %{{.*}}[] // CHECK: scf.condition(%{{.*}}) %[[ARG1]], %[[ARG4]] // CHECK: } do { @@ -1105,7 +1105,7 @@ // CHECK-NEXT: %{{.*}} = "test.get_some_value"() : () -> i64 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%[[arg:.*]]: i32): +// CHECK-NEXT: ^bb0(%[[arg:.*]]: i32): // CHECK-NEXT: "test.use"(%[[arg]]) : (i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -1115,12 +1115,12 @@ func.func @while_cmp_lhs(%arg0 : i32) { %0 = scf.while () : () -> i32 { %val = "test.val"() : () -> i32 - %condition = arith.cmpi ne, %val, %arg0 : i32 + %condition = arith.cmpi ne(%val, %arg0) : i32 scf.condition(%condition) %val : i32 } do { ^bb0(%val2: i32): - %condition2 = arith.cmpi ne, %val2, %arg0 : i32 - %negcondition2 = arith.cmpi eq, %val2, %arg0 : i32 + %condition2 = arith.cmpi ne(%val2, %arg0) : i32 + %negcondition2 = arith.cmpi eq(%val2, %arg0) : i32 "test.use"(%condition2, %negcondition2, %val2) : (i1, i1, i32) -> () scf.yield } @@ -1130,10 +1130,10 @@ // CHECK-DAG: %[[false:.+]] = arith.constant false // CHECK-DAG: %{{.+}} = scf.while : () -> i32 { // CHECK-NEXT: %[[val:.+]] = "test.val" -// CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne, %[[val]], %arg0 : i32 +// CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne(%[[val]], %arg0) : i32 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg1: i32): +// CHECK-NEXT: ^bb0(%arg1: i32): // CHECK-NEXT: "test.use"(%[[true]], %[[false]], %arg1) : (i1, i1, i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } @@ -1142,12 +1142,12 @@ func.func @while_cmp_rhs(%arg0 : i32) { %0 = scf.while () : () -> i32 { %val = "test.val"() : () -> i32 - %condition = arith.cmpi ne, %arg0, %val : i32 + %condition = arith.cmpi ne(%arg0, %val) : i32 scf.condition(%condition) %val : i32 } do { ^bb0(%val2: i32): - %condition2 = arith.cmpi ne, %arg0, %val2 : i32 - %negcondition2 = arith.cmpi eq, %arg0, %val2 : i32 + %condition2 = arith.cmpi ne(%arg0, %val2) : i32 + %negcondition2 = arith.cmpi eq(%arg0, %val2) : i32 "test.use"(%condition2, %negcondition2, %val2) : (i1, i1, i32) -> () scf.yield } @@ -1157,10 +1157,10 @@ // CHECK-DAG: %[[false:.+]] = arith.constant false // CHECK-DAG: %{{.+}} = scf.while : () -> i32 { // CHECK-NEXT: %[[val:.+]] = "test.val" -// CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne, %arg0, %[[val]] : i32 +// CHECK-NEXT: %[[cmp:.+]] = arith.cmpi ne(%arg0, %[[val]]) : i32 // CHECK-NEXT: scf.condition(%[[cmp]]) %[[val]] : i32 // CHECK-NEXT: } do { -// CHECK-NEXT: ^bb0(%arg1: i32): +// CHECK-NEXT: ^bb0(%arg1: i32): // CHECK-NEXT: "test.use"(%[[true]], %[[false]], %arg1) : (i1, i1, i32) -> () // CHECK-NEXT: scf.yield // CHECK-NEXT: } diff --git a/mlir/test/Dialect/SCF/for-loop-specialization.mlir b/mlir/test/Dialect/SCF/for-loop-specialization.mlir --- a/mlir/test/Dialect/SCF/for-loop-specialization.mlir +++ b/mlir/test/Dialect/SCF/for-loop-specialization.mlir @@ -25,7 +25,7 @@ // CHECK: [[DIM_0:%.*]] = memref.dim [[ARG1]], [[CST_0]] : memref // CHECK: [[MIN:%.*]] = affine.min #map(){{\[}}[[DIM_0]], [[ARG0]]] // CHECK: [[CST_1024:%.*]] = arith.constant 1024 : index -// CHECK: [[PRED:%.*]] = arith.cmpi eq, [[MIN]], [[CST_1024]] : index +// CHECK: [[PRED:%.*]] = arith.cmpi eq([[MIN]], [[CST_1024]]) : index // CHECK: scf.if [[PRED]] { // CHECK: scf.for [[IDX0:%.*]] = [[CST_0]] to [[CST_1024]] step [[CST_1]] { // CHECK: memref.store diff --git a/mlir/test/Dialect/SCF/for-loop-to-while-loop.mlir b/mlir/test/Dialect/SCF/for-loop-to-while-loop.mlir --- a/mlir/test/Dialect/SCF/for-loop-to-while-loop.mlir +++ b/mlir/test/Dialect/SCF/for-loop-to-while-loop.mlir @@ -8,7 +8,7 @@ // CHECK: %[[VAL_3:.*]] = arith.constant 0 : index // CHECK: %[[VAL_4:.*]] = arith.constant 1 : index // CHECK: %[[VAL_5:.*]] = scf.while (%[[VAL_6:.*]] = %[[VAL_3]]) : (index) -> index { -// CHECK: %[[VAL_7:.*]] = arith.cmpi slt, %[[VAL_6]], %[[VAL_1]] : index +// CHECK: %[[VAL_7:.*]] = arith.cmpi slt(%[[VAL_6]], %[[VAL_1]]) : index // CHECK: scf.condition(%[[VAL_7]]) %[[VAL_6]] : index // CHECK: } do { // CHECK: ^bb0(%[[VAL_8:.*]]: index): @@ -38,13 +38,13 @@ // CHECK: %[[VAL_3:.*]] = arith.constant 0 : index // CHECK: %[[VAL_4:.*]] = arith.constant 1 : index // CHECK: %[[VAL_5:.*]] = scf.while (%[[VAL_6:.*]] = %[[VAL_3]]) : (index) -> index { -// CHECK: %[[VAL_7:.*]] = arith.cmpi slt, %[[VAL_6]], %[[VAL_1]] : index +// CHECK: %[[VAL_7:.*]] = arith.cmpi slt(%[[VAL_6]], %[[VAL_1]]) : index // CHECK: scf.condition(%[[VAL_7]]) %[[VAL_6]] : index // CHECK: } do { // CHECK: ^bb0(%[[VAL_8:.*]]: index): // CHECK: %[[VAL_9:.*]] = arith.addi %[[VAL_8]], %[[VAL_4]] : index // CHECK: %[[VAL_10:.*]] = scf.while (%[[VAL_11:.*]] = %[[VAL_3]]) : (index) -> index { -// CHECK: %[[VAL_12:.*]] = arith.cmpi slt, %[[VAL_11]], %[[VAL_1]] : index +// CHECK: %[[VAL_12:.*]] = arith.cmpi slt(%[[VAL_11]], %[[VAL_1]]) : index // CHECK: scf.condition(%[[VAL_12]]) %[[VAL_11]] : index // CHECK: } do { // CHECK: ^bb0(%[[VAL_13:.*]]: index): @@ -78,7 +78,7 @@ // CHECK-SAME: %[[VAL_2:.*]]: index) -> f32 { // CHECK: %[[VAL_3:.*]] = arith.constant 0.000000e+00 : f32 // CHECK: %[[VAL_4:.*]]:3 = scf.while (%[[VAL_5:.*]] = %[[VAL_0]], %[[VAL_6:.*]] = %[[VAL_3]], %[[VAL_7:.*]] = %[[VAL_3]]) : (index, f32, f32) -> (index, f32, f32) { -// CHECK: %[[VAL_8:.*]] = arith.cmpi slt, %[[VAL_5]], %[[VAL_1]] : index +// CHECK: %[[VAL_8:.*]] = arith.cmpi slt(%[[VAL_5]], %[[VAL_1]]) : index // CHECK: scf.condition(%[[VAL_8]]) %[[VAL_5]], %[[VAL_6]], %[[VAL_7]] : index, f32, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_9:.*]]: index, %[[VAL_10:.*]]: f32, %[[VAL_11:.*]]: f32): @@ -106,13 +106,13 @@ // CHECK: %[[VAL_3:.*]] = arith.constant 0 : index // CHECK: %[[VAL_4:.*]] = arith.constant 1 : index // CHECK: %[[VAL_5:.*]]:2 = scf.while (%[[VAL_6:.*]] = %[[VAL_3]], %[[VAL_7:.*]] = %[[VAL_0]]) : (index, i32) -> (index, i32) { -// CHECK: %[[VAL_8:.*]] = arith.cmpi slt, %[[VAL_6]], %[[VAL_1]] : index +// CHECK: %[[VAL_8:.*]] = arith.cmpi slt(%[[VAL_6]], %[[VAL_1]]) : index // CHECK: scf.condition(%[[VAL_8]]) %[[VAL_6]], %[[VAL_7]] : index, i32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_9:.*]]: index, %[[VAL_10:.*]]: i32): // CHECK: %[[VAL_11:.*]] = arith.addi %[[VAL_9]], %[[VAL_4]] : index // CHECK: %[[VAL_12:.*]] = scf.execute_region -> i32 { -// CHECK: %[[VAL_13:.*]] = arith.cmpi slt, %[[VAL_9]], %[[VAL_4]] : index +// CHECK: %[[VAL_13:.*]] = arith.cmpi slt(%[[VAL_9]], %[[VAL_4]]) : index // CHECK: cf.cond_br %[[VAL_13]], ^bb1, ^bb2 // CHECK: ^bb1: // CHECK: %[[VAL_14:.*]] = arith.subi %[[VAL_10]], %[[VAL_0]] : i32 @@ -133,7 +133,7 @@ %c5 = arith.constant 5 : index %0 = scf.for %i = %c0 to %arg1 step %c1 iter_args(%iarg0 = %arg0) -> i32 { %2 = scf.execute_region -> i32 { - %1 = arith.cmpi slt, %i, %c1 : index + %1 = arith.cmpi slt(%i, %c1) : index cf.cond_br %1, ^bb1, ^bb2 ^bb1: %2 = arith.subi %iarg0, %arg0 : i32 diff --git a/mlir/test/Dialect/SCF/loop-pipelining.mlir b/mlir/test/Dialect/SCF/loop-pipelining.mlir --- a/mlir/test/Dialect/SCF/loop-pipelining.mlir +++ b/mlir/test/Dialect/SCF/loop-pipelining.mlir @@ -131,8 +131,8 @@ // NOEPILOGUE-NEXT: %[[LR:.*]]:2 = scf.for %[[IV:.*]] = %[[C0]] to %[[C4]] // NOEPILOGUE-SAME: step %[[C1]] iter_args(%[[ADDARG:.*]] = %[[ADD0]], // NOEPILOGUE-SAME: %[[LARG:.*]] = %[[L1]]) -> (f32, f32) { -// NOEPILOGUE-DAG: %[[S0:.*]] = arith.cmpi slt, %[[IV]], %[[C2]] : index -// NOEPILOGUE-DAG: %[[S1:.*]] = arith.cmpi slt, %[[IV]], %[[C3]] : index +// NOEPILOGUE-DAG: %[[S0:.*]] = arith.cmpi slt(%[[IV]], %[[C2]]) : index +// NOEPILOGUE-DAG: %[[S1:.*]] = arith.cmpi slt(%[[IV]], %[[C3]]) : index // NOEPILOGUE-NEXT: memref.store %[[ADDARG]], %[[R]][%[[IV]]] : memref // NOEPILOGUE-NEXT: %[[ADD1:.*]] = scf.if %[[S1]] -> (f32) { // NOEPILOGUE-NEXT: %[[PADD:.*]] = arith.addf %[[LARG]], %{{.*}} : f32 diff --git a/mlir/test/Dialect/SCF/ops.mlir b/mlir/test/Dialect/SCF/ops.mlir --- a/mlir/test/Dialect/SCF/ops.mlir +++ b/mlir/test/Dialect/SCF/ops.mlir @@ -7,9 +7,9 @@ func.func @std_for(%arg0 : index, %arg1 : index, %arg2 : index) { scf.for %i0 = %arg0 to %arg1 step %arg2 { scf.for %i1 = %arg0 to %arg1 step %arg2 { - %min_cmp = arith.cmpi slt, %i0, %i1 : index + %min_cmp = arith.cmpi slt(%i0, %i1) : index %min = arith.select %min_cmp, %i0, %i1 : index - %max_cmp = arith.cmpi sge, %i0, %i1 : index + %max_cmp = arith.cmpi sge(%i0, %i1) : index %max = arith.select %max_cmp, %i0, %i1 : index scf.for %i2 = %min to %max step %i1 { } @@ -20,9 +20,9 @@ // CHECK-LABEL: func @std_for( // CHECK-NEXT: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}} { // CHECK-NEXT: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}} { -// CHECK-NEXT: %{{.*}} = arith.cmpi slt, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %{{.*}} = arith.cmpi slt(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: %{{.*}} = arith.select %{{.*}}, %{{.*}}, %{{.*}} : index -// CHECK-NEXT: %{{.*}} = arith.cmpi sge, %{{.*}}, %{{.*}} : index +// CHECK-NEXT: %{{.*}} = arith.cmpi sge(%{{.*}}, %{{.*}}) : index // CHECK-NEXT: %{{.*}} = arith.select %{{.*}}, %{{.*}}, %{{.*}} : index // CHECK-NEXT: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}} { @@ -55,9 +55,9 @@ %step = arith.constant 1 : index scf.parallel (%i0, %i1) = (%arg0, %arg1) to (%arg2, %arg3) step (%arg4, %step) { - %min_cmp = arith.cmpi slt, %i0, %i1 : index + %min_cmp = arith.cmpi slt(%i0, %i1) : index %min = arith.select %min_cmp, %i0, %i1 : index - %max_cmp = arith.cmpi sge, %i0, %i1 : index + %max_cmp = arith.cmpi sge(%i0, %i1) : index %max = arith.select %max_cmp, %i0, %i1 : index %zero = arith.constant 0.0 : f32 %int_zero = arith.constant 0 : i32 @@ -88,9 +88,9 @@ // CHECK: %[[STEP:.*]] = arith.constant 1 : index // CHECK-NEXT: scf.parallel (%[[I0:.*]], %[[I1:.*]]) = (%[[ARG0]], %[[ARG1]]) to // CHECK: (%[[ARG2]], %[[ARG3]]) step (%[[ARG4]], %[[STEP]]) { -// CHECK-NEXT: %[[MIN_CMP:.*]] = arith.cmpi slt, %[[I0]], %[[I1]] : index +// CHECK-NEXT: %[[MIN_CMP:.*]] = arith.cmpi slt(%[[I0]], %[[I1]]) : index // CHECK-NEXT: %[[MIN:.*]] = arith.select %[[MIN_CMP]], %[[I0]], %[[I1]] : index -// CHECK-NEXT: %[[MAX_CMP:.*]] = arith.cmpi sge, %[[I0]], %[[I1]] : index +// CHECK-NEXT: %[[MAX_CMP:.*]] = arith.cmpi sge(%[[I0]], %[[I1]]) : index // CHECK-NEXT: %[[MAX:.*]] = arith.select %[[MAX_CMP]], %[[I0]], %[[I1]] : index // CHECK-NEXT: %[[ZERO:.*]] = arith.constant 0.000000e+00 : f32 // CHECK-NEXT: %[[INT_ZERO:.*]] = arith.constant 0 : i32 @@ -209,7 +209,7 @@ %c0 = arith.constant 0.0 : f32 %sum = scf.for %iv = %lb to %ub step %step iter_args(%sum_iter = %sum_0) -> (f32) { %t = memref.load %buffer[%iv] : memref<1024xf32> - %cond = arith.cmpf ugt, %t, %c0 : f32 + %cond = arith.cmpf ugt(%t, %c0) : f32 %sum_next = scf.if %cond -> (f32) { %new_sum = arith.addf %sum_iter, %t : f32 scf.yield %new_sum : f32 @@ -230,7 +230,7 @@ // CHECK-NEXT: %[[RESULT:.*]] = scf.for %[[IV:.*]] = %[[ARG1]] to %[[ARG2]] step %[[ARG3]] // CHECK-SAME: iter_args(%[[ITER:.*]] = %[[INIT]]) -> (f32) { // CHECK-NEXT: %[[T:.*]] = memref.load %[[ARG0]][%[[IV]]] -// CHECK-NEXT: %[[COND:.*]] = arith.cmpf ugt, %[[T]], %[[ZERO]] +// CHECK-NEXT: %[[COND:.*]] = arith.cmpf ugt(%[[T]], %[[ZERO]]) // CHECK-NEXT: %[[IFRES:.*]] = scf.if %[[COND]] -> (f32) { // CHECK-NEXT: %[[THENRES:.*]] = arith.addf %[[ITER]], %[[T]] // CHECK-NEXT: scf.yield %[[THENRES]] : f32 diff --git a/mlir/test/Dialect/SCF/parallel-loop-specialization.mlir b/mlir/test/Dialect/SCF/parallel-loop-specialization.mlir --- a/mlir/test/Dialect/SCF/parallel-loop-specialization.mlir +++ b/mlir/test/Dialect/SCF/parallel-loop-specialization.mlir @@ -29,9 +29,9 @@ // CHECK: [[VAL_10:%.*]] = affine.min #map0(){{\[}}[[VAL_8]], [[VAL_0]]] // CHECK: [[VAL_11:%.*]] = affine.min #map1(){{\[}}[[VAL_9]], [[VAL_1]]] // CHECK: [[VAL_12:%.*]] = arith.constant 1024 : index -// CHECK: [[VAL_13:%.*]] = arith.cmpi eq, [[VAL_10]], [[VAL_12]] : index +// CHECK: [[VAL_13:%.*]] = arith.cmpi eq([[VAL_10]], [[VAL_12]]) : index // CHECK: [[VAL_14:%.*]] = arith.constant 64 : index -// CHECK: [[VAL_15:%.*]] = arith.cmpi eq, [[VAL_11]], [[VAL_14]] : index +// CHECK: [[VAL_15:%.*]] = arith.cmpi eq([[VAL_11]], [[VAL_14]]) : index // CHECK: [[VAL_16:%.*]] = arith.andi [[VAL_13]], [[VAL_15]] : i1 // CHECK: scf.if [[VAL_16]] { // CHECK: scf.parallel ([[VAL_17:%.*]], [[VAL_18:%.*]]) = ([[VAL_6]], [[VAL_6]]) to ([[VAL_12]], [[VAL_14]]) step ([[VAL_7]], [[VAL_7]]) { diff --git a/mlir/test/Dialect/SCF/parallel-loop-tiling-inbound-check.mlir b/mlir/test/Dialect/SCF/parallel-loop-tiling-inbound-check.mlir --- a/mlir/test/Dialect/SCF/parallel-loop-tiling-inbound-check.mlir +++ b/mlir/test/Dialect/SCF/parallel-loop-tiling-inbound-check.mlir @@ -27,11 +27,11 @@ // CHECK: %true = arith.constant true // CHECK: [[V11:%.*]] = arith.muli [[V7]], [[ARG5]] : index // CHECK: [[V12:%.*]] = arith.addi [[V11]], [[V3]] : index -// CHECK: [[V13:%.*]] = arith.cmpi ult, [[V12]], [[ARG3]] : index +// CHECK: [[V13:%.*]] = arith.cmpi ult([[V12]], [[ARG3]]) : index // CHECK: [[V14:%.*]] = arith.andi %true, [[V13]] : i1 // CHECK: [[V15:%.*]] = arith.muli [[V8]], [[ARG6]] : index // CHECK: [[V16:%.*]] = arith.addi [[V15]], [[V4]] : index -// CHECK: [[V17:%.*]] = arith.cmpi ult, [[V16]], [[ARG4]] : index +// CHECK: [[V17:%.*]] = arith.cmpi ult([[V16]], [[ARG4]]) : index // CHECK: [[V18:%.*]] = arith.andi [[V14]], [[V17]] : i1 // CHECK: scf.if [[V18]] { // CHECK: [[V19:%.*]] = memref.load [[ARG8]]{{\[}}[[V9]], [[V10]]] : memref diff --git a/mlir/test/Dialect/SparseTensor/conversion.mlir b/mlir/test/Dialect/SparseTensor/conversion.mlir --- a/mlir/test/Dialect/SparseTensor/conversion.mlir +++ b/mlir/test/Dialect/SparseTensor/conversion.mlir @@ -195,7 +195,7 @@ // CHECK: %[[BUF:.*]] = memref.alloca() : memref // CHECK: scf.for %[[I:.*]] = %[[C0]] to %[[U]] step %[[C1]] { // CHECK: %[[E:.*]] = tensor.extract %[[A]][%[[I]]] : tensor -// CHECK: %[[N:.*]] = arith.cmpi ne, %[[E]], %[[I0]] : i32 +// CHECK: %[[N:.*]] = arith.cmpi ne(%[[E]], %[[I0]]) : i32 // CHECK: scf.if %[[N]] { // CHECK: memref.store %[[I]], %[[M]][%[[C0]]] : memref<1xindex> // CHECK: memref.store %[[E]], %[[BUF]][] : memref diff --git a/mlir/test/Dialect/SparseTensor/sparse_1d.mlir b/mlir/test/Dialect/SparseTensor/sparse_1d.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_1d.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_1d.mlir @@ -118,12 +118,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = arith.addf %[[VAL_22]], %[[VAL_1]] : f32 @@ -134,7 +134,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_24:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_24:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_25:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_26:.*]] = arith.select %[[VAL_24]], %[[VAL_25]], %[[VAL_18]] : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index @@ -318,12 +318,12 @@ // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_14:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_15:.*]]:2 = scf.while (%[[VAL_16:.*]] = %[[VAL_13]], %[[VAL_17:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_18:.*]] = arith.cmpi ult, %[[VAL_16]], %[[VAL_14]] : index +// CHECK: %[[VAL_18:.*]] = arith.cmpi ult(%[[VAL_16]], %[[VAL_14]]) : index // CHECK: scf.condition(%[[VAL_18]]) %[[VAL_16]], %[[VAL_17]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_19:.*]]: index, %[[VAL_20:.*]]: index): // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_19]]] : memref -// CHECK: %[[VAL_22:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: scf.if %[[VAL_22]] { // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_20]]] : memref<32xf32> // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref @@ -336,7 +336,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_27:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index // CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_27]], %[[VAL_28]], %[[VAL_19]] : index // CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_20]], %[[VAL_6]] : index @@ -412,12 +412,12 @@ // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_14:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_15:.*]]:2 = scf.while (%[[VAL_16:.*]] = %[[VAL_13]], %[[VAL_17:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_18:.*]] = arith.cmpi ult, %[[VAL_16]], %[[VAL_14]] : index +// CHECK: %[[VAL_18:.*]] = arith.cmpi ult(%[[VAL_16]], %[[VAL_14]]) : index // CHECK: scf.condition(%[[VAL_18]]) %[[VAL_16]], %[[VAL_17]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_19:.*]]: index, %[[VAL_20:.*]]: index): // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_19]]] : memref -// CHECK: %[[VAL_22:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: scf.if %[[VAL_22]] { // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_19]]] : memref // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_20]]] : memref<32xf32> @@ -430,7 +430,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_27:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index // CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_27]], %[[VAL_28]], %[[VAL_19]] : index // CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_20]], %[[VAL_6]] : index @@ -508,18 +508,18 @@ // CHECK: %[[VAL_15:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_17:.*]]:2 = scf.while (%[[VAL_18:.*]] = %[[VAL_13]], %[[VAL_19:.*]] = %[[VAL_15]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_20:.*]] = arith.cmpi ult, %[[VAL_18]], %[[VAL_14]] : index -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_16]] : index +// CHECK: %[[VAL_20:.*]] = arith.cmpi ult(%[[VAL_18]], %[[VAL_14]]) : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_16]]) : index // CHECK: %[[VAL_22:.*]] = arith.andi %[[VAL_20]], %[[VAL_21]] : i1 // CHECK: scf.condition(%[[VAL_22]]) %[[VAL_18]], %[[VAL_19]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_23:.*]]: index, %[[VAL_24:.*]]: index): // CHECK: %[[VAL_25:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_23]]] : memref // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_24]]] : memref -// CHECK: %[[VAL_27:.*]] = arith.cmpi ult, %[[VAL_26]], %[[VAL_25]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi ult(%[[VAL_26]], %[[VAL_25]]) : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_26]], %[[VAL_25]] : index -// CHECK: %[[VAL_29:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_28]] : index -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_28]] : index +// CHECK: %[[VAL_29:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_28]]) : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_28]]) : index // CHECK: %[[VAL_31:.*]] = arith.andi %[[VAL_29]], %[[VAL_30]] : i1 // CHECK: scf.if %[[VAL_31]] { // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_23]]] : memref @@ -527,12 +527,12 @@ // CHECK: %[[VAL_34:.*]] = arith.addf %[[VAL_32]], %[[VAL_33]] : f32 // CHECK: memref.store %[[VAL_34]], %[[VAL_12]]{{\[}}%[[VAL_28]]] : memref<32xf32> // CHECK: } else { -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_28]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_28]]) : index // CHECK: scf.if %[[VAL_35]] { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_23]]] : memref // CHECK: memref.store %[[VAL_36]], %[[VAL_12]]{{\[}}%[[VAL_28]]] : memref<32xf32> // CHECK: } else { -// CHECK: %[[VAL_37:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_28]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_28]]) : index // CHECK: scf.if %[[VAL_37]] { // CHECK: %[[VAL_38:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_24]]] : memref // CHECK: memref.store %[[VAL_38]], %[[VAL_12]]{{\[}}%[[VAL_28]]] : memref<32xf32> @@ -540,10 +540,10 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_39:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_28]] : index +// CHECK: %[[VAL_39:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_28]]) : index // CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_23]], %[[VAL_4]] : index // CHECK: %[[VAL_41:.*]] = arith.select %[[VAL_39]], %[[VAL_40]], %[[VAL_23]] : index -// CHECK: %[[VAL_42:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_28]] : index +// CHECK: %[[VAL_42:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_28]]) : index // CHECK: %[[VAL_43:.*]] = arith.addi %[[VAL_24]], %[[VAL_4]] : index // CHECK: %[[VAL_44:.*]] = arith.select %[[VAL_42]], %[[VAL_43]], %[[VAL_24]] : index // CHECK: scf.yield %[[VAL_41]], %[[VAL_44]] : index, index @@ -591,18 +591,18 @@ // CHECK: %[[VAL_15:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_17:.*]]:2 = scf.while (%[[VAL_18:.*]] = %[[VAL_13]], %[[VAL_19:.*]] = %[[VAL_15]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_20:.*]] = arith.cmpi ult, %[[VAL_18]], %[[VAL_14]] : index -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_16]] : index +// CHECK: %[[VAL_20:.*]] = arith.cmpi ult(%[[VAL_18]], %[[VAL_14]]) : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_16]]) : index // CHECK: %[[VAL_22:.*]] = arith.andi %[[VAL_20]], %[[VAL_21]] : i1 // CHECK: scf.condition(%[[VAL_22]]) %[[VAL_18]], %[[VAL_19]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_23:.*]]: index, %[[VAL_24:.*]]: index): // CHECK: %[[VAL_25:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_23]]] : memref // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_24]]] : memref -// CHECK: %[[VAL_27:.*]] = arith.cmpi ult, %[[VAL_26]], %[[VAL_25]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi ult(%[[VAL_26]], %[[VAL_25]]) : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_27]], %[[VAL_26]], %[[VAL_25]] : index -// CHECK: %[[VAL_29:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_28]] : index -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_28]] : index +// CHECK: %[[VAL_29:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_28]]) : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_28]]) : index // CHECK: %[[VAL_31:.*]] = arith.andi %[[VAL_29]], %[[VAL_30]] : i1 // CHECK: scf.if %[[VAL_31]] { // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_23]]] : memref @@ -611,10 +611,10 @@ // CHECK: memref.store %[[VAL_34]], %[[VAL_12]]{{\[}}%[[VAL_28]]] : memref<32xf32> // CHECK: } else { // CHECK: } -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_28]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_28]]) : index // CHECK: %[[VAL_36:.*]] = arith.addi %[[VAL_23]], %[[VAL_4]] : index // CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_35]], %[[VAL_36]], %[[VAL_23]] : index -// CHECK: %[[VAL_38:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_28]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_28]]) : index // CHECK: %[[VAL_39:.*]] = arith.addi %[[VAL_24]], %[[VAL_4]] : index // CHECK: %[[VAL_40:.*]] = arith.select %[[VAL_38]], %[[VAL_39]], %[[VAL_24]] : index // CHECK: scf.yield %[[VAL_37]], %[[VAL_40]] : index, index @@ -653,18 +653,18 @@ // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_18:.*]]:2 = scf.while (%[[VAL_19:.*]] = %[[VAL_14]], %[[VAL_20:.*]] = %[[VAL_16]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_15]] : index -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_17]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_15]]) : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_17]]) : index // CHECK: %[[VAL_23:.*]] = arith.andi %[[VAL_21]], %[[VAL_22]] : i1 // CHECK: scf.condition(%[[VAL_23]]) %[[VAL_19]], %[[VAL_20]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_24:.*]]: index, %[[VAL_25:.*]]: index): // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_24]]] : memref // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_25]]] : memref -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[VAL_27]], %[[VAL_26]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[VAL_27]], %[[VAL_26]]) : index // CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_28]], %[[VAL_27]], %[[VAL_26]] : index -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index -// CHECK: %[[VAL_31:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: %[[VAL_32:.*]] = arith.andi %[[VAL_30]], %[[VAL_31]] : i1 // CHECK: scf.if %[[VAL_32]] { // CHECK: %[[VAL_33:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_24]]] : memref @@ -674,13 +674,13 @@ // CHECK: %[[VAL_37:.*]] = arith.addf %[[VAL_34]], %[[VAL_36]] : f32 // CHECK: memref.store %[[VAL_37]], %[[VAL_13]]{{\[}}%[[VAL_29]]] : memref<16xf32> // CHECK: } else { -// CHECK: %[[VAL_38:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index // CHECK: scf.if %[[VAL_38]] { // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_24]]] : memref // CHECK: %[[VAL_40:.*]] = arith.mulf %[[VAL_39]], %[[VAL_2]] : f32 // CHECK: memref.store %[[VAL_40]], %[[VAL_13]]{{\[}}%[[VAL_29]]] : memref<16xf32> // CHECK: } else { -// CHECK: %[[VAL_41:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_41:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: scf.if %[[VAL_41]] { // CHECK: %[[VAL_42:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_25]]] : memref // CHECK: %[[VAL_43:.*]] = arith.mulf %[[VAL_42]], %[[VAL_2]] : f32 @@ -689,10 +689,10 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_44:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index +// CHECK: %[[VAL_44:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index // CHECK: %[[VAL_45:.*]] = arith.addi %[[VAL_24]], %[[VAL_5]] : index // CHECK: %[[VAL_46:.*]] = arith.select %[[VAL_44]], %[[VAL_45]], %[[VAL_24]] : index -// CHECK: %[[VAL_47:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_47:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: %[[VAL_48:.*]] = arith.addi %[[VAL_25]], %[[VAL_5]] : index // CHECK: %[[VAL_49:.*]] = arith.select %[[VAL_47]], %[[VAL_48]], %[[VAL_25]] : index // CHECK: scf.yield %[[VAL_46]], %[[VAL_49]] : index, index @@ -746,18 +746,18 @@ // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_18:.*]]:2 = scf.while (%[[VAL_19:.*]] = %[[VAL_14]], %[[VAL_20:.*]] = %[[VAL_16]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_15]] : index -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_17]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_15]]) : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_17]]) : index // CHECK: %[[VAL_23:.*]] = arith.andi %[[VAL_21]], %[[VAL_22]] : i1 // CHECK: scf.condition(%[[VAL_23]]) %[[VAL_19]], %[[VAL_20]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_24:.*]]: index, %[[VAL_25:.*]]: index): // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_24]]] : memref // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_25]]] : memref -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[VAL_27]], %[[VAL_26]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[VAL_27]], %[[VAL_26]]) : index // CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_28]], %[[VAL_27]], %[[VAL_26]] : index -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index -// CHECK: %[[VAL_31:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: %[[VAL_32:.*]] = arith.andi %[[VAL_30]], %[[VAL_31]] : i1 // CHECK: scf.if %[[VAL_32]] { // CHECK: %[[VAL_33:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_24]]] : memref @@ -766,13 +766,13 @@ // CHECK: %[[VAL_36:.*]] = arith.mulf %[[VAL_35]], %[[VAL_2]] : f32 // CHECK: memref.store %[[VAL_36]], %[[VAL_13]]{{\[}}%[[VAL_29]]] : memref<16xf32> // CHECK: } else { -// CHECK: %[[VAL_37:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index // CHECK: scf.if %[[VAL_37]] { // CHECK: %[[VAL_38:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_24]]] : memref // CHECK: %[[VAL_39:.*]] = arith.mulf %[[VAL_38]], %[[VAL_2]] : f32 // CHECK: memref.store %[[VAL_39]], %[[VAL_13]]{{\[}}%[[VAL_29]]] : memref<16xf32> // CHECK: } else { -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: scf.if %[[VAL_40]] { // CHECK: %[[VAL_41:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_25]]] : memref // CHECK: %[[VAL_42:.*]] = arith.mulf %[[VAL_41]], %[[VAL_2]] : f32 @@ -781,10 +781,10 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_43:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_29]] : index +// CHECK: %[[VAL_43:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_29]]) : index // CHECK: %[[VAL_44:.*]] = arith.addi %[[VAL_24]], %[[VAL_5]] : index // CHECK: %[[VAL_45:.*]] = arith.select %[[VAL_43]], %[[VAL_44]], %[[VAL_24]] : index -// CHECK: %[[VAL_46:.*]] = arith.cmpi eq, %[[VAL_27]], %[[VAL_29]] : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi eq(%[[VAL_27]], %[[VAL_29]]) : index // CHECK: %[[VAL_47:.*]] = arith.addi %[[VAL_25]], %[[VAL_5]] : index // CHECK: %[[VAL_48:.*]] = arith.select %[[VAL_46]], %[[VAL_47]], %[[VAL_25]] : index // CHECK: scf.yield %[[VAL_45]], %[[VAL_48]] : index, index @@ -887,18 +887,18 @@ // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_18:.*]]:3 = scf.while (%[[VAL_19:.*]] = %[[VAL_14]], %[[VAL_20:.*]] = %[[VAL_16]], %[[VAL_21:.*]] = %[[VAL_13]]) : (index, index, f32) -> (index, index, f32) { -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_15]] : index -// CHECK: %[[VAL_23:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_17]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_15]]) : index +// CHECK: %[[VAL_23:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_17]]) : index // CHECK: %[[VAL_24:.*]] = arith.andi %[[VAL_22]], %[[VAL_23]] : i1 // CHECK: scf.condition(%[[VAL_24]]) %[[VAL_19]], %[[VAL_20]], %[[VAL_21]] : index, index, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_25:.*]]: index, %[[VAL_26:.*]]: index, %[[VAL_27:.*]]: f32): // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_25]]] : memref // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_26]]] : memref -// CHECK: %[[VAL_30:.*]] = arith.cmpi ult, %[[VAL_29]], %[[VAL_28]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi ult(%[[VAL_29]], %[[VAL_28]]) : index // CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_28]] : index -// CHECK: %[[VAL_32:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_31]] : index -// CHECK: %[[VAL_33:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_31]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_31]]) : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_31]]) : index // CHECK: %[[VAL_34:.*]] = arith.andi %[[VAL_32]], %[[VAL_33]] : i1 // CHECK: %[[VAL_35:.*]] = scf.if %[[VAL_34]] -> (f32) { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_25]]] : memref @@ -907,13 +907,13 @@ // CHECK: %[[VAL_39:.*]] = arith.addf %[[VAL_27]], %[[VAL_38]] : f32 // CHECK: scf.yield %[[VAL_39]] : f32 // CHECK: } else { -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_31]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_31]]) : index // CHECK: %[[VAL_41:.*]] = scf.if %[[VAL_40]] -> (f32) { // CHECK: %[[VAL_42:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_25]]] : memref // CHECK: %[[VAL_43:.*]] = arith.addf %[[VAL_27]], %[[VAL_42]] : f32 // CHECK: scf.yield %[[VAL_43]] : f32 // CHECK: } else { -// CHECK: %[[VAL_44:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_31]] : index +// CHECK: %[[VAL_44:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_31]]) : index // CHECK: %[[VAL_45:.*]] = scf.if %[[VAL_44]] -> (f32) { // CHECK: %[[VAL_46:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_26]]] : memref // CHECK: %[[VAL_47:.*]] = arith.addf %[[VAL_27]], %[[VAL_46]] : f32 @@ -925,10 +925,10 @@ // CHECK: } // CHECK: scf.yield %[[VAL_49:.*]] : f32 // CHECK: } -// CHECK: %[[VAL_50:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_31]] : index +// CHECK: %[[VAL_50:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_31]]) : index // CHECK: %[[VAL_51:.*]] = arith.addi %[[VAL_25]], %[[VAL_4]] : index // CHECK: %[[VAL_52:.*]] = arith.select %[[VAL_50]], %[[VAL_51]], %[[VAL_25]] : index -// CHECK: %[[VAL_53:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_31]] : index +// CHECK: %[[VAL_53:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_31]]) : index // CHECK: %[[VAL_54:.*]] = arith.addi %[[VAL_26]], %[[VAL_4]] : index // CHECK: %[[VAL_55:.*]] = arith.select %[[VAL_53]], %[[VAL_54]], %[[VAL_26]] : index // CHECK: scf.yield %[[VAL_52]], %[[VAL_55]], %[[VAL_56:.*]] : index, index, f32 @@ -996,18 +996,18 @@ // CHECK: %[[VAL_19:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_21:.*]]:3 = scf.while (%[[VAL_22:.*]] = %[[VAL_17]], %[[VAL_23:.*]] = %[[VAL_19]], %[[VAL_24:.*]] = %[[VAL_15]]) : (index, index, f32) -> (index, index, f32) { -// CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_22]], %[[VAL_18]] : index -// CHECK: %[[VAL_26:.*]] = arith.cmpi ult, %[[VAL_23]], %[[VAL_20]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi ult(%[[VAL_22]], %[[VAL_18]]) : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi ult(%[[VAL_23]], %[[VAL_20]]) : index // CHECK: %[[VAL_27:.*]] = arith.andi %[[VAL_25]], %[[VAL_26]] : i1 // CHECK: scf.condition(%[[VAL_27]]) %[[VAL_22]], %[[VAL_23]], %[[VAL_24]] : index, index, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_28:.*]]: index, %[[VAL_29:.*]]: index, %[[VAL_30:.*]]: f32): // CHECK: %[[VAL_31:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_28]]] : memref // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_29]]] : memref -// CHECK: %[[VAL_33:.*]] = arith.cmpi ult, %[[VAL_32]], %[[VAL_31]] : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi ult(%[[VAL_32]], %[[VAL_31]]) : index // CHECK: %[[VAL_34:.*]] = arith.select %[[VAL_33]], %[[VAL_32]], %[[VAL_31]] : index -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_31]], %[[VAL_34]] : index -// CHECK: %[[VAL_36:.*]] = arith.cmpi eq, %[[VAL_32]], %[[VAL_34]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_31]], %[[VAL_34]]) : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi eq(%[[VAL_32]], %[[VAL_34]]) : index // CHECK: %[[VAL_37:.*]] = arith.andi %[[VAL_35]], %[[VAL_36]] : i1 // CHECK: %[[VAL_38:.*]] = scf.if %[[VAL_37]] -> (f32) { // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_28]]] : memref @@ -1017,14 +1017,14 @@ // CHECK: %[[VAL_43:.*]] = arith.addf %[[VAL_30]], %[[VAL_42]] : f32 // CHECK: scf.yield %[[VAL_43]] : f32 // CHECK: } else { -// CHECK: %[[VAL_44:.*]] = arith.cmpi eq, %[[VAL_31]], %[[VAL_34]] : index +// CHECK: %[[VAL_44:.*]] = arith.cmpi eq(%[[VAL_31]], %[[VAL_34]]) : index // CHECK: %[[VAL_45:.*]] = scf.if %[[VAL_44]] -> (f32) { // CHECK: %[[VAL_46:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_28]]] : memref // CHECK: %[[VAL_47:.*]] = arith.mulf %[[VAL_46]], %[[VAL_16]] : f32 // CHECK: %[[VAL_48:.*]] = arith.addf %[[VAL_30]], %[[VAL_47]] : f32 // CHECK: scf.yield %[[VAL_48]] : f32 // CHECK: } else { -// CHECK: %[[VAL_49:.*]] = arith.cmpi eq, %[[VAL_32]], %[[VAL_34]] : index +// CHECK: %[[VAL_49:.*]] = arith.cmpi eq(%[[VAL_32]], %[[VAL_34]]) : index // CHECK: %[[VAL_50:.*]] = scf.if %[[VAL_49]] -> (f32) { // CHECK: %[[VAL_51:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_29]]] : memref // CHECK: %[[VAL_52:.*]] = arith.addf %[[VAL_30]], %[[VAL_51]] : f32 @@ -1036,10 +1036,10 @@ // CHECK: } // CHECK: scf.yield %[[VAL_54:.*]] : f32 // CHECK: } -// CHECK: %[[VAL_55:.*]] = arith.cmpi eq, %[[VAL_31]], %[[VAL_34]] : index +// CHECK: %[[VAL_55:.*]] = arith.cmpi eq(%[[VAL_31]], %[[VAL_34]]) : index // CHECK: %[[VAL_56:.*]] = arith.addi %[[VAL_28]], %[[VAL_5]] : index // CHECK: %[[VAL_57:.*]] = arith.select %[[VAL_55]], %[[VAL_56]], %[[VAL_28]] : index -// CHECK: %[[VAL_58:.*]] = arith.cmpi eq, %[[VAL_32]], %[[VAL_34]] : index +// CHECK: %[[VAL_58:.*]] = arith.cmpi eq(%[[VAL_32]], %[[VAL_34]]) : index // CHECK: %[[VAL_59:.*]] = arith.addi %[[VAL_29]], %[[VAL_5]] : index // CHECK: %[[VAL_60:.*]] = arith.select %[[VAL_58]], %[[VAL_59]], %[[VAL_29]] : index // CHECK: scf.yield %[[VAL_57]], %[[VAL_60]], %[[VAL_61:.*]] : index, index, f32 @@ -1114,16 +1114,16 @@ // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_23:.*]]:3 = scf.while (%[[VAL_24:.*]] = %[[VAL_19]], %[[VAL_25:.*]] = %[[VAL_21]], %[[VAL_26:.*]] = %[[VAL_5]]) : (index, index, index) -> (index, index, index) { -// CHECK: %[[VAL_27:.*]] = arith.cmpi ult, %[[VAL_24]], %[[VAL_20]] : index -// CHECK: %[[VAL_28:.*]] = arith.cmpi ult, %[[VAL_25]], %[[VAL_22]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi ult(%[[VAL_24]], %[[VAL_20]]) : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi ult(%[[VAL_25]], %[[VAL_22]]) : index // CHECK: %[[VAL_29:.*]] = arith.andi %[[VAL_27]], %[[VAL_28]] : i1 // CHECK: scf.condition(%[[VAL_29]]) %[[VAL_24]], %[[VAL_25]], %[[VAL_26]] : index, index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_30:.*]]: index, %[[VAL_31:.*]]: index, %[[VAL_32:.*]]: index): // CHECK: %[[VAL_33:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_30]]] : memref // CHECK: %[[VAL_34:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_31]]] : memref -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_33]], %[[VAL_32]] : index -// CHECK: %[[VAL_36:.*]] = arith.cmpi eq, %[[VAL_34]], %[[VAL_32]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_33]], %[[VAL_32]]) : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi eq(%[[VAL_34]], %[[VAL_32]]) : index // CHECK: %[[VAL_37:.*]] = arith.andi %[[VAL_35]], %[[VAL_36]] : i1 // CHECK: scf.if %[[VAL_37]] { // CHECK: %[[VAL_38:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_32]]] : memref @@ -1135,7 +1135,7 @@ // CHECK: %[[VAL_44:.*]] = arith.addf %[[VAL_40]], %[[VAL_43]] : f64 // CHECK: memref.store %[[VAL_44]], %[[VAL_18]]{{\[}}%[[VAL_32]]] : memref // CHECK: } else { -// CHECK: %[[VAL_45:.*]] = arith.cmpi eq, %[[VAL_33]], %[[VAL_32]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi eq(%[[VAL_33]], %[[VAL_32]]) : index // CHECK: scf.if %[[VAL_45]] { // CHECK: %[[VAL_46:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_32]]] : memref // CHECK: %[[VAL_47:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_30]]] : memref @@ -1144,7 +1144,7 @@ // CHECK: %[[VAL_50:.*]] = arith.addf %[[VAL_48]], %[[VAL_49]] : f64 // CHECK: memref.store %[[VAL_50]], %[[VAL_18]]{{\[}}%[[VAL_32]]] : memref // CHECK: } else { -// CHECK: %[[VAL_51:.*]] = arith.cmpi eq, %[[VAL_34]], %[[VAL_32]] : index +// CHECK: %[[VAL_51:.*]] = arith.cmpi eq(%[[VAL_34]], %[[VAL_32]]) : index // CHECK: scf.if %[[VAL_51]] { // CHECK: %[[VAL_52:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_32]]] : memref // CHECK: %[[VAL_53:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_32]]] : memref @@ -1163,22 +1163,22 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_60:.*]] = arith.cmpi eq, %[[VAL_33]], %[[VAL_32]] : index +// CHECK: %[[VAL_60:.*]] = arith.cmpi eq(%[[VAL_33]], %[[VAL_32]]) : index // CHECK: %[[VAL_61:.*]] = arith.addi %[[VAL_30]], %[[VAL_7]] : index // CHECK: %[[VAL_62:.*]] = arith.select %[[VAL_60]], %[[VAL_61]], %[[VAL_30]] : index -// CHECK: %[[VAL_63:.*]] = arith.cmpi eq, %[[VAL_34]], %[[VAL_32]] : index +// CHECK: %[[VAL_63:.*]] = arith.cmpi eq(%[[VAL_34]], %[[VAL_32]]) : index // CHECK: %[[VAL_64:.*]] = arith.addi %[[VAL_31]], %[[VAL_7]] : index // CHECK: %[[VAL_65:.*]] = arith.select %[[VAL_63]], %[[VAL_64]], %[[VAL_31]] : index // CHECK: %[[VAL_66:.*]] = arith.addi %[[VAL_32]], %[[VAL_7]] : index // CHECK: scf.yield %[[VAL_62]], %[[VAL_65]], %[[VAL_66]] : index, index, index // CHECK: } // CHECK: %[[VAL_67:.*]]:2 = scf.while (%[[VAL_68:.*]] = %[[VAL_69:.*]]#0, %[[VAL_70:.*]] = %[[VAL_69]]#2) : (index, index) -> (index, index) { -// CHECK: %[[VAL_71:.*]] = arith.cmpi ult, %[[VAL_68]], %[[VAL_20]] : index +// CHECK: %[[VAL_71:.*]] = arith.cmpi ult(%[[VAL_68]], %[[VAL_20]]) : index // CHECK: scf.condition(%[[VAL_71]]) %[[VAL_68]], %[[VAL_70]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_72:.*]]: index, %[[VAL_73:.*]]: index): // CHECK: %[[VAL_74:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_72]]] : memref -// CHECK: %[[VAL_75:.*]] = arith.cmpi eq, %[[VAL_74]], %[[VAL_73]] : index +// CHECK: %[[VAL_75:.*]] = arith.cmpi eq(%[[VAL_74]], %[[VAL_73]]) : index // CHECK: scf.if %[[VAL_75]] { // CHECK: %[[VAL_76:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_73]]] : memref // CHECK: %[[VAL_77:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_72]]] : memref @@ -1195,19 +1195,19 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_84:.*]] = arith.cmpi eq, %[[VAL_74]], %[[VAL_73]] : index +// CHECK: %[[VAL_84:.*]] = arith.cmpi eq(%[[VAL_74]], %[[VAL_73]]) : index // CHECK: %[[VAL_85:.*]] = arith.addi %[[VAL_72]], %[[VAL_7]] : index // CHECK: %[[VAL_86:.*]] = arith.select %[[VAL_84]], %[[VAL_85]], %[[VAL_72]] : index // CHECK: %[[VAL_87:.*]] = arith.addi %[[VAL_73]], %[[VAL_7]] : index // CHECK: scf.yield %[[VAL_86]], %[[VAL_87]] : index, index // CHECK: } // CHECK: %[[VAL_88:.*]]:2 = scf.while (%[[VAL_89:.*]] = %[[VAL_90:.*]]#1, %[[VAL_91:.*]] = %[[VAL_92:.*]]#1) : (index, index) -> (index, index) { -// CHECK: %[[VAL_93:.*]] = arith.cmpi ult, %[[VAL_89]], %[[VAL_22]] : index +// CHECK: %[[VAL_93:.*]] = arith.cmpi ult(%[[VAL_89]], %[[VAL_22]]) : index // CHECK: scf.condition(%[[VAL_93]]) %[[VAL_89]], %[[VAL_91]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_94:.*]]: index, %[[VAL_95:.*]]: index): // CHECK: %[[VAL_96:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_94]]] : memref -// CHECK: %[[VAL_97:.*]] = arith.cmpi eq, %[[VAL_96]], %[[VAL_95]] : index +// CHECK: %[[VAL_97:.*]] = arith.cmpi eq(%[[VAL_96]], %[[VAL_95]]) : index // CHECK: scf.if %[[VAL_97]] { // CHECK: %[[VAL_98:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_95]]] : memref // CHECK: %[[VAL_99:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_95]]] : memref @@ -1224,7 +1224,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_106:.*]] = arith.cmpi eq, %[[VAL_96]], %[[VAL_95]] : index +// CHECK: %[[VAL_106:.*]] = arith.cmpi eq(%[[VAL_96]], %[[VAL_95]]) : index // CHECK: %[[VAL_107:.*]] = arith.addi %[[VAL_94]], %[[VAL_7]] : index // CHECK: %[[VAL_108:.*]] = arith.select %[[VAL_106]], %[[VAL_107]], %[[VAL_94]] : index // CHECK: %[[VAL_109:.*]] = arith.addi %[[VAL_95]], %[[VAL_7]] : index @@ -1292,25 +1292,25 @@ // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_24:.*]]:4 = scf.while (%[[VAL_25:.*]] = %[[VAL_18]], %[[VAL_26:.*]] = %[[VAL_20]], %[[VAL_27:.*]] = %[[VAL_22]], %[[VAL_28:.*]] = %[[VAL_17]]) : (index, index, index, f64) -> (index, index, index, f64) { -// CHECK: %[[VAL_29:.*]] = arith.cmpi ult, %[[VAL_25]], %[[VAL_19]] : index -// CHECK: %[[VAL_30:.*]] = arith.cmpi ult, %[[VAL_26]], %[[VAL_21]] : index +// CHECK: %[[VAL_29:.*]] = arith.cmpi ult(%[[VAL_25]], %[[VAL_19]]) : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi ult(%[[VAL_26]], %[[VAL_21]]) : index // CHECK: %[[VAL_31:.*]] = arith.andi %[[VAL_29]], %[[VAL_30]] : i1 -// CHECK: %[[VAL_32:.*]] = arith.cmpi ult, %[[VAL_27]], %[[VAL_23]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi ult(%[[VAL_27]], %[[VAL_23]]) : index // CHECK: %[[VAL_33:.*]] = arith.andi %[[VAL_31]], %[[VAL_32]] : i1 // CHECK: scf.condition(%[[VAL_33]]) %[[VAL_25]], %[[VAL_26]], %[[VAL_27]], %[[VAL_28]] : index, index, index, f64 // CHECK: } do { // CHECK: ^bb0(%[[VAL_34:.*]]: index, %[[VAL_35:.*]]: index, %[[VAL_36:.*]]: index, %[[VAL_37:.*]]: f64): // CHECK: %[[VAL_38:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_34]]] : memref // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_35]]] : memref -// CHECK: %[[VAL_40:.*]] = arith.cmpi ult, %[[VAL_39]], %[[VAL_38]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi ult(%[[VAL_39]], %[[VAL_38]]) : index // CHECK: %[[VAL_41:.*]] = arith.select %[[VAL_40]], %[[VAL_39]], %[[VAL_38]] : index // CHECK: %[[VAL_42:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_36]]] : memref -// CHECK: %[[VAL_43:.*]] = arith.cmpi ult, %[[VAL_42]], %[[VAL_41]] : index +// CHECK: %[[VAL_43:.*]] = arith.cmpi ult(%[[VAL_42]], %[[VAL_41]]) : index // CHECK: %[[VAL_44:.*]] = arith.select %[[VAL_43]], %[[VAL_42]], %[[VAL_41]] : index -// CHECK: %[[VAL_45:.*]] = arith.cmpi eq, %[[VAL_38]], %[[VAL_44]] : index -// CHECK: %[[VAL_46:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_44]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi eq(%[[VAL_38]], %[[VAL_44]]) : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_44]]) : index // CHECK: %[[VAL_47:.*]] = arith.andi %[[VAL_45]], %[[VAL_46]] : i1 -// CHECK: %[[VAL_48:.*]] = arith.cmpi eq, %[[VAL_42]], %[[VAL_44]] : index +// CHECK: %[[VAL_48:.*]] = arith.cmpi eq(%[[VAL_42]], %[[VAL_44]]) : index // CHECK: %[[VAL_49:.*]] = arith.andi %[[VAL_47]], %[[VAL_48]] : i1 // CHECK: %[[VAL_50:.*]] = scf.if %[[VAL_49]] -> (f64) { // CHECK: %[[VAL_51:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_34]]] : memref @@ -1321,8 +1321,8 @@ // CHECK: %[[VAL_56:.*]] = arith.addf %[[VAL_54]], %[[VAL_55]] : f64 // CHECK: scf.yield %[[VAL_56]] : f64 // CHECK: } else { -// CHECK: %[[VAL_57:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_44]] : index -// CHECK: %[[VAL_58:.*]] = arith.cmpi eq, %[[VAL_42]], %[[VAL_44]] : index +// CHECK: %[[VAL_57:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_44]]) : index +// CHECK: %[[VAL_58:.*]] = arith.cmpi eq(%[[VAL_42]], %[[VAL_44]]) : index // CHECK: %[[VAL_59:.*]] = arith.andi %[[VAL_57]], %[[VAL_58]] : i1 // CHECK: %[[VAL_60:.*]] = scf.if %[[VAL_59]] -> (f64) { // CHECK: %[[VAL_61:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_35]]] : memref @@ -1331,8 +1331,8 @@ // CHECK: %[[VAL_64:.*]] = arith.addf %[[VAL_62]], %[[VAL_63]] : f64 // CHECK: scf.yield %[[VAL_64]] : f64 // CHECK: } else { -// CHECK: %[[VAL_65:.*]] = arith.cmpi eq, %[[VAL_38]], %[[VAL_44]] : index -// CHECK: %[[VAL_66:.*]] = arith.cmpi eq, %[[VAL_42]], %[[VAL_44]] : index +// CHECK: %[[VAL_65:.*]] = arith.cmpi eq(%[[VAL_38]], %[[VAL_44]]) : index +// CHECK: %[[VAL_66:.*]] = arith.cmpi eq(%[[VAL_42]], %[[VAL_44]]) : index // CHECK: %[[VAL_67:.*]] = arith.andi %[[VAL_65]], %[[VAL_66]] : i1 // CHECK: %[[VAL_68:.*]] = scf.if %[[VAL_67]] -> (f64) { // CHECK: %[[VAL_69:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_34]]] : memref @@ -1341,14 +1341,14 @@ // CHECK: %[[VAL_72:.*]] = arith.addf %[[VAL_70]], %[[VAL_71]] : f64 // CHECK: scf.yield %[[VAL_72]] : f64 // CHECK: } else { -// CHECK: %[[VAL_73:.*]] = arith.cmpi eq, %[[VAL_42]], %[[VAL_44]] : index +// CHECK: %[[VAL_73:.*]] = arith.cmpi eq(%[[VAL_42]], %[[VAL_44]]) : index // CHECK: %[[VAL_74:.*]] = scf.if %[[VAL_73]] -> (f64) { // CHECK: %[[VAL_75:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_36]]] : memref // CHECK: %[[VAL_76:.*]] = arith.addf %[[VAL_37]], %[[VAL_75]] : f64 // CHECK: scf.yield %[[VAL_76]] : f64 // CHECK: } else { -// CHECK: %[[VAL_77:.*]] = arith.cmpi eq, %[[VAL_38]], %[[VAL_44]] : index -// CHECK: %[[VAL_78:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_44]] : index +// CHECK: %[[VAL_77:.*]] = arith.cmpi eq(%[[VAL_38]], %[[VAL_44]]) : index +// CHECK: %[[VAL_78:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_44]]) : index // CHECK: %[[VAL_79:.*]] = arith.andi %[[VAL_77]], %[[VAL_78]] : i1 // CHECK: %[[VAL_80:.*]] = scf.if %[[VAL_79]] -> (f64) { // CHECK: %[[VAL_81:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_34]]] : memref @@ -1357,13 +1357,13 @@ // CHECK: %[[VAL_84:.*]] = arith.addf %[[VAL_82]], %[[VAL_83]] : f64 // CHECK: scf.yield %[[VAL_84]] : f64 // CHECK: } else { -// CHECK: %[[VAL_85:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_44]] : index +// CHECK: %[[VAL_85:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_44]]) : index // CHECK: %[[VAL_86:.*]] = scf.if %[[VAL_85]] -> (f64) { // CHECK: %[[VAL_87:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_35]]] : memref // CHECK: %[[VAL_88:.*]] = arith.addf %[[VAL_37]], %[[VAL_87]] : f64 // CHECK: scf.yield %[[VAL_88]] : f64 // CHECK: } else { -// CHECK: %[[VAL_89:.*]] = arith.cmpi eq, %[[VAL_38]], %[[VAL_44]] : index +// CHECK: %[[VAL_89:.*]] = arith.cmpi eq(%[[VAL_38]], %[[VAL_44]]) : index // CHECK: %[[VAL_90:.*]] = scf.if %[[VAL_89]] -> (f64) { // CHECK: %[[VAL_91:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_34]]] : memref // CHECK: %[[VAL_92:.*]] = arith.addf %[[VAL_37]], %[[VAL_91]] : f64 @@ -1383,30 +1383,30 @@ // CHECK: } // CHECK: scf.yield %[[VAL_98:.*]] : f64 // CHECK: } -// CHECK: %[[VAL_99:.*]] = arith.cmpi eq, %[[VAL_38]], %[[VAL_44]] : index +// CHECK: %[[VAL_99:.*]] = arith.cmpi eq(%[[VAL_38]], %[[VAL_44]]) : index // CHECK: %[[VAL_100:.*]] = arith.addi %[[VAL_34]], %[[VAL_5]] : index // CHECK: %[[VAL_101:.*]] = arith.select %[[VAL_99]], %[[VAL_100]], %[[VAL_34]] : index -// CHECK: %[[VAL_102:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_44]] : index +// CHECK: %[[VAL_102:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_44]]) : index // CHECK: %[[VAL_103:.*]] = arith.addi %[[VAL_35]], %[[VAL_5]] : index // CHECK: %[[VAL_104:.*]] = arith.select %[[VAL_102]], %[[VAL_103]], %[[VAL_35]] : index -// CHECK: %[[VAL_105:.*]] = arith.cmpi eq, %[[VAL_42]], %[[VAL_44]] : index +// CHECK: %[[VAL_105:.*]] = arith.cmpi eq(%[[VAL_42]], %[[VAL_44]]) : index // CHECK: %[[VAL_106:.*]] = arith.addi %[[VAL_36]], %[[VAL_5]] : index // CHECK: %[[VAL_107:.*]] = arith.select %[[VAL_105]], %[[VAL_106]], %[[VAL_36]] : index // CHECK: scf.yield %[[VAL_101]], %[[VAL_104]], %[[VAL_107]], %[[VAL_108:.*]] : index, index, index, f64 // CHECK: } // CHECK: %[[VAL_109:.*]]:3 = scf.while (%[[VAL_110:.*]] = %[[VAL_111:.*]]#1, %[[VAL_112:.*]] = %[[VAL_111]]#2, %[[VAL_113:.*]] = %[[VAL_111]]#3) : (index, index, f64) -> (index, index, f64) { -// CHECK: %[[VAL_114:.*]] = arith.cmpi ult, %[[VAL_110]], %[[VAL_21]] : index -// CHECK: %[[VAL_115:.*]] = arith.cmpi ult, %[[VAL_112]], %[[VAL_23]] : index +// CHECK: %[[VAL_114:.*]] = arith.cmpi ult(%[[VAL_110]], %[[VAL_21]]) : index +// CHECK: %[[VAL_115:.*]] = arith.cmpi ult(%[[VAL_112]], %[[VAL_23]]) : index // CHECK: %[[VAL_116:.*]] = arith.andi %[[VAL_114]], %[[VAL_115]] : i1 // CHECK: scf.condition(%[[VAL_116]]) %[[VAL_110]], %[[VAL_112]], %[[VAL_113]] : index, index, f64 // CHECK: } do { // CHECK: ^bb0(%[[VAL_117:.*]]: index, %[[VAL_118:.*]]: index, %[[VAL_119:.*]]: f64): // CHECK: %[[VAL_120:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_117]]] : memref // CHECK: %[[VAL_121:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_118]]] : memref -// CHECK: %[[VAL_122:.*]] = arith.cmpi ult, %[[VAL_121]], %[[VAL_120]] : index +// CHECK: %[[VAL_122:.*]] = arith.cmpi ult(%[[VAL_121]], %[[VAL_120]]) : index // CHECK: %[[VAL_123:.*]] = arith.select %[[VAL_122]], %[[VAL_121]], %[[VAL_120]] : index -// CHECK: %[[VAL_124:.*]] = arith.cmpi eq, %[[VAL_120]], %[[VAL_123]] : index -// CHECK: %[[VAL_125:.*]] = arith.cmpi eq, %[[VAL_121]], %[[VAL_123]] : index +// CHECK: %[[VAL_124:.*]] = arith.cmpi eq(%[[VAL_120]], %[[VAL_123]]) : index +// CHECK: %[[VAL_125:.*]] = arith.cmpi eq(%[[VAL_121]], %[[VAL_123]]) : index // CHECK: %[[VAL_126:.*]] = arith.andi %[[VAL_124]], %[[VAL_125]] : i1 // CHECK: %[[VAL_127:.*]] = scf.if %[[VAL_126]] -> (f64) { // CHECK: %[[VAL_128:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_117]]] : memref @@ -1415,13 +1415,13 @@ // CHECK: %[[VAL_131:.*]] = arith.addf %[[VAL_129]], %[[VAL_130]] : f64 // CHECK: scf.yield %[[VAL_131]] : f64 // CHECK: } else { -// CHECK: %[[VAL_132:.*]] = arith.cmpi eq, %[[VAL_121]], %[[VAL_123]] : index +// CHECK: %[[VAL_132:.*]] = arith.cmpi eq(%[[VAL_121]], %[[VAL_123]]) : index // CHECK: %[[VAL_133:.*]] = scf.if %[[VAL_132]] -> (f64) { // CHECK: %[[VAL_134:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_118]]] : memref // CHECK: %[[VAL_135:.*]] = arith.addf %[[VAL_119]], %[[VAL_134]] : f64 // CHECK: scf.yield %[[VAL_135]] : f64 // CHECK: } else { -// CHECK: %[[VAL_136:.*]] = arith.cmpi eq, %[[VAL_120]], %[[VAL_123]] : index +// CHECK: %[[VAL_136:.*]] = arith.cmpi eq(%[[VAL_120]], %[[VAL_123]]) : index // CHECK: %[[VAL_137:.*]] = scf.if %[[VAL_136]] -> (f64) { // CHECK: %[[VAL_138:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_117]]] : memref // CHECK: %[[VAL_139:.*]] = arith.addf %[[VAL_119]], %[[VAL_138]] : f64 @@ -1433,27 +1433,27 @@ // CHECK: } // CHECK: scf.yield %[[VAL_141:.*]] : f64 // CHECK: } -// CHECK: %[[VAL_142:.*]] = arith.cmpi eq, %[[VAL_120]], %[[VAL_123]] : index +// CHECK: %[[VAL_142:.*]] = arith.cmpi eq(%[[VAL_120]], %[[VAL_123]]) : index // CHECK: %[[VAL_143:.*]] = arith.addi %[[VAL_117]], %[[VAL_5]] : index // CHECK: %[[VAL_144:.*]] = arith.select %[[VAL_142]], %[[VAL_143]], %[[VAL_117]] : index -// CHECK: %[[VAL_145:.*]] = arith.cmpi eq, %[[VAL_121]], %[[VAL_123]] : index +// CHECK: %[[VAL_145:.*]] = arith.cmpi eq(%[[VAL_121]], %[[VAL_123]]) : index // CHECK: %[[VAL_146:.*]] = arith.addi %[[VAL_118]], %[[VAL_5]] : index // CHECK: %[[VAL_147:.*]] = arith.select %[[VAL_145]], %[[VAL_146]], %[[VAL_118]] : index // CHECK: scf.yield %[[VAL_144]], %[[VAL_147]], %[[VAL_148:.*]] : index, index, f64 // CHECK: } // CHECK: %[[VAL_149:.*]]:3 = scf.while (%[[VAL_150:.*]] = %[[VAL_151:.*]]#0, %[[VAL_152:.*]] = %[[VAL_153:.*]]#1, %[[VAL_154:.*]] = %[[VAL_153]]#2) : (index, index, f64) -> (index, index, f64) { -// CHECK: %[[VAL_155:.*]] = arith.cmpi ult, %[[VAL_150]], %[[VAL_19]] : index -// CHECK: %[[VAL_156:.*]] = arith.cmpi ult, %[[VAL_152]], %[[VAL_23]] : index +// CHECK: %[[VAL_155:.*]] = arith.cmpi ult(%[[VAL_150]], %[[VAL_19]]) : index +// CHECK: %[[VAL_156:.*]] = arith.cmpi ult(%[[VAL_152]], %[[VAL_23]]) : index // CHECK: %[[VAL_157:.*]] = arith.andi %[[VAL_155]], %[[VAL_156]] : i1 // CHECK: scf.condition(%[[VAL_157]]) %[[VAL_150]], %[[VAL_152]], %[[VAL_154]] : index, index, f64 // CHECK: } do { // CHECK: ^bb0(%[[VAL_158:.*]]: index, %[[VAL_159:.*]]: index, %[[VAL_160:.*]]: f64): // CHECK: %[[VAL_161:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_158]]] : memref // CHECK: %[[VAL_162:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_159]]] : memref -// CHECK: %[[VAL_163:.*]] = arith.cmpi ult, %[[VAL_162]], %[[VAL_161]] : index +// CHECK: %[[VAL_163:.*]] = arith.cmpi ult(%[[VAL_162]], %[[VAL_161]]) : index // CHECK: %[[VAL_164:.*]] = arith.select %[[VAL_163]], %[[VAL_162]], %[[VAL_161]] : index -// CHECK: %[[VAL_165:.*]] = arith.cmpi eq, %[[VAL_161]], %[[VAL_164]] : index -// CHECK: %[[VAL_166:.*]] = arith.cmpi eq, %[[VAL_162]], %[[VAL_164]] : index +// CHECK: %[[VAL_165:.*]] = arith.cmpi eq(%[[VAL_161]], %[[VAL_164]]) : index +// CHECK: %[[VAL_166:.*]] = arith.cmpi eq(%[[VAL_162]], %[[VAL_164]]) : index // CHECK: %[[VAL_167:.*]] = arith.andi %[[VAL_165]], %[[VAL_166]] : i1 // CHECK: %[[VAL_168:.*]] = scf.if %[[VAL_167]] -> (f64) { // CHECK: %[[VAL_169:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_158]]] : memref @@ -1462,13 +1462,13 @@ // CHECK: %[[VAL_172:.*]] = arith.addf %[[VAL_170]], %[[VAL_171]] : f64 // CHECK: scf.yield %[[VAL_172]] : f64 // CHECK: } else { -// CHECK: %[[VAL_173:.*]] = arith.cmpi eq, %[[VAL_162]], %[[VAL_164]] : index +// CHECK: %[[VAL_173:.*]] = arith.cmpi eq(%[[VAL_162]], %[[VAL_164]]) : index // CHECK: %[[VAL_174:.*]] = scf.if %[[VAL_173]] -> (f64) { // CHECK: %[[VAL_175:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_159]]] : memref // CHECK: %[[VAL_176:.*]] = arith.addf %[[VAL_160]], %[[VAL_175]] : f64 // CHECK: scf.yield %[[VAL_176]] : f64 // CHECK: } else { -// CHECK: %[[VAL_177:.*]] = arith.cmpi eq, %[[VAL_161]], %[[VAL_164]] : index +// CHECK: %[[VAL_177:.*]] = arith.cmpi eq(%[[VAL_161]], %[[VAL_164]]) : index // CHECK: %[[VAL_178:.*]] = scf.if %[[VAL_177]] -> (f64) { // CHECK: %[[VAL_179:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_158]]] : memref // CHECK: %[[VAL_180:.*]] = arith.addf %[[VAL_160]], %[[VAL_179]] : f64 @@ -1480,10 +1480,10 @@ // CHECK: } // CHECK: scf.yield %[[VAL_182:.*]] : f64 // CHECK: } -// CHECK: %[[VAL_183:.*]] = arith.cmpi eq, %[[VAL_161]], %[[VAL_164]] : index +// CHECK: %[[VAL_183:.*]] = arith.cmpi eq(%[[VAL_161]], %[[VAL_164]]) : index // CHECK: %[[VAL_184:.*]] = arith.addi %[[VAL_158]], %[[VAL_5]] : index // CHECK: %[[VAL_185:.*]] = arith.select %[[VAL_183]], %[[VAL_184]], %[[VAL_158]] : index -// CHECK: %[[VAL_186:.*]] = arith.cmpi eq, %[[VAL_162]], %[[VAL_164]] : index +// CHECK: %[[VAL_186:.*]] = arith.cmpi eq(%[[VAL_162]], %[[VAL_164]]) : index // CHECK: %[[VAL_187:.*]] = arith.addi %[[VAL_159]], %[[VAL_5]] : index // CHECK: %[[VAL_188:.*]] = arith.select %[[VAL_186]], %[[VAL_187]], %[[VAL_159]] : index // CHECK: scf.yield %[[VAL_185]], %[[VAL_188]], %[[VAL_189:.*]] : index, index, f64 @@ -1494,18 +1494,18 @@ // CHECK: scf.yield %[[VAL_195]] : f64 // CHECK: } // CHECK: %[[VAL_196:.*]]:3 = scf.while (%[[VAL_197:.*]] = %[[VAL_198:.*]]#0, %[[VAL_199:.*]] = %[[VAL_200:.*]]#0, %[[VAL_201:.*]] = %[[VAL_202:.*]]) : (index, index, f64) -> (index, index, f64) { -// CHECK: %[[VAL_203:.*]] = arith.cmpi ult, %[[VAL_197]], %[[VAL_19]] : index -// CHECK: %[[VAL_204:.*]] = arith.cmpi ult, %[[VAL_199]], %[[VAL_21]] : index +// CHECK: %[[VAL_203:.*]] = arith.cmpi ult(%[[VAL_197]], %[[VAL_19]]) : index +// CHECK: %[[VAL_204:.*]] = arith.cmpi ult(%[[VAL_199]], %[[VAL_21]]) : index // CHECK: %[[VAL_205:.*]] = arith.andi %[[VAL_203]], %[[VAL_204]] : i1 // CHECK: scf.condition(%[[VAL_205]]) %[[VAL_197]], %[[VAL_199]], %[[VAL_201]] : index, index, f64 // CHECK: } do { // CHECK: ^bb0(%[[VAL_206:.*]]: index, %[[VAL_207:.*]]: index, %[[VAL_208:.*]]: f64): // CHECK: %[[VAL_209:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_206]]] : memref // CHECK: %[[VAL_210:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_207]]] : memref -// CHECK: %[[VAL_211:.*]] = arith.cmpi ult, %[[VAL_210]], %[[VAL_209]] : index +// CHECK: %[[VAL_211:.*]] = arith.cmpi ult(%[[VAL_210]], %[[VAL_209]]) : index // CHECK: %[[VAL_212:.*]] = arith.select %[[VAL_211]], %[[VAL_210]], %[[VAL_209]] : index -// CHECK: %[[VAL_213:.*]] = arith.cmpi eq, %[[VAL_209]], %[[VAL_212]] : index -// CHECK: %[[VAL_214:.*]] = arith.cmpi eq, %[[VAL_210]], %[[VAL_212]] : index +// CHECK: %[[VAL_213:.*]] = arith.cmpi eq(%[[VAL_209]], %[[VAL_212]]) : index +// CHECK: %[[VAL_214:.*]] = arith.cmpi eq(%[[VAL_210]], %[[VAL_212]]) : index // CHECK: %[[VAL_215:.*]] = arith.andi %[[VAL_213]], %[[VAL_214]] : i1 // CHECK: %[[VAL_216:.*]] = scf.if %[[VAL_215]] -> (f64) { // CHECK: %[[VAL_217:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_206]]] : memref @@ -1514,13 +1514,13 @@ // CHECK: %[[VAL_220:.*]] = arith.addf %[[VAL_218]], %[[VAL_219]] : f64 // CHECK: scf.yield %[[VAL_220]] : f64 // CHECK: } else { -// CHECK: %[[VAL_221:.*]] = arith.cmpi eq, %[[VAL_210]], %[[VAL_212]] : index +// CHECK: %[[VAL_221:.*]] = arith.cmpi eq(%[[VAL_210]], %[[VAL_212]]) : index // CHECK: %[[VAL_222:.*]] = scf.if %[[VAL_221]] -> (f64) { // CHECK: %[[VAL_223:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_207]]] : memref // CHECK: %[[VAL_224:.*]] = arith.addf %[[VAL_208]], %[[VAL_223]] : f64 // CHECK: scf.yield %[[VAL_224]] : f64 // CHECK: } else { -// CHECK: %[[VAL_225:.*]] = arith.cmpi eq, %[[VAL_209]], %[[VAL_212]] : index +// CHECK: %[[VAL_225:.*]] = arith.cmpi eq(%[[VAL_209]], %[[VAL_212]]) : index // CHECK: %[[VAL_226:.*]] = scf.if %[[VAL_225]] -> (f64) { // CHECK: %[[VAL_227:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_206]]] : memref // CHECK: %[[VAL_228:.*]] = arith.addf %[[VAL_208]], %[[VAL_227]] : f64 @@ -1532,10 +1532,10 @@ // CHECK: } // CHECK: scf.yield %[[VAL_230:.*]] : f64 // CHECK: } -// CHECK: %[[VAL_231:.*]] = arith.cmpi eq, %[[VAL_209]], %[[VAL_212]] : index +// CHECK: %[[VAL_231:.*]] = arith.cmpi eq(%[[VAL_209]], %[[VAL_212]]) : index // CHECK: %[[VAL_232:.*]] = arith.addi %[[VAL_206]], %[[VAL_5]] : index // CHECK: %[[VAL_233:.*]] = arith.select %[[VAL_231]], %[[VAL_232]], %[[VAL_206]] : index -// CHECK: %[[VAL_234:.*]] = arith.cmpi eq, %[[VAL_210]], %[[VAL_212]] : index +// CHECK: %[[VAL_234:.*]] = arith.cmpi eq(%[[VAL_210]], %[[VAL_212]]) : index // CHECK: %[[VAL_235:.*]] = arith.addi %[[VAL_207]], %[[VAL_5]] : index // CHECK: %[[VAL_236:.*]] = arith.select %[[VAL_234]], %[[VAL_235]], %[[VAL_207]] : index // CHECK: scf.yield %[[VAL_233]], %[[VAL_236]], %[[VAL_237:.*]] : index, index, f64 diff --git a/mlir/test/Dialect/SparseTensor/sparse_2d.mlir b/mlir/test/Dialect/SparseTensor/sparse_2d.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_2d.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_2d.mlir @@ -108,12 +108,12 @@ // CHECK: %[[VAL_16:.*]] = arith.addi %[[VAL_14]], %[[VAL_7]] : index // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_16]]] : memref // CHECK: %[[VAL_18:.*]]:2 = scf.while (%[[VAL_19:.*]] = %[[VAL_15]], %[[VAL_20:.*]] = %[[VAL_5]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_17]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_17]]) : index // CHECK: scf.condition(%[[VAL_21]]) %[[VAL_19]], %[[VAL_20]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_22:.*]]: index, %[[VAL_23:.*]]: index): // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_22]]] : memref -// CHECK: %[[VAL_25:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: scf.if %[[VAL_25]] { // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_22]]] : memref // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_14]], %[[VAL_23]]] : memref<32x16xf32> @@ -126,7 +126,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_22]], %[[VAL_7]] : index // CHECK: %[[VAL_32:.*]] = arith.select %[[VAL_30]], %[[VAL_31]], %[[VAL_22]] : index // CHECK: %[[VAL_33:.*]] = arith.addi %[[VAL_23]], %[[VAL_7]] : index @@ -208,12 +208,12 @@ // CHECK: %[[VAL_14:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_15:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_16:.*]]:2 = scf.while (%[[VAL_17:.*]] = %[[VAL_14]], %[[VAL_18:.*]] = %[[VAL_6]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_19:.*]] = arith.cmpi ult, %[[VAL_17]], %[[VAL_15]] : index +// CHECK: %[[VAL_19:.*]] = arith.cmpi ult(%[[VAL_17]], %[[VAL_15]]) : index // CHECK: scf.condition(%[[VAL_19]]) %[[VAL_17]], %[[VAL_18]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_20:.*]]: index, %[[VAL_21:.*]]: index): // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_20]]] : memref -// CHECK: %[[VAL_23:.*]] = arith.cmpi eq, %[[VAL_22]], %[[VAL_21]] : index +// CHECK: %[[VAL_23:.*]] = arith.cmpi eq(%[[VAL_22]], %[[VAL_21]]) : index // CHECK: scf.if %[[VAL_23]] { // CHECK: scf.for %[[VAL_24:.*]] = %[[VAL_6]] to %[[VAL_4]] step %[[VAL_7]] { // CHECK: %[[VAL_25:.*]] = arith.muli %[[VAL_20]], %[[VAL_4]] : index @@ -232,7 +232,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_32:.*]] = arith.cmpi eq, %[[VAL_22]], %[[VAL_21]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi eq(%[[VAL_22]], %[[VAL_21]]) : index // CHECK: %[[VAL_33:.*]] = arith.addi %[[VAL_20]], %[[VAL_7]] : index // CHECK: %[[VAL_34:.*]] = arith.select %[[VAL_32]], %[[VAL_33]], %[[VAL_20]] : index // CHECK: %[[VAL_35:.*]] = arith.addi %[[VAL_21]], %[[VAL_7]] : index @@ -318,23 +318,23 @@ // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_18:.*]]:2 = scf.while (%[[VAL_19:.*]] = %[[VAL_16]], %[[VAL_20:.*]] = %[[VAL_6]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_17]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_17]]) : index // CHECK: scf.condition(%[[VAL_21]]) %[[VAL_19]], %[[VAL_20]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_22:.*]]: index, %[[VAL_23:.*]]: index): // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_22]]] : memref -// CHECK: %[[VAL_25:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: scf.if %[[VAL_25]] { // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_22]]] : memref // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_22]], %[[VAL_7]] : index // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_29:.*]]:2 = scf.while (%[[VAL_30:.*]] = %[[VAL_26]], %[[VAL_31:.*]] = %[[VAL_6]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_32:.*]] = arith.cmpi ult, %[[VAL_30]], %[[VAL_28]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi ult(%[[VAL_30]], %[[VAL_28]]) : index // CHECK: scf.condition(%[[VAL_32]]) %[[VAL_30]], %[[VAL_31]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_33:.*]]: index, %[[VAL_34:.*]]: index): // CHECK: %[[VAL_35:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_33]]] : memref -// CHECK: %[[VAL_36:.*]] = arith.cmpi eq, %[[VAL_35]], %[[VAL_34]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi eq(%[[VAL_35]], %[[VAL_34]]) : index // CHECK: scf.if %[[VAL_36]] { // CHECK: %[[VAL_37:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_33]]] : memref // CHECK: %[[VAL_38:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_23]], %[[VAL_34]]] : memref<32x16xf32> @@ -347,7 +347,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_41:.*]] = arith.cmpi eq, %[[VAL_35]], %[[VAL_34]] : index +// CHECK: %[[VAL_41:.*]] = arith.cmpi eq(%[[VAL_35]], %[[VAL_34]]) : index // CHECK: %[[VAL_42:.*]] = arith.addi %[[VAL_33]], %[[VAL_7]] : index // CHECK: %[[VAL_43:.*]] = arith.select %[[VAL_41]], %[[VAL_42]], %[[VAL_33]] : index // CHECK: %[[VAL_44:.*]] = arith.addi %[[VAL_34]], %[[VAL_7]] : index @@ -366,7 +366,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_50:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_50:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: %[[VAL_51:.*]] = arith.addi %[[VAL_22]], %[[VAL_7]] : index // CHECK: %[[VAL_52:.*]] = arith.select %[[VAL_50]], %[[VAL_51]], %[[VAL_22]] : index // CHECK: %[[VAL_53:.*]] = arith.addi %[[VAL_23]], %[[VAL_7]] : index @@ -458,18 +458,18 @@ // CHECK: %[[VAL_19:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_21:.*]]:2 = scf.while (%[[VAL_22:.*]] = %[[VAL_17]], %[[VAL_23:.*]] = %[[VAL_19]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_24:.*]] = arith.cmpi ult, %[[VAL_22]], %[[VAL_18]] : index -// CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_23]], %[[VAL_20]] : index +// CHECK: %[[VAL_24:.*]] = arith.cmpi ult(%[[VAL_22]], %[[VAL_18]]) : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi ult(%[[VAL_23]], %[[VAL_20]]) : index // CHECK: %[[VAL_26:.*]] = arith.andi %[[VAL_24]], %[[VAL_25]] : i1 // CHECK: scf.condition(%[[VAL_26]]) %[[VAL_22]], %[[VAL_23]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_27:.*]]: index, %[[VAL_28:.*]]: index): // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_30:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_28]]] : memref -// CHECK: %[[VAL_31:.*]] = arith.cmpi ult, %[[VAL_30]], %[[VAL_29]] : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi ult(%[[VAL_30]], %[[VAL_29]]) : index // CHECK: %[[VAL_32:.*]] = arith.select %[[VAL_31]], %[[VAL_30]], %[[VAL_29]] : index -// CHECK: %[[VAL_33:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_32]] : index -// CHECK: %[[VAL_34:.*]] = arith.cmpi eq, %[[VAL_30]], %[[VAL_32]] : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_32]]) : index +// CHECK: %[[VAL_34:.*]] = arith.cmpi eq(%[[VAL_30]], %[[VAL_32]]) : index // CHECK: %[[VAL_35:.*]] = arith.andi %[[VAL_33]], %[[VAL_34]] : i1 // CHECK: scf.if %[[VAL_35]] { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_27]]] : memref @@ -479,18 +479,18 @@ // CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_28]], %[[VAL_4]] : index // CHECK: %[[VAL_41:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_40]]] : memref // CHECK: %[[VAL_42:.*]]:2 = scf.while (%[[VAL_43:.*]] = %[[VAL_36]], %[[VAL_44:.*]] = %[[VAL_39]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_45:.*]] = arith.cmpi ult, %[[VAL_43]], %[[VAL_38]] : index -// CHECK: %[[VAL_46:.*]] = arith.cmpi ult, %[[VAL_44]], %[[VAL_41]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi ult(%[[VAL_43]], %[[VAL_38]]) : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi ult(%[[VAL_44]], %[[VAL_41]]) : index // CHECK: %[[VAL_47:.*]] = arith.andi %[[VAL_45]], %[[VAL_46]] : i1 // CHECK: scf.condition(%[[VAL_47]]) %[[VAL_43]], %[[VAL_44]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_48:.*]]: index, %[[VAL_49:.*]]: index): // CHECK: %[[VAL_50:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_48]]] : memref // CHECK: %[[VAL_51:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_49]]] : memref -// CHECK: %[[VAL_52:.*]] = arith.cmpi ult, %[[VAL_51]], %[[VAL_50]] : index +// CHECK: %[[VAL_52:.*]] = arith.cmpi ult(%[[VAL_51]], %[[VAL_50]]) : index // CHECK: %[[VAL_53:.*]] = arith.select %[[VAL_52]], %[[VAL_51]], %[[VAL_50]] : index -// CHECK: %[[VAL_54:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_53]] : index -// CHECK: %[[VAL_55:.*]] = arith.cmpi eq, %[[VAL_51]], %[[VAL_53]] : index +// CHECK: %[[VAL_54:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_53]]) : index +// CHECK: %[[VAL_55:.*]] = arith.cmpi eq(%[[VAL_51]], %[[VAL_53]]) : index // CHECK: %[[VAL_56:.*]] = arith.andi %[[VAL_54]], %[[VAL_55]] : i1 // CHECK: scf.if %[[VAL_56]] { // CHECK: %[[VAL_57:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_48]]] : memref @@ -498,12 +498,12 @@ // CHECK: %[[VAL_59:.*]] = arith.addf %[[VAL_57]], %[[VAL_58]] : f32 // CHECK: memref.store %[[VAL_59]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_53]]] : memref<32x16xf32> // CHECK: } else { -// CHECK: %[[VAL_60:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_53]] : index +// CHECK: %[[VAL_60:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_53]]) : index // CHECK: scf.if %[[VAL_60]] { // CHECK: %[[VAL_61:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_48]]] : memref // CHECK: memref.store %[[VAL_61]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_53]]] : memref<32x16xf32> // CHECK: } else { -// CHECK: %[[VAL_62:.*]] = arith.cmpi eq, %[[VAL_51]], %[[VAL_53]] : index +// CHECK: %[[VAL_62:.*]] = arith.cmpi eq(%[[VAL_51]], %[[VAL_53]]) : index // CHECK: scf.if %[[VAL_62]] { // CHECK: %[[VAL_63:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_49]]] : memref // CHECK: memref.store %[[VAL_63]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_53]]] : memref<32x16xf32> @@ -511,10 +511,10 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_64:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_53]] : index +// CHECK: %[[VAL_64:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_53]]) : index // CHECK: %[[VAL_65:.*]] = arith.addi %[[VAL_48]], %[[VAL_4]] : index // CHECK: %[[VAL_66:.*]] = arith.select %[[VAL_64]], %[[VAL_65]], %[[VAL_48]] : index -// CHECK: %[[VAL_67:.*]] = arith.cmpi eq, %[[VAL_51]], %[[VAL_53]] : index +// CHECK: %[[VAL_67:.*]] = arith.cmpi eq(%[[VAL_51]], %[[VAL_53]]) : index // CHECK: %[[VAL_68:.*]] = arith.addi %[[VAL_49]], %[[VAL_4]] : index // CHECK: %[[VAL_69:.*]] = arith.select %[[VAL_67]], %[[VAL_68]], %[[VAL_49]] : index // CHECK: scf.yield %[[VAL_66]], %[[VAL_69]] : index, index @@ -530,7 +530,7 @@ // CHECK: memref.store %[[VAL_77]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_76]]] : memref<32x16xf32> // CHECK: } // CHECK: } else { -// CHECK: %[[VAL_78:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_32]] : index +// CHECK: %[[VAL_78:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_32]]) : index // CHECK: scf.if %[[VAL_78]] { // CHECK: %[[VAL_79:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_80:.*]] = arith.addi %[[VAL_27]], %[[VAL_4]] : index @@ -541,7 +541,7 @@ // CHECK: memref.store %[[VAL_84]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_83]]] : memref<32x16xf32> // CHECK: } // CHECK: } else { -// CHECK: %[[VAL_85:.*]] = arith.cmpi eq, %[[VAL_30]], %[[VAL_32]] : index +// CHECK: %[[VAL_85:.*]] = arith.cmpi eq(%[[VAL_30]], %[[VAL_32]]) : index // CHECK: scf.if %[[VAL_85]] { // CHECK: %[[VAL_86:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_28]]] : memref // CHECK: %[[VAL_87:.*]] = arith.addi %[[VAL_28]], %[[VAL_4]] : index @@ -555,10 +555,10 @@ // CHECK: } // CHECK: } // CHECK: } -// CHECK: %[[VAL_92:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_32]] : index +// CHECK: %[[VAL_92:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_32]]) : index // CHECK: %[[VAL_93:.*]] = arith.addi %[[VAL_27]], %[[VAL_4]] : index // CHECK: %[[VAL_94:.*]] = arith.select %[[VAL_92]], %[[VAL_93]], %[[VAL_27]] : index -// CHECK: %[[VAL_95:.*]] = arith.cmpi eq, %[[VAL_30]], %[[VAL_32]] : index +// CHECK: %[[VAL_95:.*]] = arith.cmpi eq(%[[VAL_30]], %[[VAL_32]]) : index // CHECK: %[[VAL_96:.*]] = arith.addi %[[VAL_28]], %[[VAL_4]] : index // CHECK: %[[VAL_97:.*]] = arith.select %[[VAL_95]], %[[VAL_96]], %[[VAL_28]] : index // CHECK: scf.yield %[[VAL_94]], %[[VAL_97]] : index, index @@ -622,18 +622,18 @@ // CHECK: %[[VAL_19:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_21:.*]]:2 = scf.while (%[[VAL_22:.*]] = %[[VAL_17]], %[[VAL_23:.*]] = %[[VAL_19]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_24:.*]] = arith.cmpi ult, %[[VAL_22]], %[[VAL_18]] : index -// CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_23]], %[[VAL_20]] : index +// CHECK: %[[VAL_24:.*]] = arith.cmpi ult(%[[VAL_22]], %[[VAL_18]]) : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi ult(%[[VAL_23]], %[[VAL_20]]) : index // CHECK: %[[VAL_26:.*]] = arith.andi %[[VAL_24]], %[[VAL_25]] : i1 // CHECK: scf.condition(%[[VAL_26]]) %[[VAL_22]], %[[VAL_23]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_27:.*]]: index, %[[VAL_28:.*]]: index): // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_30:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_28]]] : memref -// CHECK: %[[VAL_31:.*]] = arith.cmpi ult, %[[VAL_30]], %[[VAL_29]] : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi ult(%[[VAL_30]], %[[VAL_29]]) : index // CHECK: %[[VAL_32:.*]] = arith.select %[[VAL_31]], %[[VAL_30]], %[[VAL_29]] : index -// CHECK: %[[VAL_33:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_32]] : index -// CHECK: %[[VAL_34:.*]] = arith.cmpi eq, %[[VAL_30]], %[[VAL_32]] : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_32]]) : index +// CHECK: %[[VAL_34:.*]] = arith.cmpi eq(%[[VAL_30]], %[[VAL_32]]) : index // CHECK: %[[VAL_35:.*]] = arith.andi %[[VAL_33]], %[[VAL_34]] : i1 // CHECK: scf.if %[[VAL_35]] { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_27]]] : memref @@ -643,18 +643,18 @@ // CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_28]], %[[VAL_4]] : index // CHECK: %[[VAL_41:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_40]]] : memref // CHECK: %[[VAL_42:.*]]:2 = scf.while (%[[VAL_43:.*]] = %[[VAL_36]], %[[VAL_44:.*]] = %[[VAL_39]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_45:.*]] = arith.cmpi ult, %[[VAL_43]], %[[VAL_38]] : index -// CHECK: %[[VAL_46:.*]] = arith.cmpi ult, %[[VAL_44]], %[[VAL_41]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi ult(%[[VAL_43]], %[[VAL_38]]) : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi ult(%[[VAL_44]], %[[VAL_41]]) : index // CHECK: %[[VAL_47:.*]] = arith.andi %[[VAL_45]], %[[VAL_46]] : i1 // CHECK: scf.condition(%[[VAL_47]]) %[[VAL_43]], %[[VAL_44]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_48:.*]]: index, %[[VAL_49:.*]]: index): // CHECK: %[[VAL_50:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_48]]] : memref // CHECK: %[[VAL_51:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_49]]] : memref -// CHECK: %[[VAL_52:.*]] = arith.cmpi ult, %[[VAL_51]], %[[VAL_50]] : index +// CHECK: %[[VAL_52:.*]] = arith.cmpi ult(%[[VAL_51]], %[[VAL_50]]) : index // CHECK: %[[VAL_53:.*]] = arith.select %[[VAL_52]], %[[VAL_51]], %[[VAL_50]] : index -// CHECK: %[[VAL_54:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_53]] : index -// CHECK: %[[VAL_55:.*]] = arith.cmpi eq, %[[VAL_51]], %[[VAL_53]] : index +// CHECK: %[[VAL_54:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_53]]) : index +// CHECK: %[[VAL_55:.*]] = arith.cmpi eq(%[[VAL_51]], %[[VAL_53]]) : index // CHECK: %[[VAL_56:.*]] = arith.andi %[[VAL_54]], %[[VAL_55]] : i1 // CHECK: scf.if %[[VAL_56]] { // CHECK: %[[VAL_57:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_48]]] : memref @@ -663,20 +663,20 @@ // CHECK: memref.store %[[VAL_59]], %[[VAL_16]]{{\[}}%[[VAL_32]], %[[VAL_53]]] : memref<32x16xf32> // CHECK: } else { // CHECK: } -// CHECK: %[[VAL_60:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_53]] : index +// CHECK: %[[VAL_60:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_53]]) : index // CHECK: %[[VAL_61:.*]] = arith.addi %[[VAL_48]], %[[VAL_4]] : index // CHECK: %[[VAL_62:.*]] = arith.select %[[VAL_60]], %[[VAL_61]], %[[VAL_48]] : index -// CHECK: %[[VAL_63:.*]] = arith.cmpi eq, %[[VAL_51]], %[[VAL_53]] : index +// CHECK: %[[VAL_63:.*]] = arith.cmpi eq(%[[VAL_51]], %[[VAL_53]]) : index // CHECK: %[[VAL_64:.*]] = arith.addi %[[VAL_49]], %[[VAL_4]] : index // CHECK: %[[VAL_65:.*]] = arith.select %[[VAL_63]], %[[VAL_64]], %[[VAL_49]] : index // CHECK: scf.yield %[[VAL_62]], %[[VAL_65]] : index, index // CHECK: } // CHECK: } else { // CHECK: } -// CHECK: %[[VAL_66:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_32]] : index +// CHECK: %[[VAL_66:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_32]]) : index // CHECK: %[[VAL_67:.*]] = arith.addi %[[VAL_27]], %[[VAL_4]] : index // CHECK: %[[VAL_68:.*]] = arith.select %[[VAL_66]], %[[VAL_67]], %[[VAL_27]] : index -// CHECK: %[[VAL_69:.*]] = arith.cmpi eq, %[[VAL_30]], %[[VAL_32]] : index +// CHECK: %[[VAL_69:.*]] = arith.cmpi eq(%[[VAL_30]], %[[VAL_32]]) : index // CHECK: %[[VAL_70:.*]] = arith.addi %[[VAL_28]], %[[VAL_4]] : index // CHECK: %[[VAL_71:.*]] = arith.select %[[VAL_69]], %[[VAL_70]], %[[VAL_28]] : index // CHECK: scf.yield %[[VAL_68]], %[[VAL_71]] : index, index @@ -715,25 +715,25 @@ // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_5]]] : memref // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_18:.*]]:2 = scf.while (%[[VAL_19:.*]] = %[[VAL_16]], %[[VAL_20:.*]] = %[[VAL_5]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_21:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_17]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_17]]) : index // CHECK: scf.condition(%[[VAL_21]]) %[[VAL_19]], %[[VAL_20]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_22:.*]]: index, %[[VAL_23:.*]]: index): // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_22]]] : memref -// CHECK: %[[VAL_25:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: scf.if %[[VAL_25]] { // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_23]]] : memref // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_23]], %[[VAL_7]] : index // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_29:.*]]:2 = scf.while (%[[VAL_30:.*]] = %[[VAL_26]], %[[VAL_31:.*]] = %[[VAL_5]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_32:.*]] = arith.cmpi ult, %[[VAL_30]], %[[VAL_28]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi ult(%[[VAL_30]], %[[VAL_28]]) : index // CHECK: scf.condition(%[[VAL_32]]) %[[VAL_30]], %[[VAL_31]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_33:.*]]: index, %[[VAL_34:.*]]: index): // CHECK: %[[VAL_35:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_33]]] : memref // CHECK: %[[VAL_36:.*]] = arith.muli %[[VAL_22]], %[[VAL_4]] : index // CHECK: %[[VAL_37:.*]] = arith.addi %[[VAL_36]], %[[VAL_34]] : index -// CHECK: %[[VAL_38:.*]] = arith.cmpi eq, %[[VAL_35]], %[[VAL_34]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi eq(%[[VAL_35]], %[[VAL_34]]) : index // CHECK: scf.if %[[VAL_38]] { // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_37]]] : memref // CHECK: %[[VAL_40:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_33]]] : memref @@ -746,7 +746,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_43:.*]] = arith.cmpi eq, %[[VAL_35]], %[[VAL_34]] : index +// CHECK: %[[VAL_43:.*]] = arith.cmpi eq(%[[VAL_35]], %[[VAL_34]]) : index // CHECK: %[[VAL_44:.*]] = arith.addi %[[VAL_33]], %[[VAL_7]] : index // CHECK: %[[VAL_45:.*]] = arith.select %[[VAL_43]], %[[VAL_44]], %[[VAL_33]] : index // CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_34]], %[[VAL_7]] : index @@ -771,7 +771,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_58:.*]] = arith.cmpi eq, %[[VAL_24]], %[[VAL_23]] : index +// CHECK: %[[VAL_58:.*]] = arith.cmpi eq(%[[VAL_24]], %[[VAL_23]]) : index // CHECK: %[[VAL_59:.*]] = arith.addi %[[VAL_22]], %[[VAL_7]] : index // CHECK: %[[VAL_60:.*]] = arith.select %[[VAL_58]], %[[VAL_59]], %[[VAL_22]] : index // CHECK: %[[VAL_61:.*]] = arith.addi %[[VAL_23]], %[[VAL_7]] : index @@ -1101,12 +1101,12 @@ // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_28:.*]]:2 = scf.while (%[[VAL_29:.*]] = %[[VAL_26]], %[[VAL_30:.*]] = %[[VAL_6]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_31:.*]] = arith.cmpi ult, %[[VAL_29]], %[[VAL_27]] : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi ult(%[[VAL_29]], %[[VAL_27]]) : index // CHECK: scf.condition(%[[VAL_31]]) %[[VAL_29]], %[[VAL_30]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_32:.*]]: index, %[[VAL_33:.*]]: index): // CHECK: %[[VAL_34:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_32]]] : memref -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_34]], %[[VAL_33]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_34]], %[[VAL_33]]) : index // CHECK: scf.if %[[VAL_35]] { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_24]]{{\[}}%[[VAL_33]]] : memref // CHECK: %[[VAL_37:.*]] = memref.load %[[VAL_20]]{{\[}}%[[VAL_33]]] : memref @@ -1120,25 +1120,25 @@ // CHECK: %[[VAL_45:.*]] = arith.addi %[[VAL_33]], %[[VAL_7]] : index // CHECK: %[[VAL_46:.*]] = memref.load %[[VAL_17]]{{\[}}%[[VAL_45]]] : memref // CHECK: %[[VAL_47:.*]]:4 = scf.while (%[[VAL_48:.*]] = %[[VAL_38]], %[[VAL_49:.*]] = %[[VAL_41]], %[[VAL_50:.*]] = %[[VAL_44]], %[[VAL_51:.*]] = %[[VAL_36]]) : (index, index, index, f32) -> (index, index, index, f32) { -// CHECK: %[[VAL_52:.*]] = arith.cmpi ult, %[[VAL_48]], %[[VAL_40]] : index -// CHECK: %[[VAL_53:.*]] = arith.cmpi ult, %[[VAL_49]], %[[VAL_43]] : index +// CHECK: %[[VAL_52:.*]] = arith.cmpi ult(%[[VAL_48]], %[[VAL_40]]) : index +// CHECK: %[[VAL_53:.*]] = arith.cmpi ult(%[[VAL_49]], %[[VAL_43]]) : index // CHECK: %[[VAL_54:.*]] = arith.andi %[[VAL_52]], %[[VAL_53]] : i1 -// CHECK: %[[VAL_55:.*]] = arith.cmpi ult, %[[VAL_50]], %[[VAL_46]] : index +// CHECK: %[[VAL_55:.*]] = arith.cmpi ult(%[[VAL_50]], %[[VAL_46]]) : index // CHECK: %[[VAL_56:.*]] = arith.andi %[[VAL_54]], %[[VAL_55]] : i1 // CHECK: scf.condition(%[[VAL_56]]) %[[VAL_48]], %[[VAL_49]], %[[VAL_50]], %[[VAL_51]] : index, index, index, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_57:.*]]: index, %[[VAL_58:.*]]: index, %[[VAL_59:.*]]: index, %[[VAL_60:.*]]: f32): // CHECK: %[[VAL_61:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_57]]] : memref // CHECK: %[[VAL_62:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_58]]] : memref -// CHECK: %[[VAL_63:.*]] = arith.cmpi ult, %[[VAL_62]], %[[VAL_61]] : index +// CHECK: %[[VAL_63:.*]] = arith.cmpi ult(%[[VAL_62]], %[[VAL_61]]) : index // CHECK: %[[VAL_64:.*]] = arith.select %[[VAL_63]], %[[VAL_62]], %[[VAL_61]] : index // CHECK: %[[VAL_65:.*]] = memref.load %[[VAL_18]]{{\[}}%[[VAL_59]]] : memref -// CHECK: %[[VAL_66:.*]] = arith.cmpi ult, %[[VAL_65]], %[[VAL_64]] : index +// CHECK: %[[VAL_66:.*]] = arith.cmpi ult(%[[VAL_65]], %[[VAL_64]]) : index // CHECK: %[[VAL_67:.*]] = arith.select %[[VAL_66]], %[[VAL_65]], %[[VAL_64]] : index -// CHECK: %[[VAL_68:.*]] = arith.cmpi eq, %[[VAL_61]], %[[VAL_67]] : index -// CHECK: %[[VAL_69:.*]] = arith.cmpi eq, %[[VAL_62]], %[[VAL_67]] : index +// CHECK: %[[VAL_68:.*]] = arith.cmpi eq(%[[VAL_61]], %[[VAL_67]]) : index +// CHECK: %[[VAL_69:.*]] = arith.cmpi eq(%[[VAL_62]], %[[VAL_67]]) : index // CHECK: %[[VAL_70:.*]] = arith.andi %[[VAL_68]], %[[VAL_69]] : i1 -// CHECK: %[[VAL_71:.*]] = arith.cmpi eq, %[[VAL_65]], %[[VAL_67]] : index +// CHECK: %[[VAL_71:.*]] = arith.cmpi eq(%[[VAL_65]], %[[VAL_67]]) : index // CHECK: %[[VAL_72:.*]] = arith.andi %[[VAL_70]], %[[VAL_71]] : i1 // CHECK: %[[VAL_73:.*]] = scf.if %[[VAL_72]] -> (f32) { // CHECK: %[[VAL_74:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_57]]] : memref @@ -1151,8 +1151,8 @@ // CHECK: %[[VAL_81:.*]] = arith.addf %[[VAL_60]], %[[VAL_80]] : f32 // CHECK: scf.yield %[[VAL_81]] : f32 // CHECK: } else { -// CHECK: %[[VAL_82:.*]] = arith.cmpi eq, %[[VAL_61]], %[[VAL_67]] : index -// CHECK: %[[VAL_83:.*]] = arith.cmpi eq, %[[VAL_62]], %[[VAL_67]] : index +// CHECK: %[[VAL_82:.*]] = arith.cmpi eq(%[[VAL_61]], %[[VAL_67]]) : index +// CHECK: %[[VAL_83:.*]] = arith.cmpi eq(%[[VAL_62]], %[[VAL_67]]) : index // CHECK: %[[VAL_84:.*]] = arith.andi %[[VAL_82]], %[[VAL_83]] : i1 // CHECK: %[[VAL_85:.*]] = scf.if %[[VAL_84]] -> (f32) { // CHECK: %[[VAL_86:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_57]]] : memref @@ -1163,7 +1163,7 @@ // CHECK: %[[VAL_91:.*]] = arith.addf %[[VAL_60]], %[[VAL_90]] : f32 // CHECK: scf.yield %[[VAL_91]] : f32 // CHECK: } else { -// CHECK: %[[VAL_92:.*]] = arith.cmpi eq, %[[VAL_65]], %[[VAL_67]] : index +// CHECK: %[[VAL_92:.*]] = arith.cmpi eq(%[[VAL_65]], %[[VAL_67]]) : index // CHECK: %[[VAL_93:.*]] = scf.if %[[VAL_92]] -> (f32) { // CHECK: %[[VAL_94:.*]] = memref.load %[[VAL_19]]{{\[}}%[[VAL_59]]] : memref // CHECK: %[[VAL_95:.*]] = arith.addf %[[VAL_60]], %[[VAL_94]] : f32 @@ -1175,30 +1175,30 @@ // CHECK: } // CHECK: scf.yield %[[VAL_97:.*]] : f32 // CHECK: } -// CHECK: %[[VAL_98:.*]] = arith.cmpi eq, %[[VAL_61]], %[[VAL_67]] : index +// CHECK: %[[VAL_98:.*]] = arith.cmpi eq(%[[VAL_61]], %[[VAL_67]]) : index // CHECK: %[[VAL_99:.*]] = arith.addi %[[VAL_57]], %[[VAL_7]] : index // CHECK: %[[VAL_100:.*]] = arith.select %[[VAL_98]], %[[VAL_99]], %[[VAL_57]] : index -// CHECK: %[[VAL_101:.*]] = arith.cmpi eq, %[[VAL_62]], %[[VAL_67]] : index +// CHECK: %[[VAL_101:.*]] = arith.cmpi eq(%[[VAL_62]], %[[VAL_67]]) : index // CHECK: %[[VAL_102:.*]] = arith.addi %[[VAL_58]], %[[VAL_7]] : index // CHECK: %[[VAL_103:.*]] = arith.select %[[VAL_101]], %[[VAL_102]], %[[VAL_58]] : index -// CHECK: %[[VAL_104:.*]] = arith.cmpi eq, %[[VAL_65]], %[[VAL_67]] : index +// CHECK: %[[VAL_104:.*]] = arith.cmpi eq(%[[VAL_65]], %[[VAL_67]]) : index // CHECK: %[[VAL_105:.*]] = arith.addi %[[VAL_59]], %[[VAL_7]] : index // CHECK: %[[VAL_106:.*]] = arith.select %[[VAL_104]], %[[VAL_105]], %[[VAL_59]] : index // CHECK: scf.yield %[[VAL_100]], %[[VAL_103]], %[[VAL_106]], %[[VAL_107:.*]] : index, index, index, f32 // CHECK: } // CHECK: %[[VAL_108:.*]]:3 = scf.while (%[[VAL_109:.*]] = %[[VAL_110:.*]]#0, %[[VAL_111:.*]] = %[[VAL_110]]#1, %[[VAL_112:.*]] = %[[VAL_110]]#3) : (index, index, f32) -> (index, index, f32) { -// CHECK: %[[VAL_113:.*]] = arith.cmpi ult, %[[VAL_109]], %[[VAL_40]] : index -// CHECK: %[[VAL_114:.*]] = arith.cmpi ult, %[[VAL_111]], %[[VAL_43]] : index +// CHECK: %[[VAL_113:.*]] = arith.cmpi ult(%[[VAL_109]], %[[VAL_40]]) : index +// CHECK: %[[VAL_114:.*]] = arith.cmpi ult(%[[VAL_111]], %[[VAL_43]]) : index // CHECK: %[[VAL_115:.*]] = arith.andi %[[VAL_113]], %[[VAL_114]] : i1 // CHECK: scf.condition(%[[VAL_115]]) %[[VAL_109]], %[[VAL_111]], %[[VAL_112]] : index, index, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_116:.*]]: index, %[[VAL_117:.*]]: index, %[[VAL_118:.*]]: f32): // CHECK: %[[VAL_119:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_116]]] : memref // CHECK: %[[VAL_120:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_117]]] : memref -// CHECK: %[[VAL_121:.*]] = arith.cmpi ult, %[[VAL_120]], %[[VAL_119]] : index +// CHECK: %[[VAL_121:.*]] = arith.cmpi ult(%[[VAL_120]], %[[VAL_119]]) : index // CHECK: %[[VAL_122:.*]] = arith.select %[[VAL_121]], %[[VAL_120]], %[[VAL_119]] : index -// CHECK: %[[VAL_123:.*]] = arith.cmpi eq, %[[VAL_119]], %[[VAL_122]] : index -// CHECK: %[[VAL_124:.*]] = arith.cmpi eq, %[[VAL_120]], %[[VAL_122]] : index +// CHECK: %[[VAL_123:.*]] = arith.cmpi eq(%[[VAL_119]], %[[VAL_122]]) : index +// CHECK: %[[VAL_124:.*]] = arith.cmpi eq(%[[VAL_120]], %[[VAL_122]]) : index // CHECK: %[[VAL_125:.*]] = arith.andi %[[VAL_123]], %[[VAL_124]] : i1 // CHECK: %[[VAL_126:.*]] = scf.if %[[VAL_125]] -> (f32) { // CHECK: %[[VAL_127:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_116]]] : memref @@ -1211,10 +1211,10 @@ // CHECK: } else { // CHECK: scf.yield %[[VAL_118]] : f32 // CHECK: } -// CHECK: %[[VAL_133:.*]] = arith.cmpi eq, %[[VAL_119]], %[[VAL_122]] : index +// CHECK: %[[VAL_133:.*]] = arith.cmpi eq(%[[VAL_119]], %[[VAL_122]]) : index // CHECK: %[[VAL_134:.*]] = arith.addi %[[VAL_116]], %[[VAL_7]] : index // CHECK: %[[VAL_135:.*]] = arith.select %[[VAL_133]], %[[VAL_134]], %[[VAL_116]] : index -// CHECK: %[[VAL_136:.*]] = arith.cmpi eq, %[[VAL_120]], %[[VAL_122]] : index +// CHECK: %[[VAL_136:.*]] = arith.cmpi eq(%[[VAL_120]], %[[VAL_122]]) : index // CHECK: %[[VAL_137:.*]] = arith.addi %[[VAL_117]], %[[VAL_7]] : index // CHECK: %[[VAL_138:.*]] = arith.select %[[VAL_136]], %[[VAL_137]], %[[VAL_117]] : index // CHECK: scf.yield %[[VAL_135]], %[[VAL_138]], %[[VAL_139:.*]] : index, index, f32 @@ -1240,7 +1240,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_158:.*]] = arith.cmpi eq, %[[VAL_34]], %[[VAL_33]] : index +// CHECK: %[[VAL_158:.*]] = arith.cmpi eq(%[[VAL_34]], %[[VAL_33]]) : index // CHECK: %[[VAL_159:.*]] = arith.addi %[[VAL_32]], %[[VAL_7]] : index // CHECK: %[[VAL_160:.*]] = arith.select %[[VAL_158]], %[[VAL_159]], %[[VAL_32]] : index // CHECK: %[[VAL_161:.*]] = arith.addi %[[VAL_33]], %[[VAL_7]] : index diff --git a/mlir/test/Dialect/SparseTensor/sparse_3d.mlir b/mlir/test/Dialect/SparseTensor/sparse_3d.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_3d.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_3d.mlir @@ -132,12 +132,12 @@ // CHECK: %[[VAL_21:.*]] = arith.addi %[[VAL_19]], %[[VAL_9]] : index // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_21]]] : memref // CHECK: %[[VAL_23:.*]]:2 = scf.while (%[[VAL_24:.*]] = %[[VAL_20]], %[[VAL_25:.*]] = %[[VAL_7]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_26:.*]] = arith.cmpi ult, %[[VAL_24]], %[[VAL_22]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi ult(%[[VAL_24]], %[[VAL_22]]) : index // CHECK: scf.condition(%[[VAL_26]]) %[[VAL_24]], %[[VAL_25]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_27:.*]]: index, %[[VAL_28:.*]]: index): // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_27]]] : memref -// CHECK: %[[VAL_30:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_28]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_28]]) : index // CHECK: scf.if %[[VAL_30]] { // CHECK: %[[VAL_31:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_27]]] : memref // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_16]], %[[VAL_17]], %[[VAL_28]]] : memref<32x16x8xf32> @@ -150,7 +150,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_28]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_28]]) : index // CHECK: %[[VAL_36:.*]] = arith.addi %[[VAL_27]], %[[VAL_9]] : index // CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_35]], %[[VAL_36]], %[[VAL_27]] : index // CHECK: %[[VAL_38:.*]] = arith.addi %[[VAL_28]], %[[VAL_9]] : index @@ -244,12 +244,12 @@ // CHECK: %[[VAL_17:.*]] = arith.addi %[[VAL_15]], %[[VAL_8]] : index // CHECK: %[[VAL_18:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_17]]] : memref // CHECK: %[[VAL_19:.*]]:2 = scf.while (%[[VAL_20:.*]] = %[[VAL_16]], %[[VAL_21:.*]] = %[[VAL_7]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_18]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_18]]) : index // CHECK: scf.condition(%[[VAL_22]]) %[[VAL_20]], %[[VAL_21]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_23:.*]]: index, %[[VAL_24:.*]]: index): // CHECK: %[[VAL_25:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_23]]] : memref -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_24]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_24]]) : index // CHECK: scf.if %[[VAL_26]] { // CHECK: scf.for %[[VAL_27:.*]] = %[[VAL_7]] to %[[VAL_5]] step %[[VAL_8]] { // CHECK: %[[VAL_28:.*]] = arith.muli %[[VAL_23]], %[[VAL_5]] : index @@ -268,7 +268,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_35:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_24]] : index +// CHECK: %[[VAL_35:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_24]]) : index // CHECK: %[[VAL_36:.*]] = arith.addi %[[VAL_23]], %[[VAL_8]] : index // CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_35]], %[[VAL_36]], %[[VAL_23]] : index // CHECK: %[[VAL_38:.*]] = arith.addi %[[VAL_24]], %[[VAL_8]] : index @@ -365,23 +365,23 @@ // CHECK: %[[VAL_20:.*]] = arith.addi %[[VAL_18]], %[[VAL_9]] : index // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_20]]] : memref // CHECK: %[[VAL_22:.*]]:2 = scf.while (%[[VAL_23:.*]] = %[[VAL_19]], %[[VAL_24:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_23]], %[[VAL_21]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi ult(%[[VAL_23]], %[[VAL_21]]) : index // CHECK: scf.condition(%[[VAL_25]]) %[[VAL_23]], %[[VAL_24]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_26:.*]]: index, %[[VAL_27:.*]]: index): // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_26]]] : memref -// CHECK: %[[VAL_29:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_27]] : index +// CHECK: %[[VAL_29:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_27]]) : index // CHECK: scf.if %[[VAL_29]] { // CHECK: %[[VAL_30:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_26]]] : memref // CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_26]], %[[VAL_9]] : index // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_31]]] : memref // CHECK: %[[VAL_33:.*]]:2 = scf.while (%[[VAL_34:.*]] = %[[VAL_30]], %[[VAL_35:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_36:.*]] = arith.cmpi ult, %[[VAL_34]], %[[VAL_32]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi ult(%[[VAL_34]], %[[VAL_32]]) : index // CHECK: scf.condition(%[[VAL_36]]) %[[VAL_34]], %[[VAL_35]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_37:.*]]: index, %[[VAL_38:.*]]: index): // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_37]]] : memref -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_38]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_38]]) : index // CHECK: scf.if %[[VAL_40]] { // CHECK: %[[VAL_41:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_37]]] : memref // CHECK: %[[VAL_42:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_18]], %[[VAL_27]], %[[VAL_38]]] : memref<32x16x8xf32> @@ -394,7 +394,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_45:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_38]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_38]]) : index // CHECK: %[[VAL_46:.*]] = arith.addi %[[VAL_37]], %[[VAL_9]] : index // CHECK: %[[VAL_47:.*]] = arith.select %[[VAL_45]], %[[VAL_46]], %[[VAL_37]] : index // CHECK: %[[VAL_48:.*]] = arith.addi %[[VAL_38]], %[[VAL_9]] : index @@ -413,7 +413,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_54:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_27]] : index +// CHECK: %[[VAL_54:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_27]]) : index // CHECK: %[[VAL_55:.*]] = arith.addi %[[VAL_26]], %[[VAL_9]] : index // CHECK: %[[VAL_56:.*]] = arith.select %[[VAL_54]], %[[VAL_55]], %[[VAL_26]] : index // CHECK: %[[VAL_57:.*]] = arith.addi %[[VAL_27]], %[[VAL_9]] : index @@ -509,12 +509,12 @@ // CHECK: %[[VAL_15:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_16:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_8]]] : memref // CHECK: %[[VAL_17:.*]]:2 = scf.while (%[[VAL_18:.*]] = %[[VAL_15]], %[[VAL_19:.*]] = %[[VAL_7]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_20:.*]] = arith.cmpi ult, %[[VAL_18]], %[[VAL_16]] : index +// CHECK: %[[VAL_20:.*]] = arith.cmpi ult(%[[VAL_18]], %[[VAL_16]]) : index // CHECK: scf.condition(%[[VAL_20]]) %[[VAL_18]], %[[VAL_19]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_21:.*]]: index, %[[VAL_22:.*]]: index): // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_21]]] : memref -// CHECK: %[[VAL_24:.*]] = arith.cmpi eq, %[[VAL_23]], %[[VAL_22]] : index +// CHECK: %[[VAL_24:.*]] = arith.cmpi eq(%[[VAL_23]], %[[VAL_22]]) : index // CHECK: scf.if %[[VAL_24]] { // CHECK: scf.for %[[VAL_25:.*]] = %[[VAL_7]] to %[[VAL_4]] step %[[VAL_8]] { // CHECK: %[[VAL_26:.*]] = arith.muli %[[VAL_21]], %[[VAL_4]] : index @@ -539,7 +539,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_37:.*]] = arith.cmpi eq, %[[VAL_23]], %[[VAL_22]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi eq(%[[VAL_23]], %[[VAL_22]]) : index // CHECK: %[[VAL_38:.*]] = arith.addi %[[VAL_21]], %[[VAL_8]] : index // CHECK: %[[VAL_39:.*]] = arith.select %[[VAL_37]], %[[VAL_38]], %[[VAL_21]] : index // CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_22]], %[[VAL_8]] : index @@ -636,12 +636,12 @@ // CHECK: %[[VAL_18:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_8]]] : memref // CHECK: %[[VAL_19:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_9]]] : memref // CHECK: %[[VAL_20:.*]]:2 = scf.while (%[[VAL_21:.*]] = %[[VAL_18]], %[[VAL_22:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_23:.*]] = arith.cmpi ult, %[[VAL_21]], %[[VAL_19]] : index +// CHECK: %[[VAL_23:.*]] = arith.cmpi ult(%[[VAL_21]], %[[VAL_19]]) : index // CHECK: scf.condition(%[[VAL_23]]) %[[VAL_21]], %[[VAL_22]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_24:.*]]: index, %[[VAL_25:.*]]: index): // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_24]]] : memref -// CHECK: %[[VAL_27:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_25]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_25]]) : index // CHECK: scf.if %[[VAL_27]] { // CHECK: scf.for %[[VAL_28:.*]] = %[[VAL_8]] to %[[VAL_5]] step %[[VAL_9]] { // CHECK: %[[VAL_29:.*]] = arith.muli %[[VAL_24]], %[[VAL_5]] : index @@ -650,12 +650,12 @@ // CHECK: %[[VAL_32:.*]] = arith.addi %[[VAL_30]], %[[VAL_9]] : index // CHECK: %[[VAL_33:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_32]]] : memref // CHECK: %[[VAL_34:.*]]:2 = scf.while (%[[VAL_35:.*]] = %[[VAL_31]], %[[VAL_36:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_37:.*]] = arith.cmpi ult, %[[VAL_35]], %[[VAL_33]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi ult(%[[VAL_35]], %[[VAL_33]]) : index // CHECK: scf.condition(%[[VAL_37]]) %[[VAL_35]], %[[VAL_36]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_38:.*]]: index, %[[VAL_39:.*]]: index): // CHECK: %[[VAL_40:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_38]]] : memref -// CHECK: %[[VAL_41:.*]] = arith.cmpi eq, %[[VAL_40]], %[[VAL_39]] : index +// CHECK: %[[VAL_41:.*]] = arith.cmpi eq(%[[VAL_40]], %[[VAL_39]]) : index // CHECK: scf.if %[[VAL_41]] { // CHECK: %[[VAL_42:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_38]]] : memref // CHECK: %[[VAL_43:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_25]], %[[VAL_28]], %[[VAL_39]]] : memref<32x16x8xf32> @@ -668,7 +668,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_46:.*]] = arith.cmpi eq, %[[VAL_40]], %[[VAL_39]] : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi eq(%[[VAL_40]], %[[VAL_39]]) : index // CHECK: %[[VAL_47:.*]] = arith.addi %[[VAL_38]], %[[VAL_9]] : index // CHECK: %[[VAL_48:.*]] = arith.select %[[VAL_46]], %[[VAL_47]], %[[VAL_38]] : index // CHECK: %[[VAL_49:.*]] = arith.addi %[[VAL_39]], %[[VAL_9]] : index @@ -690,7 +690,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_56:.*]] = arith.cmpi eq, %[[VAL_26]], %[[VAL_25]] : index +// CHECK: %[[VAL_56:.*]] = arith.cmpi eq(%[[VAL_26]], %[[VAL_25]]) : index // CHECK: %[[VAL_57:.*]] = arith.addi %[[VAL_24]], %[[VAL_9]] : index // CHECK: %[[VAL_58:.*]] = arith.select %[[VAL_56]], %[[VAL_57]], %[[VAL_24]] : index // CHECK: %[[VAL_59:.*]] = arith.addi %[[VAL_25]], %[[VAL_9]] : index @@ -790,23 +790,23 @@ // CHECK: %[[VAL_17:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_7]]] : memref // CHECK: %[[VAL_18:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_8]]] : memref // CHECK: %[[VAL_19:.*]]:2 = scf.while (%[[VAL_20:.*]] = %[[VAL_17]], %[[VAL_21:.*]] = %[[VAL_7]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_18]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_18]]) : index // CHECK: scf.condition(%[[VAL_22]]) %[[VAL_20]], %[[VAL_21]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_23:.*]]: index, %[[VAL_24:.*]]: index): // CHECK: %[[VAL_25:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_23]]] : memref -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_24]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_24]]) : index // CHECK: scf.if %[[VAL_26]] { // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_23]]] : memref // CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_23]], %[[VAL_8]] : index // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_28]]] : memref // CHECK: %[[VAL_30:.*]]:2 = scf.while (%[[VAL_31:.*]] = %[[VAL_27]], %[[VAL_32:.*]] = %[[VAL_7]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_33:.*]] = arith.cmpi ult, %[[VAL_31]], %[[VAL_29]] : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi ult(%[[VAL_31]], %[[VAL_29]]) : index // CHECK: scf.condition(%[[VAL_33]]) %[[VAL_31]], %[[VAL_32]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_34:.*]]: index, %[[VAL_35:.*]]: index): // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_34]]] : memref -// CHECK: %[[VAL_37:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_35]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_35]]) : index // CHECK: scf.if %[[VAL_37]] { // CHECK: scf.for %[[VAL_38:.*]] = %[[VAL_7]] to %[[VAL_5]] step %[[VAL_8]] { // CHECK: %[[VAL_39:.*]] = arith.muli %[[VAL_34]], %[[VAL_5]] : index @@ -825,7 +825,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_46:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_35]] : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_35]]) : index // CHECK: %[[VAL_47:.*]] = arith.addi %[[VAL_34]], %[[VAL_8]] : index // CHECK: %[[VAL_48:.*]] = arith.select %[[VAL_46]], %[[VAL_47]], %[[VAL_34]] : index // CHECK: %[[VAL_49:.*]] = arith.addi %[[VAL_35]], %[[VAL_8]] : index @@ -848,7 +848,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_57:.*]] = arith.cmpi eq, %[[VAL_25]], %[[VAL_24]] : index +// CHECK: %[[VAL_57:.*]] = arith.cmpi eq(%[[VAL_25]], %[[VAL_24]]) : index // CHECK: %[[VAL_58:.*]] = arith.addi %[[VAL_23]], %[[VAL_8]] : index // CHECK: %[[VAL_59:.*]] = arith.select %[[VAL_57]], %[[VAL_58]], %[[VAL_23]] : index // CHECK: %[[VAL_60:.*]] = arith.addi %[[VAL_24]], %[[VAL_8]] : index @@ -950,34 +950,34 @@ // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_8]]] : memref // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_9]]] : memref // CHECK: %[[VAL_22:.*]]:2 = scf.while (%[[VAL_23:.*]] = %[[VAL_20]], %[[VAL_24:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_25:.*]] = arith.cmpi ult, %[[VAL_23]], %[[VAL_21]] : index +// CHECK: %[[VAL_25:.*]] = arith.cmpi ult(%[[VAL_23]], %[[VAL_21]]) : index // CHECK: scf.condition(%[[VAL_25]]) %[[VAL_23]], %[[VAL_24]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_26:.*]]: index, %[[VAL_27:.*]]: index): // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_26]]] : memref -// CHECK: %[[VAL_29:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_27]] : index +// CHECK: %[[VAL_29:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_27]]) : index // CHECK: scf.if %[[VAL_29]] { // CHECK: %[[VAL_30:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_26]]] : memref // CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_26]], %[[VAL_9]] : index // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_31]]] : memref // CHECK: %[[VAL_33:.*]]:2 = scf.while (%[[VAL_34:.*]] = %[[VAL_30]], %[[VAL_35:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_36:.*]] = arith.cmpi ult, %[[VAL_34]], %[[VAL_32]] : index +// CHECK: %[[VAL_36:.*]] = arith.cmpi ult(%[[VAL_34]], %[[VAL_32]]) : index // CHECK: scf.condition(%[[VAL_36]]) %[[VAL_34]], %[[VAL_35]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_37:.*]]: index, %[[VAL_38:.*]]: index): // CHECK: %[[VAL_39:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_37]]] : memref -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_38]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_38]]) : index // CHECK: scf.if %[[VAL_40]] { // CHECK: %[[VAL_41:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_37]]] : memref // CHECK: %[[VAL_42:.*]] = arith.addi %[[VAL_37]], %[[VAL_9]] : index // CHECK: %[[VAL_43:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_42]]] : memref // CHECK: %[[VAL_44:.*]]:2 = scf.while (%[[VAL_45:.*]] = %[[VAL_41]], %[[VAL_46:.*]] = %[[VAL_8]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_47:.*]] = arith.cmpi ult, %[[VAL_45]], %[[VAL_43]] : index +// CHECK: %[[VAL_47:.*]] = arith.cmpi ult(%[[VAL_45]], %[[VAL_43]]) : index // CHECK: scf.condition(%[[VAL_47]]) %[[VAL_45]], %[[VAL_46]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_48:.*]]: index, %[[VAL_49:.*]]: index): // CHECK: %[[VAL_50:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_48]]] : memref -// CHECK: %[[VAL_51:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_49]] : index +// CHECK: %[[VAL_51:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_49]]) : index // CHECK: scf.if %[[VAL_51]] { // CHECK: %[[VAL_52:.*]] = memref.load %[[VAL_16]]{{\[}}%[[VAL_48]]] : memref // CHECK: %[[VAL_53:.*]] = memref.load %[[VAL_17]]{{\[}}%[[VAL_27]], %[[VAL_38]], %[[VAL_49]]] : memref<32x16x8xf32> @@ -990,7 +990,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_56:.*]] = arith.cmpi eq, %[[VAL_50]], %[[VAL_49]] : index +// CHECK: %[[VAL_56:.*]] = arith.cmpi eq(%[[VAL_50]], %[[VAL_49]]) : index // CHECK: %[[VAL_57:.*]] = arith.addi %[[VAL_48]], %[[VAL_9]] : index // CHECK: %[[VAL_58:.*]] = arith.select %[[VAL_56]], %[[VAL_57]], %[[VAL_48]] : index // CHECK: %[[VAL_59:.*]] = arith.addi %[[VAL_49]], %[[VAL_9]] : index @@ -1009,7 +1009,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_65:.*]] = arith.cmpi eq, %[[VAL_39]], %[[VAL_38]] : index +// CHECK: %[[VAL_65:.*]] = arith.cmpi eq(%[[VAL_39]], %[[VAL_38]]) : index // CHECK: %[[VAL_66:.*]] = arith.addi %[[VAL_37]], %[[VAL_9]] : index // CHECK: %[[VAL_67:.*]] = arith.select %[[VAL_65]], %[[VAL_66]], %[[VAL_37]] : index // CHECK: %[[VAL_68:.*]] = arith.addi %[[VAL_38]], %[[VAL_9]] : index @@ -1032,7 +1032,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_76:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_27]] : index +// CHECK: %[[VAL_76:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_27]]) : index // CHECK: %[[VAL_77:.*]] = arith.addi %[[VAL_26]], %[[VAL_9]] : index // CHECK: %[[VAL_78:.*]] = arith.select %[[VAL_76]], %[[VAL_77]], %[[VAL_26]] : index // CHECK: %[[VAL_79:.*]] = arith.addi %[[VAL_27]], %[[VAL_9]] : index diff --git a/mlir/test/Dialect/SparseTensor/sparse_concat.mlir b/mlir/test/Dialect/SparseTensor/sparse_concat.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_concat.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_concat.mlir @@ -25,7 +25,7 @@ // CHECK: scf.for %[[TMP_arg2:.*]] = %[[TMP_c0]] to %[[TMP_c2]] step %[[TMP_c1]] { // CHECK: scf.for %[[TMP_arg3:.*]] = %[[TMP_c0]] to %[[TMP_c4]] step %[[TMP_c1]] { // CHECK: %[[TMP_12:.*]] = tensor.extract %[[TMP_arg0]][%[[TMP_arg2]], %[[TMP_arg3]]] : tensor<2x4xf64> -// CHECK: %[[TMP_13:.*]] = arith.cmpf une, %[[TMP_12]], %[[TMP_cst]] : f64 +// CHECK: %[[TMP_13:.*]] = arith.cmpf une(%[[TMP_12]], %[[TMP_cst]]) : f64 // CHECK: scf.if %[[TMP_13]] { // CHECK: memref.store %[[TMP_12]], %[[TMP_0]][%[[TMP_arg2]], %[[TMP_arg3]]] : memref<5x4xf64> // CHECK: } @@ -106,7 +106,7 @@ // CHECK: memref.store %[[TMP_arg2]], %[[TMP_9]][%[[TMP_c0]]] : memref<2xindex> // CHECK: memref.store %[[TMP_arg3]], %[[TMP_9]][%[[TMP_c1]]] : memref<2xindex> // CHECK: %[[TMP_22:.*]] = tensor.extract %[[TMP_arg0]][%[[TMP_arg2]], %[[TMP_arg3]]] : tensor<2x4xf64> -// CHECK: %[[TMP_23:.*]] = arith.cmpf une, %[[TMP_22]], %[[TMP_cst]] : f64 +// CHECK: %[[TMP_23:.*]] = arith.cmpf une(%[[TMP_22]], %[[TMP_cst]]) : f64 // CHECK: scf.if %[[TMP_23]] { // CHECK: memref.store %[[TMP_22]], %[[TMP_8]][] : memref // CHECK: %[[TMP_24:.*]] = func.call @addEltF64(%[[TMP_7]], %[[TMP_8]], %[[TMP_10]], %[[TMP_5]]) : (!llvm.ptr, memref, memref, memref) -> !llvm.ptr @@ -190,7 +190,7 @@ // CHECK: memref.store %[[TMP_arg2]], %[[TMP_9]][%[[TMP_c0]]] : memref<2xindex> // CHECK: memref.store %[[TMP_arg3]], %[[TMP_9]][%[[TMP_c1]]] : memref<2xindex> // CHECK: %[[TMP_22:.*]] = tensor.extract %[[TMP_arg0]][%[[TMP_arg2]], %[[TMP_arg3]]] : tensor<4x2xf64> -// CHECK: %[[TMP_23:.*]] = arith.cmpf une, %[[TMP_22]], %[[TMP_cst]] : f64 +// CHECK: %[[TMP_23:.*]] = arith.cmpf une(%[[TMP_22]], %[[TMP_cst]]) : f64 // CHECK: scf.if %[[TMP_23]] { // CHECK: memref.store %[[TMP_22]], %[[TMP_8]][] : memref // CHECK: %[[TMP_24:.*]] = func.call @addEltF64(%[[TMP_7]], %[[TMP_8]], %[[TMP_10]], %[[TMP_5]]) : (!llvm.ptr, memref, memref, memref) -> !llvm.ptr @@ -254,7 +254,7 @@ // CHECK: scf.for %[[TMP_arg2:.*]] = %[[TMP_c0]] to %[[TMP_c4]] step %[[TMP_c1]] { // CHECK: scf.for %[[TMP_arg3:.*]] = %[[TMP_c0]] to %[[TMP_c2]] step %[[TMP_c1]] { // CHECK: %[[TMP_12:.*]] = tensor.extract %[[TMP_arg0]][%[[TMP_arg2]], %[[TMP_arg3]]] : tensor<4x2xf64> -// CHECK: %[[TMP_13:.*]] = arith.cmpf une, %[[TMP_12]], %[[TMP_cst]] : f64 +// CHECK: %[[TMP_13:.*]] = arith.cmpf une(%[[TMP_12]], %[[TMP_cst]]) : f64 // CHECK: scf.if %[[TMP_13]] { // CHECK: memref.store %[[TMP_12]], %[[TMP_0]][%[[TMP_arg2]], %[[TMP_arg3]]] : memref<4x5xf64> // CHECK: } @@ -299,7 +299,7 @@ // CHECK-LABEL: func.func @concat_mix_dense_perm_dim1_dyn( // CHECK-SAME: %[[TMP_arg0:.*]]: tensor<3x2xf64>, -// CHECK-SAME: %[[TMP_arg1:.*]]: !llvm.ptr) +// CHECK-SAME: %[[TMP_arg1:.*]]: !llvm.ptr) // CHECK-DAG: %[[TMP_c2:.*]] = arith.constant 2 : index // CHECK-DAG: %[[TMP_c6_i32:.*]] = arith.constant 6 : i32 // CHECK-DAG: %[[TMP_c1_i32:.*]] = arith.constant 1 : i32 @@ -315,7 +315,7 @@ // CHECK: scf.for %[[TMP_arg2:.*]] = %[[TMP_c0]] to %[[TMP_c3]] step %[[TMP_c1]] { // CHECK: scf.for %[[TMP_arg3:.*]] = %[[TMP_c0]] to %[[TMP_c2]] step %[[TMP_c1]] { // CHECK: %[[TMP_13:.*]] = tensor.extract %[[TMP_arg0]][%[[TMP_arg2]], %[[TMP_arg3]]] : tensor<3x2xf64> -// CHECK: %[[TMP_14:.*]] = arith.cmpf une, %[[TMP_13]], %[[TMP_cst]] : f64 +// CHECK: %[[TMP_14:.*]] = arith.cmpf une(%[[TMP_13]], %[[TMP_cst]]) : f64 // CHECK: scf.if %[[TMP_14]] { // CHECK: memref.store %[[TMP_13]], %[[TMP_0]][%[[TMP_arg2]], %[[TMP_arg3]]] : memref<3x5xf64> // CHECK: } diff --git a/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir b/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_fill_zero.mlir @@ -56,18 +56,18 @@ // CHECK: %[[TMP_30:.*]] = memref.load %[[TMP_17]][%[[TMP_c0]]] : memref // CHECK: %[[TMP_31:.*]] = memref.load %[[TMP_17]][%[[TMP_c1]]] : memref // CHECK: %[[TMP_32:.*]]:3 = scf.while (%[[TMP_arg3:.*]] = %[[TMP_27]], %[[TMP_arg4:.*]] = %[[TMP_30]], %[[TMP_arg5:.*]] = %[[TMP_c0]]) : (index, index, index) -> (index, index, index) { -// CHECK: %[[TMP_33:.*]] = arith.cmpi ult, %[[TMP_arg3]], %[[TMP_29]] : index -// CHECK: %[[TMP_34:.*]] = arith.cmpi ult, %[[TMP_arg4]], %[[TMP_31]] : index +// CHECK: %[[TMP_33:.*]] = arith.cmpi ult(%[[TMP_arg3]], %[[TMP_29]]) : index +// CHECK: %[[TMP_34:.*]] = arith.cmpi ult(%[[TMP_arg4]], %[[TMP_31]]) : index // CHECK: %[[TMP_35:.*]] = arith.andi %[[TMP_33]], %[[TMP_34]] : i1 // CHECK: scf.condition(%[[TMP_35]]) %[[TMP_arg3]], %[[TMP_arg4]], %[[TMP_arg5]] : index, index, index // CHECK: } do { // CHECK: ^bb0(%[[TMP_arg3:.*]]: index, %[[TMP_arg4:.*]]: index, %[[TMP_arg5:.*]]: index): // CHECK: %[[TMP_33:.*]] = memref.load %[[TMP_15]][%[[TMP_arg3]]] : memref // CHECK: %[[TMP_34:.*]] = memref.load %[[TMP_18]][%[[TMP_arg4]]] : memref -// CHECK: %[[TMP_35:.*]] = arith.cmpi ult, %[[TMP_34]], %[[TMP_33]] : index +// CHECK: %[[TMP_35:.*]] = arith.cmpi ult(%[[TMP_34]], %[[TMP_33]]) : index // CHECK: %[[TMP_36:.*]] = arith.select %[[TMP_35]], %[[TMP_34]], %[[TMP_33]] : index -// CHECK: %[[TMP_37:.*]] = arith.cmpi eq, %[[TMP_33]], %[[TMP_36]] : index -// CHECK: %[[TMP_38:.*]] = arith.cmpi eq, %[[TMP_34]], %[[TMP_36]] : index +// CHECK: %[[TMP_37:.*]] = arith.cmpi eq(%[[TMP_33]], %[[TMP_36]]) : index +// CHECK: %[[TMP_38:.*]] = arith.cmpi eq(%[[TMP_34]], %[[TMP_36]]) : index // CHECK: %[[TMP_39:.*]] = arith.andi %[[TMP_37]], %[[TMP_38]] : i1 // CHECK: %[[TMP_40:.*]] = scf.if %[[TMP_39]] -> (index) { // CHECK: %[[TMP_45:.*]] = memref.load %[[TMP_16]][%[[TMP_arg3]]] : memref @@ -81,7 +81,7 @@ // CHECK: %[[TMP_53:.*]] = arith.mulf %[[TMP_45]], %[[TMP_52]] : f64 // CHECK: %[[TMP_54:.*]] = arith.addf %[[TMP_51]], %[[TMP_53]] : f64 // CHECK: %[[TMP_55:.*]] = memref.load %[[TMP_10]][%[[TMP_50]]] : memref -// CHECK: %[[TMP_56:.*]] = arith.cmpi eq, %[[TMP_55]], %[[TMP_false]] : i1 +// CHECK: %[[TMP_56:.*]] = arith.cmpi eq(%[[TMP_55]], %[[TMP_false]]) : i1 // CHECK: %[[TMP_57:.*]] = scf.if %[[TMP_56]] -> (index) { // CHECK: memref.store %[[TMP_true]], %[[TMP_10]][%[[TMP_50]]] : memref // CHECK: memref.store %[[TMP_50]], %[[TMP_11]][%[[TMP_arg7]]] : memref diff --git a/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir b/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir @@ -174,12 +174,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref<32xf64> @@ -192,7 +192,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_26]], %[[VAL_27]], %[[VAL_18]] : index // CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index @@ -234,12 +234,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref<32xf64> @@ -253,7 +253,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_27:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_27:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_28:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_29:.*]] = arith.select %[[VAL_27]], %[[VAL_28]], %[[VAL_18]] : index // CHECK: %[[VAL_30:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index diff --git a/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir b/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir @@ -38,12 +38,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref<32xi64> @@ -56,7 +56,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_26]], %[[VAL_27]], %[[VAL_18]] : index // CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index @@ -99,12 +99,12 @@ // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_14:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_15:.*]]:2 = scf.while (%[[VAL_16:.*]] = %[[VAL_13]], %[[VAL_17:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_18:.*]] = arith.cmpi ult, %[[VAL_16]], %[[VAL_14]] : index +// CHECK: %[[VAL_18:.*]] = arith.cmpi ult(%[[VAL_16]], %[[VAL_14]]) : index // CHECK: scf.condition(%[[VAL_18]]) %[[VAL_16]], %[[VAL_17]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_19:.*]]: index, %[[VAL_20:.*]]: index): // CHECK: %[[VAL_21:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_19]]] : memref -// CHECK: %[[VAL_22:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: scf.if %[[VAL_22]] { // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref // CHECK: %[[VAL_24:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_20]]] : memref<32xi64> @@ -118,7 +118,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_28:.*]] = arith.cmpi eq, %[[VAL_21]], %[[VAL_20]] : index +// CHECK: %[[VAL_28:.*]] = arith.cmpi eq(%[[VAL_21]], %[[VAL_20]]) : index // CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index // CHECK: %[[VAL_30:.*]] = arith.select %[[VAL_28]], %[[VAL_29]], %[[VAL_19]] : index // CHECK: %[[VAL_31:.*]] = arith.addi %[[VAL_20]], %[[VAL_6]] : index @@ -301,12 +301,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref<32xi64> @@ -319,7 +319,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_26]], %[[VAL_27]], %[[VAL_18]] : index // CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index @@ -361,12 +361,12 @@ // CHECK: %[[VAL_12:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_13:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_6]]] : memref // CHECK: %[[VAL_14:.*]]:2 = scf.while (%[[VAL_15:.*]] = %[[VAL_12]], %[[VAL_16:.*]] = %[[VAL_4]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_17:.*]] = arith.cmpi ult, %[[VAL_15]], %[[VAL_13]] : index +// CHECK: %[[VAL_17:.*]] = arith.cmpi ult(%[[VAL_15]], %[[VAL_13]]) : index // CHECK: scf.condition(%[[VAL_17]]) %[[VAL_15]], %[[VAL_16]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_18:.*]]: index, %[[VAL_19:.*]]: index): // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_18]]] : memref -// CHECK: %[[VAL_21:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_21:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: scf.if %[[VAL_21]] { // CHECK: %[[VAL_22:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_18]]] : memref // CHECK: %[[VAL_23:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_19]]] : memref<32xi64> @@ -379,7 +379,7 @@ // CHECK: } else { // CHECK: } // CHECK: } -// CHECK: %[[VAL_26:.*]] = arith.cmpi eq, %[[VAL_20]], %[[VAL_19]] : index +// CHECK: %[[VAL_26:.*]] = arith.cmpi eq(%[[VAL_20]], %[[VAL_19]]) : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_18]], %[[VAL_6]] : index // CHECK: %[[VAL_28:.*]] = arith.select %[[VAL_26]], %[[VAL_27]], %[[VAL_18]] : index // CHECK: %[[VAL_29:.*]] = arith.addi %[[VAL_19]], %[[VAL_6]] : index @@ -506,4 +506,3 @@ } -> tensor<32xi64> return %0 : tensor<32xi64> } - diff --git a/mlir/test/Dialect/SparseTensor/sparse_kernels.mlir b/mlir/test/Dialect/SparseTensor/sparse_kernels.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_kernels.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_kernels.mlir @@ -87,18 +87,18 @@ // CHECK: %[[VAL_31:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_33:.*]]:3 = scf.while (%[[VAL_34:.*]] = %[[VAL_28]], %[[VAL_35:.*]] = %[[VAL_31]], %[[VAL_36:.*]] = %[[VAL_27]]) : (index, index, index) -> (index, index, index) { -// CHECK: %[[VAL_37:.*]] = arith.cmpi ult, %[[VAL_34]], %[[VAL_30]] : index -// CHECK: %[[VAL_38:.*]] = arith.cmpi ult, %[[VAL_35]], %[[VAL_32]] : index +// CHECK: %[[VAL_37:.*]] = arith.cmpi ult(%[[VAL_34]], %[[VAL_30]]) : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi ult(%[[VAL_35]], %[[VAL_32]]) : index // CHECK: %[[VAL_39:.*]] = arith.andi %[[VAL_37]], %[[VAL_38]] : i1 // CHECK: scf.condition(%[[VAL_39]]) %[[VAL_34]], %[[VAL_35]], %[[VAL_36]] : index, index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_40:.*]]: index, %[[VAL_41:.*]]: index, %[[VAL_42:.*]]: index): // CHECK: %[[VAL_43:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_40]]] : memref // CHECK: %[[VAL_44:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_41]]] : memref -// CHECK: %[[VAL_45:.*]] = arith.cmpi ult, %[[VAL_44]], %[[VAL_43]] : index +// CHECK: %[[VAL_45:.*]] = arith.cmpi ult(%[[VAL_44]], %[[VAL_43]]) : index // CHECK: %[[VAL_46:.*]] = arith.select %[[VAL_45]], %[[VAL_44]], %[[VAL_43]] : index -// CHECK: %[[VAL_47:.*]] = arith.cmpi eq, %[[VAL_43]], %[[VAL_46]] : index -// CHECK: %[[VAL_48:.*]] = arith.cmpi eq, %[[VAL_44]], %[[VAL_46]] : index +// CHECK: %[[VAL_47:.*]] = arith.cmpi eq(%[[VAL_43]], %[[VAL_46]]) : index +// CHECK: %[[VAL_48:.*]] = arith.cmpi eq(%[[VAL_44]], %[[VAL_46]]) : index // CHECK: %[[VAL_49:.*]] = arith.andi %[[VAL_47]], %[[VAL_48]] : i1 // CHECK: %[[VAL_50:.*]] = scf.if %[[VAL_49]] -> (index) { // CHECK: %[[VAL_51:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_40]]] : memref @@ -112,7 +112,7 @@ // CHECK: %[[VAL_61:.*]] = arith.mulf %[[VAL_51]], %[[VAL_60]] : f64 // CHECK: %[[VAL_62:.*]] = arith.addf %[[VAL_59]], %[[VAL_61]] : f64 // CHECK: %[[VAL_63:.*]] = memref.load %[[VAL_25]]{{\[}}%[[VAL_58]]] : memref -// CHECK: %[[VAL_64:.*]] = arith.cmpi eq, %[[VAL_63]], %[[VAL_6]] : i1 +// CHECK: %[[VAL_64:.*]] = arith.cmpi eq(%[[VAL_63]], %[[VAL_6]]) : i1 // CHECK: %[[VAL_65:.*]] = scf.if %[[VAL_64]] -> (index) { // CHECK: memref.store %[[VAL_7]], %[[VAL_25]]{{\[}}%[[VAL_58]]] : memref // CHECK: memref.store %[[VAL_58]], %[[VAL_26]]{{\[}}%[[VAL_57]]] : memref @@ -128,10 +128,10 @@ // CHECK: } else { // CHECK: scf.yield %[[VAL_42]] : index // CHECK: } -// CHECK: %[[VAL_69:.*]] = arith.cmpi eq, %[[VAL_43]], %[[VAL_46]] : index +// CHECK: %[[VAL_69:.*]] = arith.cmpi eq(%[[VAL_43]], %[[VAL_46]]) : index // CHECK: %[[VAL_70:.*]] = arith.addi %[[VAL_40]], %[[VAL_4]] : index // CHECK: %[[VAL_71:.*]] = arith.select %[[VAL_69]], %[[VAL_70]], %[[VAL_40]] : index -// CHECK: %[[VAL_72:.*]] = arith.cmpi eq, %[[VAL_44]], %[[VAL_46]] : index +// CHECK: %[[VAL_72:.*]] = arith.cmpi eq(%[[VAL_44]], %[[VAL_46]]) : index // CHECK: %[[VAL_73:.*]] = arith.addi %[[VAL_41]], %[[VAL_4]] : index // CHECK: %[[VAL_74:.*]] = arith.select %[[VAL_72]], %[[VAL_73]], %[[VAL_41]] : index // CHECK: scf.yield %[[VAL_71]], %[[VAL_74]], %[[VAL_75:.*]] : index, index, index @@ -267,18 +267,18 @@ // CHECK-DAG: %[[VAL_16:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_3]]] : memref // CHECK-DAG: %[[VAL_17:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_4]]] : memref // CHECK: %[[VAL_18:.*]]:3 = scf.while (%[[VAL_19:.*]] = %[[VAL_14]], %[[VAL_20:.*]] = %[[VAL_16]], %[[VAL_21:.*]] = %[[VAL_13]]) : (index, index, f32) -> (index, index, f32) { -// CHECK: %[[VAL_22:.*]] = arith.cmpi ult, %[[VAL_19]], %[[VAL_15]] : index -// CHECK: %[[VAL_23:.*]] = arith.cmpi ult, %[[VAL_20]], %[[VAL_17]] : index +// CHECK: %[[VAL_22:.*]] = arith.cmpi ult(%[[VAL_19]], %[[VAL_15]]) : index +// CHECK: %[[VAL_23:.*]] = arith.cmpi ult(%[[VAL_20]], %[[VAL_17]]) : index // CHECK: %[[VAL_24:.*]] = arith.andi %[[VAL_22]], %[[VAL_23]] : i1 // CHECK: scf.condition(%[[VAL_24]]) %[[VAL_19]], %[[VAL_20]], %[[VAL_21]] : index, index, f32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_25:.*]]: index, %[[VAL_26:.*]]: index, %[[VAL_27:.*]]: f32): // CHECK: %[[VAL_28:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_25]]] : memref // CHECK: %[[VAL_29:.*]] = memref.load %[[VAL_9]]{{\[}}%[[VAL_26]]] : memref -// CHECK: %[[VAL_30:.*]] = arith.cmpi ult, %[[VAL_29]], %[[VAL_28]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi ult(%[[VAL_29]], %[[VAL_28]]) : index // CHECK: %[[VAL_31:.*]] = arith.select %[[VAL_30]], %[[VAL_29]], %[[VAL_28]] : index -// CHECK: %[[VAL_32:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_31]] : index -// CHECK: %[[VAL_33:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_31]] : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_31]]) : index +// CHECK: %[[VAL_33:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_31]]) : index // CHECK: %[[VAL_34:.*]] = arith.andi %[[VAL_32]], %[[VAL_33]] : i1 // CHECK: %[[VAL_35:.*]] = scf.if %[[VAL_34]] -> (f32) { // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_25]]] : memref @@ -289,10 +289,10 @@ // CHECK: } else { // CHECK: scf.yield %[[VAL_27]] : f32 // CHECK: } -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_28]], %[[VAL_31]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_28]], %[[VAL_31]]) : index // CHECK: %[[VAL_41:.*]] = arith.addi %[[VAL_25]], %[[VAL_4]] : index // CHECK: %[[VAL_42:.*]] = arith.select %[[VAL_40]], %[[VAL_41]], %[[VAL_25]] : index -// CHECK: %[[VAL_43:.*]] = arith.cmpi eq, %[[VAL_29]], %[[VAL_31]] : index +// CHECK: %[[VAL_43:.*]] = arith.cmpi eq(%[[VAL_29]], %[[VAL_31]]) : index // CHECK: %[[VAL_44:.*]] = arith.addi %[[VAL_26]], %[[VAL_4]] : index // CHECK: %[[VAL_45:.*]] = arith.select %[[VAL_43]], %[[VAL_44]], %[[VAL_26]] : index // CHECK: scf.yield %[[VAL_42]], %[[VAL_45]], %[[VAL_46:.*]] : index, index, f32 diff --git a/mlir/test/Dialect/SparseTensor/sparse_out.mlir b/mlir/test/Dialect/SparseTensor/sparse_out.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_out.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_out.mlir @@ -183,19 +183,19 @@ // CHECK: %[[VAL_26:.*]] = memref.load %[[VAL_16]]{{\[}}%[[VAL_2]]] : memref // CHECK: %[[VAL_27:.*]] = memref.load %[[VAL_16]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_28:.*]]:2 = scf.while (%[[VAL_29:.*]] = %[[VAL_24]], %[[VAL_30:.*]] = %[[VAL_26]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_31:.*]] = arith.cmpi ult, %[[VAL_29]], %[[VAL_25]] : index -// CHECK: %[[VAL_32:.*]] = arith.cmpi ult, %[[VAL_30]], %[[VAL_27]] : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi ult(%[[VAL_29]], %[[VAL_25]]) : index +// CHECK: %[[VAL_32:.*]] = arith.cmpi ult(%[[VAL_30]], %[[VAL_27]]) : index // CHECK: %[[VAL_33:.*]] = arith.andi %[[VAL_31]], %[[VAL_32]] : i1 // CHECK: scf.condition(%[[VAL_33]]) %[[VAL_29]], %[[VAL_30]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_34:.*]]: index, %[[VAL_35:.*]]: index): // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_34]]] : memref // CHECK: %[[VAL_37:.*]] = memref.load %[[VAL_17]]{{\[}}%[[VAL_35]]] : memref -// CHECK: %[[VAL_38:.*]] = arith.cmpi ult, %[[VAL_37]], %[[VAL_36]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi ult(%[[VAL_37]], %[[VAL_36]]) : index // CHECK: %[[VAL_39:.*]] = arith.select %[[VAL_38]], %[[VAL_37]], %[[VAL_36]] : index // CHECK: memref.store %[[VAL_39]], %[[VAL_23]]{{\[}}%[[VAL_2]]] : memref -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_39]] : index -// CHECK: %[[VAL_41:.*]] = arith.cmpi eq, %[[VAL_37]], %[[VAL_39]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_39]]) : index +// CHECK: %[[VAL_41:.*]] = arith.cmpi eq(%[[VAL_37]], %[[VAL_39]]) : index // CHECK: %[[VAL_42:.*]] = arith.andi %[[VAL_40]], %[[VAL_41]] : i1 // CHECK: scf.if %[[VAL_42]] { // CHECK: %[[VAL_43:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_34]]] : memref @@ -205,19 +205,19 @@ // CHECK: %[[VAL_47:.*]] = arith.addi %[[VAL_35]], %[[VAL_3]] : index // CHECK: %[[VAL_48:.*]] = memref.load %[[VAL_18]]{{\[}}%[[VAL_47]]] : memref // CHECK: %[[VAL_49:.*]]:2 = scf.while (%[[VAL_50:.*]] = %[[VAL_43]], %[[VAL_51:.*]] = %[[VAL_46]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_52:.*]] = arith.cmpi ult, %[[VAL_50]], %[[VAL_45]] : index -// CHECK: %[[VAL_53:.*]] = arith.cmpi ult, %[[VAL_51]], %[[VAL_48]] : index +// CHECK: %[[VAL_52:.*]] = arith.cmpi ult(%[[VAL_50]], %[[VAL_45]]) : index +// CHECK: %[[VAL_53:.*]] = arith.cmpi ult(%[[VAL_51]], %[[VAL_48]]) : index // CHECK: %[[VAL_54:.*]] = arith.andi %[[VAL_52]], %[[VAL_53]] : i1 // CHECK: scf.condition(%[[VAL_54]]) %[[VAL_50]], %[[VAL_51]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_55:.*]]: index, %[[VAL_56:.*]]: index): // CHECK: %[[VAL_57:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_55]]] : memref // CHECK: %[[VAL_58:.*]] = memref.load %[[VAL_19]]{{\[}}%[[VAL_56]]] : memref -// CHECK: %[[VAL_59:.*]] = arith.cmpi ult, %[[VAL_58]], %[[VAL_57]] : index +// CHECK: %[[VAL_59:.*]] = arith.cmpi ult(%[[VAL_58]], %[[VAL_57]]) : index // CHECK: %[[VAL_60:.*]] = arith.select %[[VAL_59]], %[[VAL_58]], %[[VAL_57]] : index // CHECK: memref.store %[[VAL_60]], %[[VAL_23]]{{\[}}%[[VAL_3]]] : memref -// CHECK: %[[VAL_61:.*]] = arith.cmpi eq, %[[VAL_57]], %[[VAL_60]] : index -// CHECK: %[[VAL_62:.*]] = arith.cmpi eq, %[[VAL_58]], %[[VAL_60]] : index +// CHECK: %[[VAL_61:.*]] = arith.cmpi eq(%[[VAL_57]], %[[VAL_60]]) : index +// CHECK: %[[VAL_62:.*]] = arith.cmpi eq(%[[VAL_58]], %[[VAL_60]]) : index // CHECK: %[[VAL_63:.*]] = arith.andi %[[VAL_61]], %[[VAL_62]] : i1 // CHECK: scf.if %[[VAL_63]] { // CHECK: %[[VAL_64:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_55]]] : memref @@ -227,19 +227,19 @@ // CHECK: %[[VAL_68:.*]] = arith.addi %[[VAL_56]], %[[VAL_3]] : index // CHECK: %[[VAL_69:.*]] = memref.load %[[VAL_20]]{{\[}}%[[VAL_68]]] : memref // CHECK: %[[VAL_70:.*]]:3 = scf.while (%[[VAL_71:.*]] = %[[VAL_64]], %[[VAL_72:.*]] = %[[VAL_67]], %[[VAL_73:.*]] = %[[VAL_5]]) : (index, index, i32) -> (index, index, i32) { -// CHECK: %[[VAL_74:.*]] = arith.cmpi ult, %[[VAL_71]], %[[VAL_66]] : index -// CHECK: %[[VAL_75:.*]] = arith.cmpi ult, %[[VAL_72]], %[[VAL_69]] : index +// CHECK: %[[VAL_74:.*]] = arith.cmpi ult(%[[VAL_71]], %[[VAL_66]]) : index +// CHECK: %[[VAL_75:.*]] = arith.cmpi ult(%[[VAL_72]], %[[VAL_69]]) : index // CHECK: %[[VAL_76:.*]] = arith.andi %[[VAL_74]], %[[VAL_75]] : i1 // CHECK: scf.condition(%[[VAL_76]]) %[[VAL_71]], %[[VAL_72]], %[[VAL_73]] : index, index, i32 // CHECK: } do { // CHECK: ^bb0(%[[VAL_77:.*]]: index, %[[VAL_78:.*]]: index, %[[VAL_79:.*]]: i32): // CHECK: %[[VAL_80:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_77]]] : memref // CHECK: %[[VAL_81:.*]] = memref.load %[[VAL_21]]{{\[}}%[[VAL_78]]] : memref -// CHECK: %[[VAL_82:.*]] = arith.cmpi ult, %[[VAL_81]], %[[VAL_80]] : index +// CHECK: %[[VAL_82:.*]] = arith.cmpi ult(%[[VAL_81]], %[[VAL_80]]) : index // CHECK: %[[VAL_83:.*]] = arith.select %[[VAL_82]], %[[VAL_81]], %[[VAL_80]] : index // CHECK: memref.store %[[VAL_83]], %[[VAL_23]]{{\[}}%[[VAL_4]]] : memref -// CHECK: %[[VAL_84:.*]] = arith.cmpi eq, %[[VAL_80]], %[[VAL_83]] : index -// CHECK: %[[VAL_85:.*]] = arith.cmpi eq, %[[VAL_81]], %[[VAL_83]] : index +// CHECK: %[[VAL_84:.*]] = arith.cmpi eq(%[[VAL_80]], %[[VAL_83]]) : index +// CHECK: %[[VAL_85:.*]] = arith.cmpi eq(%[[VAL_81]], %[[VAL_83]]) : index // CHECK: %[[VAL_86:.*]] = arith.andi %[[VAL_84]], %[[VAL_85]] : i1 // CHECK: %[[VAL_87:.*]] = scf.if %[[VAL_86]] -> (i32) { // CHECK: %[[VAL_88:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_77]]] : memref @@ -250,10 +250,10 @@ // CHECK: } else { // CHECK: scf.yield %[[VAL_79]] : i32 // CHECK: } -// CHECK: %[[VAL_92:.*]] = arith.cmpi eq, %[[VAL_80]], %[[VAL_83]] : index +// CHECK: %[[VAL_92:.*]] = arith.cmpi eq(%[[VAL_80]], %[[VAL_83]]) : index // CHECK: %[[VAL_93:.*]] = arith.addi %[[VAL_77]], %[[VAL_3]] : index // CHECK: %[[VAL_94:.*]] = arith.select %[[VAL_92]], %[[VAL_93]], %[[VAL_77]] : index -// CHECK: %[[VAL_95:.*]] = arith.cmpi eq, %[[VAL_81]], %[[VAL_83]] : index +// CHECK: %[[VAL_95:.*]] = arith.cmpi eq(%[[VAL_81]], %[[VAL_83]]) : index // CHECK: %[[VAL_96:.*]] = arith.addi %[[VAL_78]], %[[VAL_3]] : index // CHECK: %[[VAL_97:.*]] = arith.select %[[VAL_95]], %[[VAL_96]], %[[VAL_78]] : index // CHECK: scf.yield %[[VAL_94]], %[[VAL_97]], %[[VAL_98:.*]] : index, index, i32 @@ -262,20 +262,20 @@ // CHECK: sparse_tensor.lex_insert %[[VAL_8]], %[[VAL_23]], %[[BUF]] : tensor, memref, memref // CHECK: } else { // CHECK: } -// CHECK: %[[VAL_100:.*]] = arith.cmpi eq, %[[VAL_57]], %[[VAL_60]] : index +// CHECK: %[[VAL_100:.*]] = arith.cmpi eq(%[[VAL_57]], %[[VAL_60]]) : index // CHECK: %[[VAL_101:.*]] = arith.addi %[[VAL_55]], %[[VAL_3]] : index // CHECK: %[[VAL_102:.*]] = arith.select %[[VAL_100]], %[[VAL_101]], %[[VAL_55]] : index -// CHECK: %[[VAL_103:.*]] = arith.cmpi eq, %[[VAL_58]], %[[VAL_60]] : index +// CHECK: %[[VAL_103:.*]] = arith.cmpi eq(%[[VAL_58]], %[[VAL_60]]) : index // CHECK: %[[VAL_104:.*]] = arith.addi %[[VAL_56]], %[[VAL_3]] : index // CHECK: %[[VAL_105:.*]] = arith.select %[[VAL_103]], %[[VAL_104]], %[[VAL_56]] : index // CHECK: scf.yield %[[VAL_102]], %[[VAL_105]] : index, index // CHECK: } // CHECK: } else { // CHECK: } -// CHECK: %[[VAL_106:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_39]] : index +// CHECK: %[[VAL_106:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_39]]) : index // CHECK: %[[VAL_107:.*]] = arith.addi %[[VAL_34]], %[[VAL_3]] : index // CHECK: %[[VAL_108:.*]] = arith.select %[[VAL_106]], %[[VAL_107]], %[[VAL_34]] : index -// CHECK: %[[VAL_109:.*]] = arith.cmpi eq, %[[VAL_37]], %[[VAL_39]] : index +// CHECK: %[[VAL_109:.*]] = arith.cmpi eq(%[[VAL_37]], %[[VAL_39]]) : index // CHECK: %[[VAL_110:.*]] = arith.addi %[[VAL_35]], %[[VAL_3]] : index // CHECK: %[[VAL_111:.*]] = arith.select %[[VAL_109]], %[[VAL_110]], %[[VAL_35]] : index // CHECK: scf.yield %[[VAL_108]], %[[VAL_111]] : index, index @@ -346,18 +346,18 @@ // CHECK: %[[VAL_32:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_2]]] : memref // CHECK: %[[VAL_33:.*]] = memref.load %[[VAL_15]]{{\[}}%[[VAL_3]]] : memref // CHECK: %[[VAL_34:.*]]:3 = scf.while (%[[VAL_35:.*]] = %[[VAL_29]], %[[VAL_36:.*]] = %[[VAL_32]], %[[VAL_37:.*]] = %[[VAL_28]]) : (index, index, index) -> (index, index, index) { -// CHECK: %[[VAL_38:.*]] = arith.cmpi ult, %[[VAL_35]], %[[VAL_31]] : index -// CHECK: %[[VAL_39:.*]] = arith.cmpi ult, %[[VAL_36]], %[[VAL_33]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi ult(%[[VAL_35]], %[[VAL_31]]) : index +// CHECK: %[[VAL_39:.*]] = arith.cmpi ult(%[[VAL_36]], %[[VAL_33]]) : index // CHECK: %[[VAL_40:.*]] = arith.andi %[[VAL_38]], %[[VAL_39]] : i1 // CHECK: scf.condition(%[[VAL_40]]) %[[VAL_35]], %[[VAL_36]], %[[VAL_37]] : index, index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_41:.*]]: index, %[[VAL_42:.*]]: index, %[[VAL_43:.*]]: index): // CHECK: %[[VAL_44:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_41]]] : memref // CHECK: %[[VAL_45:.*]] = memref.load %[[VAL_16]]{{\[}}%[[VAL_42]]] : memref -// CHECK: %[[VAL_46:.*]] = arith.cmpi ult, %[[VAL_45]], %[[VAL_44]] : index +// CHECK: %[[VAL_46:.*]] = arith.cmpi ult(%[[VAL_45]], %[[VAL_44]]) : index // CHECK: %[[VAL_47:.*]] = arith.select %[[VAL_46]], %[[VAL_45]], %[[VAL_44]] : index -// CHECK: %[[VAL_48:.*]] = arith.cmpi eq, %[[VAL_44]], %[[VAL_47]] : index -// CHECK: %[[VAL_49:.*]] = arith.cmpi eq, %[[VAL_45]], %[[VAL_47]] : index +// CHECK: %[[VAL_48:.*]] = arith.cmpi eq(%[[VAL_44]], %[[VAL_47]]) : index +// CHECK: %[[VAL_49:.*]] = arith.cmpi eq(%[[VAL_45]], %[[VAL_47]]) : index // CHECK: %[[VAL_50:.*]] = arith.andi %[[VAL_48]], %[[VAL_49]] : i1 // CHECK: %[[VAL_51:.*]] = scf.if %[[VAL_50]] -> (index) { // CHECK: %[[VAL_52:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_41]]] : memref @@ -371,7 +371,7 @@ // CHECK: %[[VAL_62:.*]] = arith.mulf %[[VAL_52]], %[[VAL_61]] : f32 // CHECK: %[[VAL_63:.*]] = arith.addf %[[VAL_60]], %[[VAL_62]] : f32 // CHECK: %[[VAL_64:.*]] = memref.load %[[VAL_26]]{{\[}}%[[VAL_59]]] : memref -// CHECK: %[[VAL_65:.*]] = arith.cmpi eq, %[[VAL_64]], %[[VAL_5]] : i1 +// CHECK: %[[VAL_65:.*]] = arith.cmpi eq(%[[VAL_64]], %[[VAL_5]]) : i1 // CHECK: %[[VAL_66:.*]] = scf.if %[[VAL_65]] -> (index) { // CHECK: memref.store %[[VAL_6]], %[[VAL_26]]{{\[}}%[[VAL_59]]] : memref // CHECK: memref.store %[[VAL_59]], %[[VAL_27]]{{\[}}%[[VAL_58]]] : memref @@ -387,10 +387,10 @@ // CHECK: } else { // CHECK: scf.yield %[[VAL_43]] : index // CHECK: } -// CHECK: %[[VAL_70:.*]] = arith.cmpi eq, %[[VAL_44]], %[[VAL_47]] : index +// CHECK: %[[VAL_70:.*]] = arith.cmpi eq(%[[VAL_44]], %[[VAL_47]]) : index // CHECK: %[[VAL_71:.*]] = arith.addi %[[VAL_41]], %[[VAL_3]] : index // CHECK: %[[VAL_72:.*]] = arith.select %[[VAL_70]], %[[VAL_71]], %[[VAL_41]] : index -// CHECK: %[[VAL_73:.*]] = arith.cmpi eq, %[[VAL_45]], %[[VAL_47]] : index +// CHECK: %[[VAL_73:.*]] = arith.cmpi eq(%[[VAL_45]], %[[VAL_47]]) : index // CHECK: %[[VAL_74:.*]] = arith.addi %[[VAL_42]], %[[VAL_3]] : index // CHECK: %[[VAL_75:.*]] = arith.select %[[VAL_73]], %[[VAL_74]], %[[VAL_42]] : index // CHECK: scf.yield %[[VAL_72]], %[[VAL_75]], %[[VAL_76:.*]] : index, index, index diff --git a/mlir/test/Dialect/SparseTensor/sparse_vector_chain.mlir b/mlir/test/Dialect/SparseTensor/sparse_vector_chain.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_vector_chain.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_vector_chain.mlir @@ -42,18 +42,18 @@ // CHECK: %[[VAL_24:.*]] = arith.addi %[[VAL_18]], %[[VAL_8]] : index // CHECK: %[[VAL_25:.*]] = memref.load %[[VAL_12]]{{\[}}%[[VAL_24]]] : memref // CHECK: %[[VAL_26:.*]]:3 = scf.while (%[[VAL_27:.*]] = %[[VAL_20]], %[[VAL_28:.*]] = %[[VAL_23]], %[[VAL_29:.*]] = %[[VAL_19]]) : (index, index, f64) -> (index, index, f64) { -// CHECK: %[[VAL_30:.*]] = arith.cmpi ult, %[[VAL_27]], %[[VAL_22]] : index -// CHECK: %[[VAL_31:.*]] = arith.cmpi ult, %[[VAL_28]], %[[VAL_25]] : index +// CHECK: %[[VAL_30:.*]] = arith.cmpi ult(%[[VAL_27]], %[[VAL_22]]) : index +// CHECK: %[[VAL_31:.*]] = arith.cmpi ult(%[[VAL_28]], %[[VAL_25]]) : index // CHECK: %[[VAL_32:.*]] = arith.andi %[[VAL_30]], %[[VAL_31]] : i1 // CHECK: scf.condition(%[[VAL_32]]) %[[VAL_27]], %[[VAL_28]], %[[VAL_29]] : index, index, f64 // CHECK: } do { // CHECK: ^bb0(%[[VAL_33:.*]]: index, %[[VAL_34:.*]]: index, %[[VAL_35:.*]]: f64): // CHECK: %[[VAL_36:.*]] = memref.load %[[VAL_10]]{{\[}}%[[VAL_33]]] : memref // CHECK: %[[VAL_37:.*]] = memref.load %[[VAL_13]]{{\[}}%[[VAL_34]]] : memref -// CHECK: %[[VAL_38:.*]] = arith.cmpi ult, %[[VAL_37]], %[[VAL_36]] : index +// CHECK: %[[VAL_38:.*]] = arith.cmpi ult(%[[VAL_37]], %[[VAL_36]]) : index // CHECK: %[[VAL_39:.*]] = arith.select %[[VAL_38]], %[[VAL_37]], %[[VAL_36]] : index -// CHECK: %[[VAL_40:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_39]] : index -// CHECK: %[[VAL_41:.*]] = arith.cmpi eq, %[[VAL_37]], %[[VAL_39]] : index +// CHECK: %[[VAL_40:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_39]]) : index +// CHECK: %[[VAL_41:.*]] = arith.cmpi eq(%[[VAL_37]], %[[VAL_39]]) : index // CHECK: %[[VAL_42:.*]] = arith.andi %[[VAL_40]], %[[VAL_41]] : i1 // CHECK: %[[VAL_43:.*]] = scf.if %[[VAL_42]] -> (f64) { // CHECK: %[[VAL_44:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_33]]] : memref @@ -62,13 +62,13 @@ // CHECK: %[[VAL_47:.*]] = arith.addf %[[VAL_35]], %[[VAL_46]] : f64 // CHECK: scf.yield %[[VAL_47]] : f64 // CHECK: } else { -// CHECK: %[[VAL_48:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_39]] : index +// CHECK: %[[VAL_48:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_39]]) : index // CHECK: %[[VAL_49:.*]] = scf.if %[[VAL_48]] -> (f64) { // CHECK: %[[VAL_50:.*]] = memref.load %[[VAL_11]]{{\[}}%[[VAL_33]]] : memref // CHECK: %[[VAL_51:.*]] = arith.addf %[[VAL_35]], %[[VAL_50]] : f64 // CHECK: scf.yield %[[VAL_51]] : f64 // CHECK: } else { -// CHECK: %[[VAL_52:.*]] = arith.cmpi eq, %[[VAL_37]], %[[VAL_39]] : index +// CHECK: %[[VAL_52:.*]] = arith.cmpi eq(%[[VAL_37]], %[[VAL_39]]) : index // CHECK: %[[VAL_53:.*]] = scf.if %[[VAL_52]] -> (f64) { // CHECK: %[[VAL_54:.*]] = memref.load %[[VAL_14]]{{\[}}%[[VAL_34]]] : memref // CHECK: %[[VAL_55:.*]] = arith.addf %[[VAL_35]], %[[VAL_54]] : f64 @@ -80,10 +80,10 @@ // CHECK: } // CHECK: scf.yield %[[VAL_57:.*]] : f64 // CHECK: } -// CHECK: %[[VAL_58:.*]] = arith.cmpi eq, %[[VAL_36]], %[[VAL_39]] : index +// CHECK: %[[VAL_58:.*]] = arith.cmpi eq(%[[VAL_36]], %[[VAL_39]]) : index // CHECK: %[[VAL_59:.*]] = arith.addi %[[VAL_33]], %[[VAL_8]] : index // CHECK: %[[VAL_60:.*]] = arith.select %[[VAL_58]], %[[VAL_59]], %[[VAL_33]] : index -// CHECK: %[[VAL_61:.*]] = arith.cmpi eq, %[[VAL_37]], %[[VAL_39]] : index +// CHECK: %[[VAL_61:.*]] = arith.cmpi eq(%[[VAL_37]], %[[VAL_39]]) : index // CHECK: %[[VAL_62:.*]] = arith.addi %[[VAL_34]], %[[VAL_8]] : index // CHECK: %[[VAL_63:.*]] = arith.select %[[VAL_61]], %[[VAL_62]], %[[VAL_34]] : index // CHECK: scf.yield %[[VAL_60]], %[[VAL_63]], %[[VAL_64:.*]] : index, index, f64 diff --git a/mlir/test/Dialect/SparseTensor/sparse_vector_index.mlir b/mlir/test/Dialect/SparseTensor/sparse_vector_index.mlir --- a/mlir/test/Dialect/SparseTensor/sparse_vector_index.mlir +++ b/mlir/test/Dialect/SparseTensor/sparse_vector_index.mlir @@ -79,12 +79,12 @@ // CHECK-DAG: %[[VAL_10:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_5]]] : memref // CHECK-DAG: %[[VAL_11:.*]] = memref.load %[[VAL_6]]{{\[}}%[[VAL_2]]] : memref // CHECK: %[[VAL_12:.*]]:2 = scf.while (%[[VAL_13:.*]] = %[[VAL_10]], %[[VAL_14:.*]] = %[[VAL_5]]) : (index, index) -> (index, index) { -// CHECK: %[[VAL_15:.*]] = arith.cmpi ult, %[[VAL_13]], %[[VAL_11]] : index +// CHECK: %[[VAL_15:.*]] = arith.cmpi ult(%[[VAL_13]], %[[VAL_11]]) : index // CHECK: scf.condition(%[[VAL_15]]) %[[VAL_13]], %[[VAL_14]] : index, index // CHECK: } do { // CHECK: ^bb0(%[[VAL_16:.*]]: index, %[[VAL_17:.*]]: index): // CHECK: %[[VAL_18:.*]] = memref.load %[[VAL_7]]{{\[}}%[[VAL_16]]] : memref -// CHECK: %[[VAL_19:.*]] = arith.cmpi eq, %[[VAL_18]], %[[VAL_17]] : index +// CHECK: %[[VAL_19:.*]] = arith.cmpi eq(%[[VAL_18]], %[[VAL_17]]) : index // CHECK: scf.if %[[VAL_19]] { // CHECK: %[[VAL_20:.*]] = memref.load %[[VAL_8]]{{\[}}%[[VAL_16]]] : memref // CHECK: %[[VAL_21:.*]] = arith.index_cast %[[VAL_17]] : index to i64 @@ -94,7 +94,7 @@ // CHECK: %[[VAL_23:.*]] = arith.index_cast %[[VAL_17]] : index to i64 // CHECK: memref.store %[[VAL_23]], %[[VAL_9]]{{\[}}%[[VAL_17]]] : memref<8xi64> // CHECK: } -// CHECK: %[[VAL_24:.*]] = arith.cmpi eq, %[[VAL_18]], %[[VAL_17]] : index +// CHECK: %[[VAL_24:.*]] = arith.cmpi eq(%[[VAL_18]], %[[VAL_17]]) : index // CHECK: %[[VAL_25:.*]] = arith.addi %[[VAL_16]], %[[VAL_2]] : index // CHECK: %[[VAL_26:.*]] = arith.select %[[VAL_24]], %[[VAL_25]], %[[VAL_16]] : index // CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_17]], %[[VAL_2]] : index diff --git a/mlir/test/Dialect/Tensor/split-padding.mlir b/mlir/test/Dialect/Tensor/split-padding.mlir --- a/mlir/test/Dialect/Tensor/split-padding.mlir +++ b/mlir/test/Dialect/Tensor/split-padding.mlir @@ -29,8 +29,8 @@ // CHECK-DAG: %[[F0:.+]] = arith.constant 0.000000e+00 : f32 // CHECK-DAG: %[[C0:.+]] = arith.constant 0 : index -// CHECK: %[[EQ0:.+]] = arith.cmpi eq, %[[LOW0]], %[[C0]] : index -// CHECK: %[[EQ1:.+]] = arith.cmpi eq, %[[HIGH1]], %[[C0]] : index +// CHECK: %[[EQ0:.+]] = arith.cmpi eq(%[[LOW0]], %[[C0]]) : index +// CHECK: %[[EQ1:.+]] = arith.cmpi eq(%[[HIGH1]], %[[C0]]) : index // CHECK: %[[AND:.+]] = arith.andi %[[EQ0]], %[[EQ1]] : i1 // CHECK: %[[IF:.+]] = scf.if %[[AND]] -> (tensor) { // CHECK: scf.yield %[[INPUT]] : tensor diff --git a/mlir/test/Dialect/Vector/vector-contract-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-transforms.mlir --- a/mlir/test/Dialect/Vector/vector-contract-transforms.mlir +++ b/mlir/test/Dialect/Vector/vector-contract-transforms.mlir @@ -819,10 +819,10 @@ // CHECK: %[[c0:.*]] = arith.constant 0 : index // CHECK: %[[c1:.*]] = arith.constant 1 : index // CHECK: %[[T0:.*]] = vector.create_mask %[[B]] : vector<3xi1> -// CHECK: %[[T1:.*]] = arith.cmpi sgt, %[[A]], %[[c0]] : index +// CHECK: %[[T1:.*]] = arith.cmpi sgt(%[[A]], %[[c0]]) : index // CHECK: %[[T2:.*]] = arith.select %[[T1]], %[[T0]], %[[C1]] : vector<3xi1> // CHECK: %[[T3:.*]] = vector.insert %[[T2]], %[[C2]] [0] : vector<3xi1> into vector<2x3xi1> -// CHECK: %[[T4:.*]] = arith.cmpi sgt, %[[A]], %[[c1]] : index +// CHECK: %[[T4:.*]] = arith.cmpi sgt(%[[A]], %[[c1]]) : index // CHECK: %[[T5:.*]] = arith.select %[[T4]], %[[T0]], %[[C1]] : vector<3xi1> // CHECK: %[[T6:.*]] = vector.insert %[[T5]], %[[T3]] [1] : vector<3xi1> into vector<2x3xi1> // CHECK: return %[[T6]] : vector<2x3xi1> @@ -842,13 +842,13 @@ // CHECK-DAG: %[[c0:.*]] = arith.constant 0 : index // CHECK-DAG: %[[c1:.*]] = arith.constant 1 : index // CHECK: %[[T0:.*]] = vector.create_mask %[[C]] : vector<7xi1> -// CHECK: %[[T1:.*]] = arith.cmpi sgt, %[[B]], %[[c0]] : index +// CHECK: %[[T1:.*]] = arith.cmpi sgt(%[[B]], %[[c0]]) : index // CHECK: %[[T2:.*]] = arith.select %[[T1]], %[[T0]], %[[C1]] : vector<7xi1> // CHECK: %[[T3:.*]] = vector.insert %[[T2]], %[[C2]] [0] : vector<7xi1> into vector<1x7xi1> -// CHECK: %[[T4:.*]] = arith.cmpi sgt, %[[A]], %[[c0]] : index +// CHECK: %[[T4:.*]] = arith.cmpi sgt(%[[A]], %[[c0]]) : index // CHECK: %[[T5:.*]] = arith.select %[[T4]], %[[T3]], %[[C2]] : vector<1x7xi1> // CHECK: %[[T6:.*]] = vector.insert %[[T5]], %[[C3]] [0] : vector<1x7xi1> into vector<2x1x7xi1> -// CHECK: %[[T7:.*]] = arith.cmpi sgt, %[[A]], %[[c1]] : index +// CHECK: %[[T7:.*]] = arith.cmpi sgt(%[[A]], %[[c1]]) : index // CHECK: %[[T8:.*]] = arith.select %[[T7]], %[[T3]], %[[C2]] : vector<1x7xi1> // CHECK: %[[T9:.*]] = vector.insert %[[T8]], %[[T6]] [1] : vector<1x7xi1> into vector<2x1x7xi1> // CHECK: return %[[T9]] : vector<2x1x7xi1> diff --git a/mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir b/mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir --- a/mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir +++ b/mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir @@ -249,9 +249,9 @@ %0 = arith.addf %arg0, %arg0 : vector<1x1x8xf32> // CHECK: vector.extract %{{.*}}[0] : vector<1x4xf32> // CHECK: vector.extract %{{.*}}[0] : vector<1x4xf32> - // CHECK: arith.cmpf ogt, %{{.*}}, %{{.*}} : vector<4xf32> + // CHECK: arith.cmpf ogt(%{{.*}}, %{{.*}}) : vector<4xf32> // CHECK: vector.broadcast %{{.*}} : vector<4xi1> to vector<1x4xi1> - %1 = arith.cmpf ogt, %arg2, %arg3 : vector<1x4xf32> + %1 = arith.cmpf ogt(%arg2, %arg3) : vector<1x4xf32> // CHECK: vector.extract %{{.*}}[0] : vector<1x4xf32> // CHECK: vector.extract %{{.*}}[0] : vector<1x4xf32> // CHECK: select %{{.*}}, %{{.*}}, %{{.*}} : vector<4xi1>, vector<4xf32> diff --git a/mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir b/mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir --- a/mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir +++ b/mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir @@ -318,13 +318,13 @@ // CHECK-LABEL: func @transpose_elementwise_diff_operand_result_type // CHECK-SAME: (%[[A:.+]]: vector<4x2xf32>, %[[B:.+]]: vector<4x2xf32>) -// CHECK: %[[CMP:.+]] = arith.cmpf olt, %[[A]], %[[B]] : vector<4x2xf32> +// CHECK: %[[CMP:.+]] = arith.cmpf olt(%[[A]], %[[B]]) : vector<4x2xf32> // CHECK: %[[T:.+]] = vector.transpose %[[CMP]], [1, 0] : vector<4x2xi1> to vector<2x4xi1> // CHECK: return %[[T]] func.func @transpose_elementwise_diff_operand_result_type(%a : vector<4x2xf32>, %b : vector<4x2xf32>) -> vector<2x4xi1> { %at = vector.transpose %a, [1, 0]: vector<4x2xf32> to vector<2x4xf32> %bt = vector.transpose %b, [1, 0]: vector<4x2xf32> to vector<2x4xf32> - %r = arith.cmpf olt, %at, %bt : vector<2x4xf32> + %r = arith.cmpf olt(%at, %bt) : vector<2x4xf32> return %r : vector<2x4xi1> } diff --git a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir --- a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir +++ b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir @@ -32,10 +32,10 @@ // %i + 4 <= dim(%A, 0) // CHECK: %[[idx0:.*]] = affine.apply #[[$map_p4]]()[%[[i]]] // CHECK: %[[d0:.*]] = memref.dim %[[A]], %[[c0]] : memref - // CHECK: %[[cmp0:.*]] = arith.cmpi sle, %[[idx0]], %[[d0]] : index + // CHECK: %[[cmp0:.*]] = arith.cmpi sle(%[[idx0]], %[[d0]]) : index // %j + 8 <= dim(%A, 1) // CHECK: %[[idx1:.*]] = affine.apply #[[$map_p8]]()[%[[j]]] - // CHECK: %[[cmp1:.*]] = arith.cmpi sle, %[[idx1]], %[[c8]] : index + // CHECK: %[[cmp1:.*]] = arith.cmpi sle(%[[idx1]], %[[c8]]) : index // are both conds true // CHECK: %[[cond:.*]] = arith.andi %[[cmp0]], %[[cmp1]] : i1 // CHECK: %[[ifres:.*]]:3 = scf.if %[[cond]] -> (memref, index, index) { @@ -64,10 +64,10 @@ // %i + 4 <= dim(%A, 0) // LINALG: %[[idx0:.*]] = affine.apply #[[$map_p4]]()[%[[i]]] // LINALG: %[[d0:.*]] = memref.dim %[[A]], %[[c0]] : memref - // LINALG: %[[cmp0:.*]] = arith.cmpi sle, %[[idx0]], %[[d0]] : index + // LINALG: %[[cmp0:.*]] = arith.cmpi sle(%[[idx0]], %[[d0]]) : index // %j + 8 <= dim(%A, 1) // LINALG: %[[idx1:.*]] = affine.apply #[[$map_p8]]()[%[[j]]] - // LINALG: %[[cmp1:.*]] = arith.cmpi sle, %[[idx1]], %[[c8]] : index + // LINALG: %[[cmp1:.*]] = arith.cmpi sle(%[[idx1]], %[[c8]]) : index // are both conds true // LINALG: %[[cond:.*]] = arith.andi %[[cmp0]], %[[cmp1]] : i1 // LINALG: %[[ifres:.*]]:3 = scf.if %[[cond]] -> (memref, index, index) { @@ -118,10 +118,10 @@ // CHECK: %[[alloc:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // %i + 4 <= dim(%A, 0) // CHECK: %[[idx0:.*]] = affine.apply #[[$map_p4]]()[%[[i]]] - // CHECK: %[[cmp0:.*]] = arith.cmpi sle, %[[idx0]], %[[c7]] : index + // CHECK: %[[cmp0:.*]] = arith.cmpi sle(%[[idx0]], %[[c7]]) : index // %j + 8 <= dim(%A, 1) // CHECK: %[[idx1:.*]] = affine.apply #[[$map_p8]]()[%[[j]]] - // CHECK: %[[cmp1:.*]] = arith.cmpi sle, %[[idx1]], %[[c8]] : index + // CHECK: %[[cmp1:.*]] = arith.cmpi sle(%[[idx1]], %[[c8]]) : index // are both conds true // CHECK: %[[cond:.*]] = arith.andi %[[cmp0]], %[[cmp1]] : i1 // CHECK: %[[ifres:.*]]:3 = scf.if %[[cond]] -> (memref, index, index) { @@ -154,10 +154,10 @@ // LINALG: %[[alloc:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // %i + 4 <= dim(%A, 0) // LINALG: %[[idx0:.*]] = affine.apply #[[$map_p4]]()[%[[i]]] - // LINALG: %[[cmp0:.*]] = arith.cmpi sle, %[[idx0]], %[[c7]] : index + // LINALG: %[[cmp0:.*]] = arith.cmpi sle(%[[idx0]], %[[c7]]) : index // %j + 8 <= dim(%A, 1) // LINALG: %[[idx1:.*]] = affine.apply #[[$map_p8]]()[%[[j]]] - // LINALG: %[[cmp1:.*]] = arith.cmpi sle, %[[idx1]], %[[c8]] : index + // LINALG: %[[cmp1:.*]] = arith.cmpi sle(%[[idx1]], %[[c8]]) : index // are both conds true // LINALG: %[[cond:.*]] = arith.andi %[[cmp0]], %[[cmp1]] : i1 // LINALG: %[[ifres:.*]]:3 = scf.if %[[cond]] -> (memref, index, index) { @@ -210,9 +210,9 @@ // CHECK: %[[TEMP:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // CHECK: %[[VAL_8:.*]] = affine.apply #[[MAP0]]()[%[[I]]] // CHECK: %[[DIM0:.*]] = memref.dim %[[DEST]], %[[C0]] : memref -// CHECK: %[[DIM0_IN:.*]] = arith.cmpi sle, %[[VAL_8]], %[[DIM0]] : index +// CHECK: %[[DIM0_IN:.*]] = arith.cmpi sle(%[[VAL_8]], %[[DIM0]]) : index // CHECK: %[[DIM1:.*]] = affine.apply #[[MAP1]]()[%[[J]]] -// CHECK: %[[DIM1_IN:.*]] = arith.cmpi sle, %[[DIM1]], %[[C8]] : index +// CHECK: %[[DIM1_IN:.*]] = arith.cmpi sle(%[[DIM1]], %[[C8]]) : index // CHECK: %[[IN_BOUNDS:.*]] = arith.andi %[[DIM0_IN]], %[[DIM1_IN]] : i1 // CHECK: %[[IN_BOUND_DEST:.*]]:3 = scf.if %[[IN_BOUNDS]] -> // CHECK-SAME: (memref, index, index) { @@ -256,9 +256,9 @@ // LINALG: %[[TEMP:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // LINALG: %[[IDX0:.*]] = affine.apply #[[MAP0]]()[%[[I]]] // LINALG: %[[DIM0:.*]] = memref.dim %[[DEST]], %[[C0]] : memref -// LINALG: %[[DIM0_IN:.*]] = arith.cmpi sle, %[[IDX0]], %[[DIM0]] : index +// LINALG: %[[DIM0_IN:.*]] = arith.cmpi sle(%[[IDX0]], %[[DIM0]]) : index // LINALG: %[[DIM1:.*]] = affine.apply #[[MAP1]]()[%[[J]]] -// LINALG: %[[DIM1_IN:.*]] = arith.cmpi sle, %[[DIM1]], %[[C8]] : index +// LINALG: %[[DIM1_IN:.*]] = arith.cmpi sle(%[[DIM1]], %[[C8]]) : index // LINALG: %[[IN_BOUNDS:.*]] = arith.andi %[[DIM0_IN]], %[[DIM1_IN]] : i1 // LINALG: %[[IN_BOUND_DEST:.*]]:3 = scf.if %[[IN_BOUNDS]] // LINALG-SAME: -> (memref, index, index) { @@ -309,9 +309,9 @@ // CHECK-DAG: %[[CT:.*]] = arith.constant true // CHECK: %[[TEMP:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // CHECK: %[[DIM0:.*]] = affine.apply #[[MAP1]]()[%[[I]]] -// CHECK: %[[DIM0_IN:.*]] = arith.cmpi sle, %[[DIM0]], %[[C7]] : index +// CHECK: %[[DIM0_IN:.*]] = arith.cmpi sle(%[[DIM0]], %[[C7]]) : index // CHECK: %[[DIM1:.*]] = affine.apply #[[MAP2]]()[%[[J]]] -// CHECK: %[[DIM1_IN:.*]] = arith.cmpi sle, %[[DIM1]], %[[C8]] : index +// CHECK: %[[DIM1_IN:.*]] = arith.cmpi sle(%[[DIM1]], %[[C8]]) : index // CHECK: %[[IN_BOUNDS:.*]] = arith.andi %[[DIM0_IN]], %[[DIM1_IN]] : i1 // CHECK: %[[IN_BOUND_DEST:.*]]:3 = scf.if %[[IN_BOUNDS]] // CHECK-SAME: -> (memref, index, index) { @@ -359,9 +359,9 @@ // LINALG-DAG: %[[C8:.*]] = arith.constant 8 : index // LINALG: %[[TEMP:.*]] = memref.alloca() {alignment = 32 : i64} : memref<4x8xf32> // LINALG: %[[DIM0:.*]] = affine.apply #[[MAP1]]()[%[[I]]] -// LINALG: %[[DIM0_IN:.*]] = arith.cmpi sle, %[[DIM0]], %[[C7]] : index +// LINALG: %[[DIM0_IN:.*]] = arith.cmpi sle(%[[DIM0]], %[[C7]]) : index // LINALG: %[[DIM1:.*]] = affine.apply #[[MAP2]]()[%[[J]]] -// LINALG: %[[DIM1_IN:.*]] = arith.cmpi sle, %[[DIM1]], %[[C8]] : index +// LINALG: %[[DIM1_IN:.*]] = arith.cmpi sle(%[[DIM1]], %[[C8]]) : index // LINALG: %[[IN_BOUNDS:.*]] = arith.andi %[[DIM0_IN]], %[[DIM1_IN]] : i1 // LINALG: %[[IN_BOUND_DEST:.*]]:3 = scf.if %[[IN_BOUNDS]] // LINALG-SAME: -> (memref, index, index) { diff --git a/mlir/test/Dialect/Vector/vector-transforms.mlir b/mlir/test/Dialect/Vector/vector-transforms.mlir --- a/mlir/test/Dialect/Vector/vector-transforms.mlir +++ b/mlir/test/Dialect/Vector/vector-transforms.mlir @@ -343,10 +343,10 @@ // CHECK: %[[VT5:.*]] = vector.transfer_read %[[ARG1]][%[[C0]], %[[C2]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> // CHECK: %[[VT6:.*]] = vector.transfer_read %[[ARG1]][%[[C2]], %[[C0]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> // CHECK: %[[VT7:.*]] = vector.transfer_read %[[ARG1]][%[[C2]], %[[C2]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> -// CHECK: %[[CMP0:.*]] = arith.cmpf ult, %[[VT0]], %[[VT4]] : vector<2x2xf32> -// CHECK: %[[CMP1:.*]] = arith.cmpf ult, %[[VT1]], %[[VT5]] : vector<2x2xf32> -// CHECK: %[[CMP2:.*]] = arith.cmpf ult, %[[VT2]], %[[VT6]] : vector<2x2xf32> -// CHECK: %[[CMP3:.*]] = arith.cmpf ult, %[[VT3]], %[[VT7]] : vector<2x2xf32> +// CHECK: %[[CMP0:.*]] = arith.cmpf ult(%[[VT0]], %[[VT4]]) : vector<2x2xf32> +// CHECK: %[[CMP1:.*]] = arith.cmpf ult(%[[VT1]], %[[VT5]]) : vector<2x2xf32> +// CHECK: %[[CMP2:.*]] = arith.cmpf ult(%[[VT2]], %[[VT6]]) : vector<2x2xf32> +// CHECK: %[[CMP3:.*]] = arith.cmpf ult(%[[VT3]], %[[VT7]]) : vector<2x2xf32> // CHECK: %[[VT0:.*]] = vector.transfer_read %[[ARG0]][%[[C0]], %[[C0]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> // CHECK: %[[VT1:.*]] = vector.transfer_read %[[ARG0]][%[[C0]], %[[C2]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> // CHECK: %[[VT2:.*]] = vector.transfer_read %[[ARG0]][%[[C2]], %[[C0]]], {{.*}} : memref<4x4xf32>, vector<2x2xf32> @@ -368,7 +368,7 @@ %cf0 = arith.constant 0.0 : f32 %0 = vector.transfer_read %arg0[%c0, %c0], %cf0 : memref<4x4xf32>, vector<4x4xf32> %1 = vector.transfer_read %arg1[%c0, %c0], %cf0 : memref<4x4xf32>, vector<4x4xf32> - %cond = arith.cmpf ult, %0, %1 : vector<4x4xf32> + %cond = arith.cmpf ult(%0, %1) : vector<4x4xf32> // Vector transfer split pattern only support single user right now. %2 = vector.transfer_read %arg0[%c0, %c0], %cf0 : memref<4x4xf32>, vector<4x4xf32> %3 = vector.transfer_read %arg1[%c0, %c0], %cf0 : memref<4x4xf32>, vector<4x4xf32> diff --git a/mlir/test/Dialect/Vector/vector-warp-distribute.mlir b/mlir/test/Dialect/Vector/vector-warp-distribute.mlir --- a/mlir/test/Dialect/Vector/vector-warp-distribute.mlir +++ b/mlir/test/Dialect/Vector/vector-warp-distribute.mlir @@ -19,7 +19,7 @@ // CHECK-SCF-IF-DAG: %[[c2:.*]] = arith.constant 2 : index // CHECK-SCF-IF-DAG: %[[c4:.*]] = arith.constant 4 : index // CHECK-SCF-IF-DAG: %[[c8:.*]] = arith.constant 8 : index -// CHECK-SCF-IF: %[[is_lane_0:.*]] = arith.cmpi eq, %[[laneid]], %[[c0]] +// CHECK-SCF-IF: %[[is_lane_0:.*]] = arith.cmpi eq(%[[laneid]], %[[c0]]) // CHECK-SCF-IF: %[[buffer_v0:.*]] = memref.get_global @__shared_128xf32 // CHECK-SCF-IF: %[[s0:.*]] = arith.muli %[[laneid]], %[[c4]] diff --git a/mlir/test/IR/core-ops.mlir b/mlir/test/IR/core-ops.mlir --- a/mlir/test/IR/core-ops.mlir +++ b/mlir/test/IR/core-ops.mlir @@ -77,24 +77,24 @@ %tcf32 = arith.constant dense<0.> : tensor<42 x f32> %vcf32 = arith.constant dense<0.> : vector<4 x f32> - // CHECK: %{{.*}} = arith.cmpf ogt, %{{.*}}, %{{.*}} : f32 - %65 = arith.cmpf ogt, %f3, %f4 : f32 + // CHECK: %{{.*}} = arith.cmpf ogt(%{{.*}}, %{{.*}}) : f32 + %65 = arith.cmpf ogt(%f3, %f4) : f32 // Predicate 0 means ordered equality comparison. - // CHECK: %{{.*}} = arith.cmpf oeq, %{{.*}}, %{{.*}} : f32 + // CHECK: %{{.*}} = arith.cmpf oeq(%{{.*}}, %{{.*}}) : f32 %66 = "arith.cmpf"(%f3, %f4) {predicate = 1} : (f32, f32) -> i1 - // CHECK: %{{.*}} = arith.cmpf olt, %{{.*}}, %{{.*}}: vector<4xf32> - %67 = arith.cmpf olt, %vcf32, %vcf32 : vector<4 x f32> + // CHECK: %{{.*}} = arith.cmpf olt(%{{.*}}, %{{.*}}) : vector<4xf32> + %67 = arith.cmpf olt(%vcf32, %vcf32) : vector<4 x f32> - // CHECK: %{{.*}} = arith.cmpf oeq, %{{.*}}, %{{.*}}: vector<4xf32> + // CHECK: %{{.*}} = arith.cmpf oeq(%{{.*}}, %{{.*}}) : vector<4xf32> %68 = "arith.cmpf"(%vcf32, %vcf32) {predicate = 1} : (vector<4 x f32>, vector<4 x f32>) -> vector<4 x i1> - // CHECK: %{{.*}} = arith.cmpf oeq, %{{.*}}, %{{.*}}: tensor<42xf32> - %69 = arith.cmpf oeq, %tcf32, %tcf32 : tensor<42 x f32> + // CHECK: %{{.*}} = arith.cmpf oeq(%{{.*}}, %{{.*}}) : tensor<42xf32> + %69 = arith.cmpf oeq(%tcf32, %tcf32) : tensor<42 x f32> - // CHECK: %{{.*}} = arith.cmpf oeq, %{{.*}}, %{{.*}}: vector<4xf32> - %70 = arith.cmpf oeq, %vcf32, %vcf32 : vector<4 x f32> + // CHECK: %{{.*}} = arith.cmpf oeq(%{{.*}}, %{{.*}}) : vector<4xf32> + %70 = arith.cmpf oeq(%vcf32, %vcf32) : vector<4 x f32> // CHECK: arith.constant true %74 = arith.constant true diff --git a/mlir/test/IR/invalid.mlir b/mlir/test/IR/invalid.mlir --- a/mlir/test/IR/invalid.mlir +++ b/mlir/test/IR/invalid.mlir @@ -335,7 +335,7 @@ // `tensor` as operator rather than as a type. func.func @f(f32) { ^bb0(%a : f32): - %18 = arith.cmpi slt, %idx, %idx : index + %18 = arith.cmpi slt(%idx, %idx) : index tensor<42 x index // expected-error {{custom op 'tensor' is unknown (tried 'func.tensor' as well)}} return } @@ -643,7 +643,7 @@ // expected at the end of foo, not on the return line. func.func @error_at_end_of_line() { // expected-error@+1 {{expected ':' followed by operation type}} - %0 = "foo"() + %0 = "foo"() return } @@ -652,7 +652,7 @@ // This makes sure we emit an error at the end of the correct line, the : is // expected at the end of foo, not on the return line. func.func @error_at_end_of_line() { - %0 = "foo"() + %0 = "foo"() // expected-error@-1 {{expected ':' followed by operation type}} // This is a comment and so is the thing above. diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir @@ -55,7 +55,7 @@ scf.for %j = %c0 to %n step %c1 { %e1 = memref.load %C1[%i, %j] : memref %e2 = memref.load %C2[%i, %j] : memref - %c = arith.cmpf oeq, %e1, %e2 : f32 + %c = arith.cmpf oeq(%e1, %e2) : f32 cf.assert %c, "Matmul does not produce same output as matvec" } } diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir @@ -31,7 +31,7 @@ %1 = sparse_tensor.binary %a, %b : bf16, bf16 to bf16 overlap={ ^bb0(%a0: bf16, %b0: bf16): - %cmp = arith.cmpf "olt", %a0, %b0 : bf16 + %cmp = arith.cmpf olt(%a0, %b0) : bf16 %2 = arith.select %cmp, %a0, %b0: bf16 sparse_tensor.yield %2 : bf16 } diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir @@ -31,7 +31,7 @@ %1 = sparse_tensor.binary %a, %b : f16, f16 to f16 overlap={ ^bb0(%a0: f16, %b0: f16): - %cmp = arith.cmpf "olt", %a0, %b0 : f16 + %cmp = arith.cmpf olt(%a0, %b0) : f16 %2 = arith.select %cmp, %a0, %b0: f16 sparse_tensor.yield %2 : f16 } diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir @@ -226,7 +226,7 @@ %result = sparse_tensor.binary %a, %b : f64, f64 to f64 overlap={ ^bb0(%x: f64, %y: f64): - %cmp = arith.cmpi "uge", %col, %row : index + %cmp = arith.cmpi uge(%col, %row) : index %upperTriangleResult = arith.addf %x, %y : f64 %lowerTriangleResult = arith.subf %x, %y : f64 %ret = arith.select %cmp, %upperTriangleResult, %lowerTriangleResult : f64 @@ -235,7 +235,7 @@ left=identity right={ ^bb0(%y: f64): - %cmp = arith.cmpi "uge", %col, %row : index + %cmp = arith.cmpi uge(%col, %row) : index %lowerTriangleResult = arith.negf %y : f64 %ret = arith.select %cmp, %y, %lowerTriangleResult : f64 sparse_tensor.yield %ret : f64 @@ -265,27 +265,27 @@ %thres_up = arith.constant 1.0 : f64 %thres_lo = arith.constant -1.0 : f64 %result = arith.subf %x, %y : f64 - %cmp = arith.cmpf "oge", %result, %thres_up : f64 + %cmp = arith.cmpf oge(%result, %thres_up) : f64 %tmp = arith.select %cmp, %thres_up, %result : f64 - %cmp1 = arith.cmpf "ole", %tmp, %thres_lo : f64 + %cmp1 = arith.cmpf ole(%tmp, %thres_lo) : f64 %ret = arith.select %cmp1, %thres_lo, %tmp : f64 sparse_tensor.yield %ret : f64 } left={ ^bb0(%x: f64): // Uses out-block constant bounds. - %cmp = arith.cmpf "oge", %x, %thres_out_up : f64 + %cmp = arith.cmpf oge(%x, %thres_out_up) : f64 %tmp = arith.select %cmp, %thres_out_up, %x : f64 - %cmp1 = arith.cmpf "ole", %tmp, %thres_out_lo : f64 + %cmp1 = arith.cmpf ole(%tmp, %thres_out_lo) : f64 %ret = arith.select %cmp1, %thres_out_lo, %tmp : f64 sparse_tensor.yield %ret : f64 } right={ ^bb0(%y: f64): %ny = arith.negf %y : f64 - %cmp = arith.cmpf "oge", %ny, %thres_out_up : f64 + %cmp = arith.cmpf oge(%ny, %thres_out_up) : f64 %tmp = arith.select %cmp, %thres_out_up, %ny : f64 - %cmp1 = arith.cmpf "ole", %tmp, %thres_out_lo : f64 + %cmp1 = arith.cmpf ole(%tmp, %thres_out_lo) : f64 %ret = arith.select %cmp1, %thres_out_lo, %tmp : f64 sparse_tensor.yield %ret : f64 } @@ -306,7 +306,7 @@ %result = sparse_tensor.binary %a, %b : f64, f64 to i8 overlap={ ^bb0(%x: f64, %y: f64): - %cmp = arith.cmpf "oeq", %x, %y : f64 + %cmp = arith.cmpf oeq(%x, %y) : f64 %ret = arith.extui %cmp : i1 to i8 sparse_tensor.yield %ret : i8 } @@ -406,7 +406,7 @@ %1 = sparse_tensor.values %A : tensor<4x4xi8, #DCSR> to memref %2 = vector.transfer_read %1[%c0], %du: memref, vector<16xi8> vector.print %2 : vector<16xi8> - + return } diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir @@ -103,7 +103,7 @@ right={} %2 = sparse_tensor.reduce %1, %output, %maxf : f64 { ^bb0(%x: f64, %y: f64): - %cmp = arith.cmpf "olt", %x, %y : f64 + %cmp = arith.cmpf olt(%x, %y) : f64 %3 = arith.select %cmp, %x, %y : f64 sparse_tensor.yield %3 : f64 } @@ -134,7 +134,7 @@ right={} %2 = sparse_tensor.reduce %1, %output, %maxf : f64 { ^bb0(%x: f64, %y: f64): - %cmp = arith.cmpf "olt", %x, %y : f64 + %cmp = arith.cmpf olt(%x, %y) : f64 %3 = arith.select %cmp, %x, %y : f64 sparse_tensor.yield %3 : f64 } diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir @@ -39,10 +39,10 @@ present={ ^bb1(%s: f64): %z = arith.constant 0.0 : f64 - %1 = arith.cmpf one, %s, %z : f64 + %1 = arith.cmpf one(%s, %z) : f64 %2 = arith.uitofp %1 : i1 to f64 %3 = math.copysign %2, %s : f64 - %4 = arith.cmpf uno, %s, %s : f64 + %4 = arith.cmpf uno(%s, %s) : f64 %5 = arith.select %4, %s, %3 : f64 sparse_tensor.yield %5 : f64 } @@ -96,5 +96,3 @@ return } } - - diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir @@ -111,9 +111,9 @@ %1 = sparse_tensor.unary %a: f64 to f64 present={ ^bb0(%x0: f64): - %mincmp = arith.cmpf "ogt", %x0, %cfmin : f64 + %mincmp = arith.cmpf ogt(%x0, %cfmin) : f64 %x1 = arith.select %mincmp, %x0, %cfmin : f64 - %maxcmp = arith.cmpf "olt", %x1, %cfmax : f64 + %maxcmp = arith.cmpf olt(%x1, %cfmax) : f64 %x2 = arith.select %maxcmp, %x1, %cfmax : f64 sparse_tensor.yield %x2 : f64 } @@ -144,9 +144,9 @@ %two = arith.constant 2 : index %r = arith.muli %two, %row : index %c = arith.muli %two, %col : index - %cmp1 = arith.cmpi "ult", %r, %d0 : index + %cmp1 = arith.cmpi ult(%r, %d0) : index %tmp = arith.select %cmp1, %v, %x0 : f64 - %cmp2 = arith.cmpi "ult", %c, %d1 : index + %cmp2 = arith.cmpi ult(%c, %d1) : index %result = arith.select %cmp2, %v, %tmp : f64 sparse_tensor.yield %result : f64 } diff --git a/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/test-sve.mlir b/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/test-sve.mlir --- a/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/test-sve.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/ArmSVE/test-sve.mlir @@ -51,8 +51,8 @@ scf.for %i0 = %c0 to %size step %step { %0 = vector.load %a[%i0] : memref, vector<[2]xi64> %1 = vector.load %b[%i0] : memref, vector<[2]xi64> - %agb = arith.cmpi sge, %0, %1 : vector<[2]xi64> - %bga = arith.cmpi slt, %0, %1 : vector<[2]xi64> + %agb = arith.cmpi sge(%0, %1) : vector<[2]xi64> + %bga = arith.cmpi slt(%0, %1) : vector<[2]xi64> %10 = arm_sve.masked.subi %agb, %0, %1 : vector<[2]xi1>, vector<[2]xi64> %01 = arm_sve.masked.subi %bga, %1, %0 : vector<[2]xi1>, diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir @@ -203,7 +203,7 @@ %v_C = vector.transfer_read %m_C[%b], %index_padding : memref, vector<8xi64> %segB_max = vector.extractelement %v_C[%i7 : i32] : vector<8xi64> - %seg1_done = arith.cmpi "slt", %segB_max, %segA_min : i64 + %seg1_done = arith.cmpi slt(%segB_max, %segA_min) : i64 %r2, %next_b_start1 = scf.if %seg1_done -> (f64, index) { // %v_C segment is done, no need to examine this one again (ever). @@ -260,8 +260,8 @@ %r0, %a0, %b0 = scf.while (%r1 = %data_zero, %a1 = %c0, %b1 = %c0) : (f64, index, index) -> (f64, index, index) { - %cond_i = arith.cmpi "slt", %a1, %M : index - %cond_j = arith.cmpi "slt", %b1, %N : index + %cond_i = arith.cmpi slt(%a1, %M) : index + %cond_j = arith.cmpi slt(%b1, %N) : index %cond = arith.andi %cond_i, %cond_j : i1 scf.condition(%cond) %r1, %a1, %b1 : f64, index, index } do { @@ -278,12 +278,12 @@ %segB_min = vector.extractelement %v_C[%i0 : i32] : vector<8xi64> %segB_max = vector.extractelement %v_C[%i7 : i32] : vector<8xi64> - %seg1_done = arith.cmpi "slt", %segB_max, %segA_min : i64 + %seg1_done = arith.cmpi slt(%segB_max, %segA_min) : i64 %r2, %a2, %b2 = scf.if %seg1_done -> (f64, index, index) { %b3 = arith.addi %b1, %c8 : index scf.yield %r1, %a1, %b3 : f64, index, index } else { - %seg0_done = arith.cmpi "slt", %segA_max, %segB_min : i64 + %seg0_done = arith.cmpi slt(%segA_max, %segB_min) : i64 %r4, %a4, %b4 = scf.if %seg0_done -> (f64, index, index) { %a5 = arith.addi %a1, %c8 : index scf.yield %r1, %a5, %b1 : f64, index, index @@ -298,12 +298,12 @@ -> f64 %r6 = arith.addf %r1, %subresult : f64 - %incr_a = arith.cmpi "slt", %segA_max, %segB_max : i64 + %incr_a = arith.cmpi slt(%segA_max, %segB_max) : i64 %a6, %b6 = scf.if %incr_a -> (index, index) { %a7 = arith.addi %a1, %c8 : index scf.yield %a7, %b1 : index, index } else { - %incr_b = arith.cmpi "slt", %segB_max, %segA_max : i64 + %incr_b = arith.cmpi slt(%segB_max, %segA_max) : i64 %a8, %b8 = scf.if %incr_b -> (index, index) { %b9 = arith.addi %b1, %c8 : index scf.yield %a1, %b9 : index, index @@ -348,8 +348,8 @@ %r0, %a0, %b0 = scf.while (%r1 = %data_zero, %a1 = %c0, %b1 = %c0) : (f64, index, index) -> (f64, index, index) { - %cond_i = arith.cmpi "slt", %a1, %M : index - %cond_j = arith.cmpi "slt", %b1, %N : index + %cond_i = arith.cmpi slt(%a1, %M) : index + %cond_j = arith.cmpi slt(%b1, %N) : index %cond = arith.andi %cond_i, %cond_j : i1 scf.condition(%cond) %r1, %a1, %b1 : f64, index, index } do { @@ -373,13 +373,13 @@ %segA_max = vector.extractelement %v_A[%i7 : i32] : vector<8xi64> %segB_max = vector.extractelement %v_C[%i7 : i32] : vector<8xi64> - %cond_a = arith.cmpi "sle", %segA_max, %segB_max : i64 + %cond_a = arith.cmpi sle(%segA_max, %segB_max) : i64 %cond_a_i64 = arith.extui %cond_a : i1 to i64 %cond_a_idx = arith.index_cast %cond_a_i64 : i64 to index %incr_a = arith.muli %cond_a_idx, %c8 : index %a2 = arith.addi %a1, %incr_a : index - %cond_b = arith.cmpi "sle", %segB_max, %segA_max : i64 + %cond_b = arith.cmpi sle(%segB_max, %segA_max) : i64 %cond_b_i64 = arith.extui %cond_b : i1 to i64 %cond_b_idx = arith.index_cast %cond_b_i64 : i64 to index %incr_b = arith.muli %cond_b_idx, %c8 : index diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir --- a/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir @@ -78,15 +78,15 @@ } func.func @arith_cmpi_0d(%smaller : vector, %bigger : vector) { - %0 = arith.cmpi ult, %smaller, %bigger : vector + %0 = arith.cmpi ult(%smaller, %bigger) : vector // CHECK: ( 1 ) vector.print %0: vector - %1 = arith.cmpi ugt, %smaller, %bigger : vector + %1 = arith.cmpi ugt(%smaller, %bigger) : vector // CHECK: ( 0 ) vector.print %1: vector - %2 = arith.cmpi eq, %smaller, %bigger : vector + %2 = arith.cmpi eq(%smaller, %bigger) : vector // CHECK: ( 0 ) vector.print %2: vector @@ -106,7 +106,7 @@ } func.func @reduce_add(%arg0: vector) { - %0 = vector.reduction , %arg0 : vector into f32 + %0 = vector.reduction , %arg0 : vector into f32 vector.print %0 : f32 // CHECK: 5 return diff --git a/mlir/test/Transforms/canonicalize-block-merge.mlir b/mlir/test/Transforms/canonicalize-block-merge.mlir --- a/mlir/test/Transforms/canonicalize-block-merge.mlir +++ b/mlir/test/Transforms/canonicalize-block-merge.mlir @@ -231,7 +231,7 @@ // CHECK-LABEL: @nomerge func.func @nomerge(%arg0: i32, %i: i32) { %c1_i32 = arith.constant 1 : i32 - %icmp = arith.cmpi slt, %i, %arg0 : i32 + %icmp = arith.cmpi slt(%i, %arg0) : i32 cf.cond_br %icmp, ^bb2, ^bb3 ^bb2: // pred: ^bb1 @@ -243,7 +243,7 @@ cf.br ^bb4(%jp1 : i32) ^bb4(%j: i32): // 2 preds: ^bb2, ^bb7 - %jcmp = arith.cmpi slt, %j, %arg0 : i32 + %jcmp = arith.cmpi slt(%j, %arg0) : i32 // CHECK-NOT: call @print(%[[arg1:.+]], %[[arg1]]) call @print(%j, %ip1) : (i32, i32) -> () cf.cond_br %jcmp, ^bb7, ^bb3 diff --git a/mlir/test/Transforms/canonicalize.mlir b/mlir/test/Transforms/canonicalize.mlir --- a/mlir/test/Transforms/canonicalize.mlir +++ b/mlir/test/Transforms/canonicalize.mlir @@ -600,14 +600,14 @@ %c42 = arith.constant 42 : index %0 = arith.remsi %c-43, %c42 : index %c0 = arith.constant 0 : index - %1 = arith.cmpi slt, %0, %c0 : index + %1 = arith.cmpi slt(%0, %c0) : index %2 = arith.addi %0, %c42 : index %3 = arith.select %1, %2, %0 : index %c43 = arith.constant 43 : index %c42_0 = arith.constant 42 : index %4 = arith.remsi %c43, %c42_0 : index %c0_1 = arith.constant 0 : index - %5 = arith.cmpi slt, %4, %c0_1 : index + %5 = arith.cmpi slt(%4, %c0_1) : index %6 = arith.addi %4, %c42_0 : index %7 = arith.select %5, %6, %4 : index return %3, %7 : index, index @@ -626,7 +626,7 @@ %c42 = arith.constant 42 : index %c0 = arith.constant 0 : index %c-1 = arith.constant -1 : index - %0 = arith.cmpi slt, %c-43, %c0 : index + %0 = arith.cmpi slt(%c-43, %c0) : index %1 = arith.subi %c-1, %c-43 : index %2 = arith.select %0, %1, %c-43 : index %3 = arith.divsi %2, %c42 : index @@ -636,7 +636,7 @@ %c42_0 = arith.constant 42 : index %c0_1 = arith.constant 0 : index %c-1_2 = arith.constant -1 : index - %6 = arith.cmpi slt, %c43, %c0_1 : index + %6 = arith.cmpi slt(%c43, %c0_1) : index %7 = arith.subi %c-1_2, %c43 : index %8 = arith.select %6, %7, %c43 : index %9 = arith.divsi %8, %c42_0 : index @@ -657,7 +657,7 @@ %c42 = arith.constant 42 : index %c0 = arith.constant 0 : index %c1 = arith.constant 1 : index - %0 = arith.cmpi sle, %c-43, %c0 : index + %0 = arith.cmpi sle(%c-43, %c0) : index %1 = arith.subi %c0, %c-43 : index %2 = arith.subi %c-43, %c1 : index %3 = arith.select %0, %1, %2 : index @@ -670,7 +670,7 @@ %c42_0 = arith.constant 42 : index %c0_1 = arith.constant 0 : index %c1_2 = arith.constant 1 : index - %8 = arith.cmpi sle, %c43, %c0_1 : index + %8 = arith.cmpi sle(%c43, %c0_1) : index %9 = arith.subi %c0_1, %c43 : index %10 = arith.subi %c43, %c1_2 : index %11 = arith.select %8, %9, %10 : index @@ -1185,7 +1185,7 @@ memref.dealloc %0 : memref<2xf32> %1 = bufferization.clone %arg3 : memref<2xf32> to memref<2xf32> %2 = scf.for %arg5 = %arg0 to %arg1 step %arg2 iter_args(%arg6 = %1) -> (memref<2xf32>) { - %3 = arith.cmpi eq, %arg5, %arg1 : index + %3 = arith.cmpi eq(%arg5, %arg1) : index memref.dealloc %arg6 : memref<2xf32> %4 = memref.alloc() : memref<2xf32> %5 = bufferization.clone %4 : memref<2xf32> to memref<2xf32> @@ -1211,8 +1211,8 @@ // CHECK-LABEL: func @clone_nested_region func.func @clone_nested_region(%arg0: index, %arg1: index, %arg2: index) -> memref { - %cmp = arith.cmpi eq, %arg0, %arg1 : index - %0 = arith.cmpi eq, %arg0, %arg1 : index + %cmp = arith.cmpi eq(%arg0, %arg1) : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { %3 = scf.if %cmp -> (memref) { diff --git a/mlir/test/Transforms/constant-fold.mlir b/mlir/test/Transforms/constant-fold.mlir --- a/mlir/test/Transforms/constant-fold.mlir +++ b/mlir/test/Transforms/constant-fold.mlir @@ -601,25 +601,25 @@ // CHECK-DAG: [[F:%.+]] = arith.constant false // CHECK-DAG: [[T:%.+]] = arith.constant true // CHECK-NEXT: return [[F]], - %0 = arith.cmpi eq, %c42, %cm1 : i32 + %0 = arith.cmpi eq(%c42, %cm1) : i32 // CHECK-SAME: [[T]], - %1 = arith.cmpi ne, %c42, %cm1 : i32 + %1 = arith.cmpi ne(%c42, %cm1) : i32 // CHECK-SAME: [[F]], - %2 = arith.cmpi slt, %c42, %cm1 : i32 + %2 = arith.cmpi slt(%c42, %cm1) : i32 // CHECK-SAME: [[F]], - %3 = arith.cmpi sle, %c42, %cm1 : i32 + %3 = arith.cmpi sle(%c42, %cm1) : i32 // CHECK-SAME: [[T]], - %4 = arith.cmpi sgt, %c42, %cm1 : i32 + %4 = arith.cmpi sgt(%c42, %cm1) : i32 // CHECK-SAME: [[T]], - %5 = arith.cmpi sge, %c42, %cm1 : i32 + %5 = arith.cmpi sge(%c42, %cm1) : i32 // CHECK-SAME: [[T]], - %6 = arith.cmpi ult, %c42, %cm1 : i32 + %6 = arith.cmpi ult(%c42, %cm1) : i32 // CHECK-SAME: [[T]], - %7 = arith.cmpi ule, %c42, %cm1 : i32 + %7 = arith.cmpi ule(%c42, %cm1) : i32 // CHECK-SAME: [[F]], - %8 = arith.cmpi ugt, %c42, %cm1 : i32 + %8 = arith.cmpi ugt(%c42, %cm1) : i32 // CHECK-SAME: [[F]] - %9 = arith.cmpi uge, %c42, %cm1 : i32 + %9 = arith.cmpi uge(%c42, %cm1) : i32 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } @@ -632,37 +632,37 @@ // CHECK-DAG: [[F:%.+]] = arith.constant false // CHECK-DAG: [[T:%.+]] = arith.constant true // CHECK-NEXT: return [[F]], - %0 = arith.cmpf false, %c42, %cm1 : f32 + %0 = arith.cmpf false(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %1 = arith.cmpf oeq, %c42, %cm1 : f32 + %1 = arith.cmpf oeq(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %2 = arith.cmpf ogt, %c42, %cm1 : f32 + %2 = arith.cmpf ogt(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %3 = arith.cmpf oge, %c42, %cm1 : f32 + %3 = arith.cmpf oge(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %4 = arith.cmpf olt, %c42, %cm1 : f32 + %4 = arith.cmpf olt(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %5 = arith.cmpf ole, %c42, %cm1 : f32 + %5 = arith.cmpf ole(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %6 = arith.cmpf one, %c42, %cm1 : f32 + %6 = arith.cmpf one(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %7 = arith.cmpf ord, %c42, %cm1 : f32 + %7 = arith.cmpf ord(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %8 = arith.cmpf ueq, %c42, %cm1 : f32 + %8 = arith.cmpf ueq(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %9 = arith.cmpf ugt, %c42, %cm1 : f32 + %9 = arith.cmpf ugt(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %10 = arith.cmpf uge, %c42, %cm1 : f32 + %10 = arith.cmpf uge(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %11 = arith.cmpf ult, %c42, %cm1 : f32 + %11 = arith.cmpf ult(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %12 = arith.cmpf ule, %c42, %cm1 : f32 + %12 = arith.cmpf ule(%c42, %cm1) : f32 // CHECK-SAME: [[T]], - %13 = arith.cmpf une, %c42, %cm1 : f32 + %13 = arith.cmpf une(%c42, %cm1) : f32 // CHECK-SAME: [[F]], - %14 = arith.cmpf uno, %c42, %cm1 : f32 + %14 = arith.cmpf uno(%c42, %cm1) : f32 // CHECK-SAME: [[T]] - %15 = arith.cmpf true, %c42, %cm1 : f32 + %15 = arith.cmpf true(%c42, %cm1) : f32 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } @@ -675,37 +675,37 @@ // CHECK-DAG: [[F:%.+]] = arith.constant false // CHECK-DAG: [[T:%.+]] = arith.constant true // CHECK-NEXT: return [[F]], - %0 = arith.cmpf false, %c42, %cqnan : f32 + %0 = arith.cmpf false(%c42, %cqnan) : f32 // CHECK-SAME: [[F]] - %1 = arith.cmpf oeq, %c42, %cqnan : f32 + %1 = arith.cmpf oeq(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %2 = arith.cmpf ogt, %c42, %cqnan : f32 + %2 = arith.cmpf ogt(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %3 = arith.cmpf oge, %c42, %cqnan : f32 + %3 = arith.cmpf oge(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %4 = arith.cmpf olt, %c42, %cqnan : f32 + %4 = arith.cmpf olt(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %5 = arith.cmpf ole, %c42, %cqnan : f32 + %5 = arith.cmpf ole(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %6 = arith.cmpf one, %c42, %cqnan : f32 + %6 = arith.cmpf one(%c42, %cqnan) : f32 // CHECK-SAME: [[F]], - %7 = arith.cmpf ord, %c42, %cqnan : f32 + %7 = arith.cmpf ord(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %8 = arith.cmpf ueq, %c42, %cqnan : f32 + %8 = arith.cmpf ueq(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %9 = arith.cmpf ugt, %c42, %cqnan : f32 + %9 = arith.cmpf ugt(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %10 = arith.cmpf uge, %c42, %cqnan : f32 + %10 = arith.cmpf uge(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %11 = arith.cmpf ult, %c42, %cqnan : f32 + %11 = arith.cmpf ult(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %12 = arith.cmpf ule, %c42, %cqnan : f32 + %12 = arith.cmpf ule(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %13 = arith.cmpf une, %c42, %cqnan : f32 + %13 = arith.cmpf une(%c42, %cqnan) : f32 // CHECK-SAME: [[T]], - %14 = arith.cmpf uno, %c42, %cqnan : f32 + %14 = arith.cmpf uno(%c42, %cqnan) : f32 // CHECK-SAME: [[T]] - %15 = arith.cmpf true, %c42, %cqnan : f32 + %15 = arith.cmpf true(%c42, %cqnan) : f32 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } @@ -718,37 +718,37 @@ // CHECK-DAG: [[F:%.+]] = arith.constant false // CHECK-DAG: [[T:%.+]] = arith.constant true // CHECK-NEXT: return [[F]], - %0 = arith.cmpf false, %c42, %cpinf: f32 + %0 = arith.cmpf false(%c42, %cpinf) : f32 // CHECK-SAME: [[F]] - %1 = arith.cmpf oeq, %c42, %cpinf: f32 + %1 = arith.cmpf oeq(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %2 = arith.cmpf ogt, %c42, %cpinf: f32 + %2 = arith.cmpf ogt(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %3 = arith.cmpf oge, %c42, %cpinf: f32 + %3 = arith.cmpf oge(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %4 = arith.cmpf olt, %c42, %cpinf: f32 + %4 = arith.cmpf olt(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %5 = arith.cmpf ole, %c42, %cpinf: f32 + %5 = arith.cmpf ole(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %6 = arith.cmpf one, %c42, %cpinf: f32 + %6 = arith.cmpf one(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %7 = arith.cmpf ord, %c42, %cpinf: f32 + %7 = arith.cmpf ord(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %8 = arith.cmpf ueq, %c42, %cpinf: f32 + %8 = arith.cmpf ueq(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %9 = arith.cmpf ugt, %c42, %cpinf: f32 + %9 = arith.cmpf ugt(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %10 = arith.cmpf uge, %c42, %cpinf: f32 + %10 = arith.cmpf uge(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %11 = arith.cmpf ult, %c42, %cpinf: f32 + %11 = arith.cmpf ult(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %12 = arith.cmpf ule, %c42, %cpinf: f32 + %12 = arith.cmpf ule(%c42, %cpinf) : f32 // CHECK-SAME: [[T]], - %13 = arith.cmpf une, %c42, %cpinf: f32 + %13 = arith.cmpf une(%c42, %cpinf) : f32 // CHECK-SAME: [[F]], - %14 = arith.cmpf uno, %c42, %cpinf: f32 + %14 = arith.cmpf uno(%c42, %cpinf) : f32 // CHECK-SAME: [[T]] - %15 = arith.cmpf true, %c42, %cpinf: f32 + %15 = arith.cmpf true(%c42, %cpinf) : f32 return %0, %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15 : i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1, i1 } diff --git a/mlir/test/Transforms/cse.mlir b/mlir/test/Transforms/cse.mlir --- a/mlir/test/Transforms/cse.mlir +++ b/mlir/test/Transforms/cse.mlir @@ -81,12 +81,12 @@ // CHECK-LABEL: @different_attributes func.func @different_attributes(index, index) -> (i1, i1, i1) { ^bb0(%a : index, %b : index): - // CHECK: %0 = arith.cmpi slt, %arg0, %arg1 : index - %0 = arith.cmpi slt, %a, %b : index + // CHECK: %0 = arith.cmpi slt(%arg0, %arg1) : index + %0 = arith.cmpi slt(%a, %b) : index - // CHECK-NEXT: %1 = arith.cmpi ne, %arg0, %arg1 : index + // CHECK-NEXT: %1 = arith.cmpi ne(%arg0, %arg1) : index /// Predicate 1 means inequality comparison. - %1 = arith.cmpi ne, %a, %b : index + %1 = arith.cmpi ne(%a, %b) : index %2 = "arith.cmpi"(%a, %b) {predicate = 1} : (index, index) -> i1 // CHECK-NEXT: return %0, %1, %1 : i1, i1, i1 @@ -264,7 +264,7 @@ "foo.yield"(%0) : (i32) -> () } return -} +} /// This test is checking that CSE is removing duplicated read op that follow /// other. diff --git a/mlir/test/Transforms/inlining-recursive.mlir b/mlir/test/Transforms/inlining-recursive.mlir --- a/mlir/test/Transforms/inlining-recursive.mlir +++ b/mlir/test/Transforms/inlining-recursive.mlir @@ -6,7 +6,7 @@ // CHECK: call @foo1 // CHECK: } %0 = arith.constant 0 : i32 - %1 = arith.cmpi eq, %arg0, %0 : i32 + %1 = arith.cmpi eq(%arg0, %0) : i32 cf.cond_br %1, ^exit, ^tail ^exit: return %0 : i32 diff --git a/mlir/test/Transforms/parametric-tiling.mlir b/mlir/test/Transforms/parametric-tiling.mlir --- a/mlir/test/Transforms/parametric-tiling.mlir +++ b/mlir/test/Transforms/parametric-tiling.mlir @@ -40,11 +40,11 @@ scf.for %i = %c2 to %c44 step %c1 { // Upper bound for the inner loop min(%i + %step, %c44). // COMMON: %[[stepped:.*]] = arith.addi %[[i]], %[[step]] - // COMMON-NEXT: arith.cmpi slt, %c44, %[[stepped]] + // COMMON-NEXT: arith.cmpi slt(%c44, %[[stepped]]) // COMMON-NEXT: %[[ub:.*]] = arith.select {{.*}}, %c44, %[[stepped]] // // TILE_74: %[[stepped2:.*]] = arith.addi %[[j]], %[[step2]] - // TILE_74-NEXT: arith.cmpi slt, %c44, %[[stepped2]] + // TILE_74-NEXT: arith.cmpi slt(%c44, %[[stepped2]]) // TILE_74-NEXT: %[[ub2:.*]] = arith.select {{.*}}, %c44, %[[stepped2]] // Created inner scf. @@ -108,10 +108,10 @@ scf.for %i = %c2 to %c44 step %c1 { // Upper bound for the inner loop min(%i + %step, %c44). // COMMON: %[[stepped:.*]] = arith.addi %[[i]], %[[step]] - // COMMON-NEXT: arith.cmpi slt, %c44, %[[stepped]] + // COMMON-NEXT: arith.cmpi slt(%c44, %[[stepped]]) // COMMON-NEXT: %[[ub:.*]] = arith.select {{.*}}, %c44, %[[stepped]] // TILE_74: %[[stepped2:.*]] = arith.addi %[[j]], %[[step2]] - // TILE_74-NEXT: arith.cmpi slt, %[[i]], %[[stepped2]] + // TILE_74-NEXT: arith.cmpi slt(%[[i]], %[[stepped2]]) // TILE_74-NEXT: %[[ub2:.*]] = arith.select {{.*}}, %[[i]], %[[stepped2]] // // Created inner scf. diff --git a/mlir/test/Transforms/promote-buffers-to-stack.mlir b/mlir/test/Transforms/promote-buffers-to-stack.mlir --- a/mlir/test/Transforms/promote-buffers-to-stack.mlir +++ b/mlir/test/Transforms/promote-buffers-to-stack.mlir @@ -416,7 +416,7 @@ func.func @nested_region_control_flow( %arg0 : index, %arg1 : index) -> memref { - %0 = arith.cmpi eq, %arg0, %arg1 : index + %0 = arith.cmpi eq(%arg0, %arg1) : index %1 = memref.alloc(%arg0, %arg0) : memref %2 = scf.if %0 -> (memref) { scf.yield %1 : memref @@ -481,7 +481,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = memref.alloc() : memref<2xf32> scf.yield %3 : memref<2xf32> } @@ -511,7 +511,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { scf.yield %0 : memref<2xf32> } else { @@ -546,7 +546,7 @@ %0 = memref.alloc() : memref<2xf32> %1 = scf.for %i = %lb to %ub step %step iter_args(%iterBuf = %buf) -> memref<2xf32> { - %2 = arith.cmpi eq, %i, %ub : index + %2 = arith.cmpi eq(%i, %ub) : index %3 = scf.if %2 -> (memref<2xf32>) { %4 = memref.alloc() : memref<2xf32> scf.yield %4 : memref<2xf32> diff --git a/mlir/test/Transforms/sccp-callgraph.mlir b/mlir/test/Transforms/sccp-callgraph.mlir --- a/mlir/test/Transforms/sccp-callgraph.mlir +++ b/mlir/test/Transforms/sccp-callgraph.mlir @@ -189,7 +189,7 @@ // CHECK: cf.cond_br %[[TRUE]], ^bb1 %cst_20 = arith.constant 20 : i32 - %cond = arith.cmpi ult, %arg0, %cst_20 : i32 + %cond = arith.cmpi ult(%arg0, %cst_20) : i32 cf.cond_br %cond, ^bb1, ^bb2 ^bb1: @@ -287,7 +287,7 @@ // CHECK: %[[C10:.*]] = arith.constant 10 %c0 = arith.constant 0 : index %1 = arith.constant 420 : index - %7 = arith.cmpi eq, %arg0, %c0 : index + %7 = arith.cmpi eq(%arg0, %c0) : index cf.cond_br %7, ^bb1(%1 : index), ^bb2 // CHECK: ^bb1(%[[ARG:.*]]: index): diff --git a/mlir/test/Transforms/sccp-structured.mlir b/mlir/test/Transforms/sccp-structured.mlir --- a/mlir/test/Transforms/sccp-structured.mlir +++ b/mlir/test/Transforms/sccp-structured.mlir @@ -118,7 +118,7 @@ %cst_1 = arith.constant 1 : i32 %result = scf.for %i0 = %arg0 to %arg1 step %arg2 iter_args(%si = %cst_1) -> (i32) { %cst_20 = arith.constant 20 : i32 - %cond = arith.cmpi ult, %si, %cst_20 : i32 + %cond = arith.cmpi ult(%si, %cst_20) : i32 %inner_res = scf.if %cond -> (i32) { %1 = arith.constant 1 : i32 scf.yield %1 : i32 @@ -141,7 +141,7 @@ %c2_i32 = arith.constant 2 : i32 %0 = scf.while (%arg2 = %c2_i32) : (i32) -> (i32) { - %1 = arith.cmpi sgt, %arg1, %arg2 : i32 + %1 = arith.cmpi sgt(%arg1, %arg2) : i32 scf.condition(%1) %arg2 : i32 } do { ^bb0(%arg2: i32): @@ -199,7 +199,7 @@ %c1 = arith.constant 1 : index // CHECK: %[[WHILE:.*]] = scf.while %0 = scf.while (%arg3 = %c0, %arg4 = %c1) : (index, index) -> index { - %1 = arith.cmpi slt, %arg3, %c1 : index + %1 = arith.cmpi slt(%arg3, %c1) : index // CHECK: scf.condition(%[[TRUE]]) %[[C1]] scf.condition(%1) %arg4 : index } do { @@ -219,7 +219,7 @@ %c1 = arith.constant 1 : index %0 = arith.muli %arg0, %c0 : index %1 = scf.while (%arg1 = %0) : (index) -> index { - %2 = arith.cmpi slt, %arg1, %c0 : index + %2 = arith.cmpi slt(%arg1, %c0) : index scf.condition(%2) %arg1 : index } do { ^bb0(%arg2 : index): diff --git a/mlir/test/Transforms/sccp.mlir b/mlir/test/Transforms/sccp.mlir --- a/mlir/test/Transforms/sccp.mlir +++ b/mlir/test/Transforms/sccp.mlir @@ -137,7 +137,7 @@ // CHECK: cf.cond_br %[[TRUE]], ^bb3, ^bb4 %cst_20 = arith.constant 20 : i32 - %cond = arith.cmpi ult, %iv, %cst_20 : i32 + %cond = arith.cmpi ult(%iv, %cst_20) : i32 cf.cond_br %cond, ^bb3, ^bb4 ^bb3: diff --git a/mlir/test/python/execution_engine.py b/mlir/test/python/execution_engine.py --- a/mlir/test/python/execution_engine.py +++ b/mlir/test/python/execution_engine.py @@ -1,9 +1,11 @@ # RUN: %PYTHON %s 2>&1 | FileCheck %s # REQUIRES: host-supports-jit -import gc, sys +import gc +import sys + +from mlir.execution_engine import * from mlir.ir import * from mlir.passmanager import * -from mlir.execution_engine import * from mlir.runtime import * @@ -417,7 +419,7 @@ %c1 = arith.constant 1 : index cf.br ^bb1(%c0 : index) ^bb1(%0: index): // 2 preds: ^bb0, ^bb5 - %1 = arith.cmpi slt, %0, %c2 : index + %1 = arith.cmpi slt(%0, %c2) : index cf.cond_br %1, ^bb2, ^bb6 ^bb2: // pred: ^bb1 %c0_0 = arith.constant 0 : index @@ -425,7 +427,7 @@ %c1_2 = arith.constant 1 : index cf.br ^bb3(%c0_0 : index) ^bb3(%2: index): // 2 preds: ^bb2, ^bb4 - %3 = arith.cmpi slt, %2, %c2_1 : index + %3 = arith.cmpi slt(%2, %c2_1) : index cf.cond_br %3, ^bb4, ^bb5 ^bb4: // pred: ^bb3 %4 = memref.load %arg0[%0, %2] : memref<2x2xf32>