@@ -1468,10 +1468,7 @@ entry:
14681468define i1 @test_icmp_slt_mul_known_sgt (i64 %x , i64 %z ) {
14691469; CHECK-LABEL: @test_icmp_slt_mul_known_sgt(
14701470; CHECK-NEXT: entry:
1471- ; CHECK-NEXT: [[Y:%.*]] = add nsw i64 [[X:%.*]], 1
1472- ; CHECK-NEXT: [[MUL1:%.*]] = mul nsw i64 [[X]], [[Z:%.*]]
1473- ; CHECK-NEXT: [[MUL2:%.*]] = mul nsw i64 [[Y]], [[Z]]
1474- ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[MUL1]], [[MUL2]]
1471+ ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[Z:%.*]], 0
14751472; CHECK-NEXT: ret i1 [[CMP]]
14761473;
14771474entry:
@@ -1485,10 +1482,7 @@ entry:
14851482define i1 @test_icmp_sle_mul_known_sgt (i64 %x , i64 %z ) {
14861483; CHECK-LABEL: @test_icmp_sle_mul_known_sgt(
14871484; CHECK-NEXT: entry:
1488- ; CHECK-NEXT: [[Y:%.*]] = add nsw i64 [[X:%.*]], 1
1489- ; CHECK-NEXT: [[MUL1:%.*]] = mul nsw i64 [[X]], [[Z:%.*]]
1490- ; CHECK-NEXT: [[MUL2:%.*]] = mul nsw i64 [[Y]], [[Z]]
1491- ; CHECK-NEXT: [[CMP:%.*]] = icmp sle i64 [[MUL1]], [[MUL2]]
1485+ ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[Z:%.*]], -1
14921486; CHECK-NEXT: ret i1 [[CMP]]
14931487;
14941488entry:
@@ -1502,10 +1496,7 @@ entry:
15021496define i1 @test_icmp_mul_known_slt (i64 %x , i64 %z ) {
15031497; CHECK-LABEL: @test_icmp_mul_known_slt(
15041498; CHECK-NEXT: entry:
1505- ; CHECK-NEXT: [[Y:%.*]] = add nsw i64 [[X:%.*]], 1
1506- ; CHECK-NEXT: [[MUL1:%.*]] = mul nsw i64 [[X]], [[Z:%.*]]
1507- ; CHECK-NEXT: [[MUL2:%.*]] = mul nsw i64 [[Y]], [[Z]]
1508- ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[MUL2]], [[MUL1]]
1499+ ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[Z:%.*]], 0
15091500; CHECK-NEXT: ret i1 [[CMP]]
15101501;
15111502entry:
@@ -1519,10 +1510,7 @@ entry:
15191510define i1 @test_icmp_slt_mul_known_sgt_commuted1 (i64 %x , i64 %z ) {
15201511; CHECK-LABEL: @test_icmp_slt_mul_known_sgt_commuted1(
15211512; CHECK-NEXT: entry:
1522- ; CHECK-NEXT: [[Y:%.*]] = add nsw i64 [[X:%.*]], 1
1523- ; CHECK-NEXT: [[MUL1:%.*]] = mul nsw i64 [[Z:%.*]], [[X]]
1524- ; CHECK-NEXT: [[MUL2:%.*]] = mul nsw i64 [[Y]], [[Z]]
1525- ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[MUL1]], [[MUL2]]
1513+ ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[Z:%.*]], 0
15261514; CHECK-NEXT: ret i1 [[CMP]]
15271515;
15281516entry:
@@ -1536,10 +1524,7 @@ entry:
15361524define i1 @test_icmp_slt_mul_known_sgt_commuted2 (i64 %x , i64 %z ) {
15371525; CHECK-LABEL: @test_icmp_slt_mul_known_sgt_commuted2(
15381526; CHECK-NEXT: entry:
1539- ; CHECK-NEXT: [[Y:%.*]] = add nsw i64 [[X:%.*]], 1
1540- ; CHECK-NEXT: [[MUL1:%.*]] = mul nsw i64 [[X]], [[Z:%.*]]
1541- ; CHECK-NEXT: [[MUL2:%.*]] = mul nsw i64 [[Z]], [[Y]]
1542- ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[MUL1]], [[MUL2]]
1527+ ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[Z:%.*]], 0
15431528; CHECK-NEXT: ret i1 [[CMP]]
15441529;
15451530entry:
0 commit comments