@@ -15,17 +15,15 @@ func.func @ceildivi(%arg0: i32, %arg1: i32) -> (i32) {
1515// CHECK: [[TRUE1:%.+]] = arith.addi [[X]], [[ARG0]] : i32
1616// CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : i32
1717// CHECK: [[TRUE3:%.+]] = arith.addi [[ONE]], [[TRUE2]] : i32
18- // CHECK: [[FALSE1:%.+]] = arith.subi [[ZERO]], [[ARG0]] : i32
19- // CHECK: [[FALSE2:%.+]] = arith.divsi [[FALSE1]], [[ARG1]] : i32
20- // CHECK: [[FALSE3:%.+]] = arith.subi [[ZERO]], [[FALSE2]] : i32
18+ // CHECK: [[FALSE:%.+]] = arith.divsi [[ARG0]], [[ARG1]] : i32
2119// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : i32
2220// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : i32
2321// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : i32
2422// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : i32
2523// CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MNEG]] : i1
2624// CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MPOS]] : i1
2725// CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1
28- // CHECK: [[RES:%.+]] = arith.select [[CMP2]], [[TRUE3]], [[FALSE3 ]] : i32
26+ // CHECK: [[RES:%.+]] = arith.select [[CMP2]], [[TRUE3]], [[FALSE ]] : i32
2927}
3028
3129// -----
@@ -45,17 +43,15 @@ func.func @ceildivi_index(%arg0: index, %arg1: index) -> (index) {
4543// CHECK: [[TRUE1:%.+]] = arith.addi [[X]], [[ARG0]] : index
4644// CHECK: [[TRUE2:%.+]] = arith.divsi [[TRUE1]], [[ARG1]] : index
4745// CHECK: [[TRUE3:%.+]] = arith.addi [[ONE]], [[TRUE2]] : index
48- // CHECK: [[FALSE1:%.+]] = arith.subi [[ZERO]], [[ARG0]] : index
49- // CHECK: [[FALSE2:%.+]] = arith.divsi [[FALSE1]], [[ARG1]] : index
50- // CHECK: [[FALSE3:%.+]] = arith.subi [[ZERO]], [[FALSE2]] : index
46+ // CHECK: [[FALSE:%.+]] = arith.divsi [[ARG0]], [[ARG1]] : index
5147// CHECK: [[NNEG:%.+]] = arith.cmpi slt, [[ARG0]], [[ZERO]] : index
5248// CHECK: [[NPOS:%.+]] = arith.cmpi sgt, [[ARG0]], [[ZERO]] : index
5349// CHECK: [[MNEG:%.+]] = arith.cmpi slt, [[ARG1]], [[ZERO]] : index
5450// CHECK: [[MPOS:%.+]] = arith.cmpi sgt, [[ARG1]], [[ZERO]] : index
5551// CHECK: [[TERM1:%.+]] = arith.andi [[NNEG]], [[MNEG]] : i1
5652// CHECK: [[TERM2:%.+]] = arith.andi [[NPOS]], [[MPOS]] : i1
5753// CHECK: [[CMP2:%.+]] = arith.ori [[TERM1]], [[TERM2]] : i1
58- // CHECK: [[RES:%.+]] = arith.select [[CMP2]], [[TRUE3]], [[FALSE3 ]] : index
54+ // CHECK: [[RES:%.+]] = arith.select [[CMP2]], [[TRUE3]], [[FALSE ]] : index
5955}
6056
6157// -----
0 commit comments