[llvm] 00f773c - [SCCP] Fix misclassified conditions in test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 13:33:48 PST 2021
Author: Nikita Popov
Date: 2021-01-11T22:33:34+01:00
New Revision: 00f773cf424699d8eb31591fdc95e0ca18b2682c
URL: https://github.com/llvm/llvm-project/commit/00f773cf424699d8eb31591fdc95e0ca18b2682c
DIFF: https://github.com/llvm/llvm-project/commit/00f773cf424699d8eb31591fdc95e0ca18b2682c.diff
LOG: [SCCP] Fix misclassified conditions in test (NFC)
Added:
Modified:
llvm/test/Transforms/SCCP/conditions-ranges.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SCCP/conditions-ranges.ll b/llvm/test/Transforms/SCCP/conditions-ranges.ll
index dada59099d81..65c3440a207c 100644
--- a/llvm/test/Transforms/SCCP/conditions-ranges.ll
+++ b/llvm/test/Transforms/SCCP/conditions-ranges.ll
@@ -984,12 +984,8 @@ define void @f18_conditions_chained_and(i32 %a, i32 %b) {
; CHECK-NEXT: call void @use(i1 [[F_2]])
; CHECK-NEXT: [[F_3:%.*]] = icmp ugt i32 [[A]], 100
; CHECK-NEXT: call void @use(i1 [[F_3]])
-; CHECK-NEXT: [[F_4:%.*]] = icmp eq i32 [[B]], 0
-; CHECK-NEXT: call void @use(i1 [[F_3]])
-; CHECK-NEXT: [[F_5:%.*]] = icmp eq i32 [[B]], 20
-; CHECK-NEXT: call void @use(i1 [[F_5]])
-; CHECK-NEXT: [[F_6:%.*]] = icmp ugt i32 [[B]], 100
-; CHECK-NEXT: call void @use(i1 [[F_6]])
+; CHECK-NEXT: [[F_4:%.*]] = icmp ugt i32 [[B]], 100
+; CHECK-NEXT: call void @use(i1 [[F_4]])
; CHECK-NEXT: [[T_1:%.*]] = icmp ult i32 [[A]], 100
; CHECK-NEXT: call void @use(i1 [[T_1]])
; CHECK-NEXT: [[T_2:%.*]] = icmp ne i32 [[A]], 20
@@ -1000,16 +996,20 @@ define void @f18_conditions_chained_and(i32 %a, i32 %b) {
; CHECK-NEXT: call void @use(i1 [[C_2]])
; CHECK-NEXT: [[C_3:%.*]] = icmp ugt i32 [[A]], 50
; CHECK-NEXT: call void @use(i1 [[C_3]])
+; CHECK-NEXT: [[C_4:%.*]] = icmp eq i32 [[B]], 0
+; CHECK-NEXT: call void @use(i1 [[C_4]])
+; CHECK-NEXT: [[C_5:%.*]] = icmp eq i32 [[B]], 20
+; CHECK-NEXT: call void @use(i1 [[C_5]])
; CHECK-NEXT: ret void
; CHECK: false:
-; CHECK-NEXT: [[F_7:%.*]] = icmp eq i32 [[A]], 50
-; CHECK-NEXT: call void @use(i1 [[F_7]])
+; CHECK-NEXT: [[F_5:%.*]] = icmp eq i32 [[A]], 50
+; CHECK-NEXT: call void @use(i1 [[F_5]])
; CHECK-NEXT: [[T_3:%.*]] = icmp ne i32 [[A]], 50
; CHECK-NEXT: call void @use(i1 [[T_3]])
-; CHECK-NEXT: [[C_4:%.*]] = icmp eq i32 [[A]], 10
-; CHECK-NEXT: call void @use(i1 [[C_4]])
-; CHECK-NEXT: [[C_5:%.*]] = icmp eq i32 [[B]], 100
-; CHECK-NEXT: call void @use(i1 [[C_5]])
+; CHECK-NEXT: [[C_6:%.*]] = icmp eq i32 [[A]], 10
+; CHECK-NEXT: call void @use(i1 [[C_6]])
+; CHECK-NEXT: [[C_7:%.*]] = icmp eq i32 [[B]], 100
+; CHECK-NEXT: call void @use(i1 [[C_7]])
; CHECK-NEXT: ret void
;
entry:
@@ -1028,12 +1028,8 @@ true: ; %a in [21, 100)
call void @use(i1 %f.2)
%f.3 = icmp ugt i32 %a, 100
call void @use(i1 %f.3)
- %f.4 = icmp eq i32 %b, 0
- call void @use(i1 %f.3)
- %f.5 = icmp eq i32 %b, 20
- call void @use(i1 %f.5)
- %f.6 = icmp ugt i32 %b, 100
- call void @use(i1 %f.6)
+ %f.4 = icmp ugt i32 %b, 100
+ call void @use(i1 %f.4)
; Conditions below are true.
@@ -1049,22 +1045,26 @@ true: ; %a in [21, 100)
call void @use(i1 %c.2)
%c.3 = icmp ugt i32 %a, 50
call void @use(i1 %c.3)
+ %c.4 = icmp eq i32 %b, 0
+ call void @use(i1 %c.4)
+ %c.5 = icmp eq i32 %b, 20
+ call void @use(i1 %c.5)
ret void
false:
; Conditions below are false;
- %f.7 = icmp eq i32 %a, 50
- call void @use(i1 %f.7)
+ %f.5 = icmp eq i32 %a, 50
+ call void @use(i1 %f.5)
; Conditions below are true;
%t.3 = icmp ne i32 %a, 50
call void @use(i1 %t.3)
; Conditions below cannot be simplified.
- %c.4 = icmp eq i32 %a, 10
- call void @use(i1 %c.4)
- %c.5 = icmp eq i32 %b, 100
- call void @use(i1 %c.5)
+ %c.6 = icmp eq i32 %a, 10
+ call void @use(i1 %c.6)
+ %c.7 = icmp eq i32 %b, 100
+ call void @use(i1 %c.7)
ret void
}
More information about the llvm-commits
mailing list