Skip to content

Commit 76a3cd1

Browse files
committed
Remove br i1 undef in LoopDeletion directory
1 parent 91bd34f commit 76a3cd1

File tree

6 files changed

+35
-35
lines changed

6 files changed

+35
-35
lines changed

llvm/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
1313
%"class.llvm::SmallVectorTemplateCommon" = type { %"class.llvm::SmallVectorBase" }
1414
%"union.llvm::SmallVectorBase::U" = type { x86_fp80 }
1515

16-
define void @_ZNK5clang6driver7ArgList20AddAllArgsTranslatedERN4llvm11SmallVectorIPKcLj16EEENS0_12OptSpecifierES5_b(i1 zeroext %Joined) nounwind align 2 {
16+
define void @_ZNK5clang6driver7ArgList20AddAllArgsTranslatedERN4llvm11SmallVectorIPKcLj16EEENS0_12OptSpecifierES5_b(i1 zeroext %Joined, i1 %arg) nounwind align 2 {
1717
entry:
18-
br i1 undef, label %entry.split.us, label %entry.entry.split_crit_edge
18+
br i1 %arg, label %entry.split.us, label %entry.entry.split_crit_edge
1919

2020
entry.entry.split_crit_edge: ; preds = %entry
2121
br label %entry.split
@@ -39,10 +39,10 @@ entry.split: ; preds = %entry.entry.split_c
3939
br label %for.cond.i14
4040

4141
for.cond.i14: ; preds = %for.inc.i38, %entry.split
42-
br i1 undef, label %for.cond.i50.us-lcssa, label %if.end.i23
42+
br i1 %arg, label %for.cond.i50.us-lcssa, label %if.end.i23
4343

4444
if.end.i23: ; preds = %for.cond.i14
45-
br i1 undef, label %for.cond.i50.us-lcssa, label %for.inc.i38
45+
br i1 %arg, label %for.cond.i50.us-lcssa, label %for.inc.i38
4646

4747
for.inc.i38: ; preds = %if.end.i23
4848
br label %for.cond.i14
@@ -60,52 +60,52 @@ for.cond.loopexit: ; preds = %for.cond.loopexit.u
6060
br label %for.cond
6161

6262
for.cond: ; preds = %for.cond.loopexit, %for.cond.i50
63-
br i1 undef, label %for.end, label %for.body
63+
br i1 %arg, label %for.end, label %for.body
6464

6565
for.body: ; preds = %for.cond
6666
br i1 %Joined, label %if.then, label %if.else
6767

6868
if.then: ; preds = %for.body
69-
br i1 undef, label %cond.false.i.i, label %_ZN4llvm9StringRefC1EPKc.exit
69+
br i1 %arg, label %cond.false.i.i, label %_ZN4llvm9StringRefC1EPKc.exit
7070

7171
cond.false.i.i: ; preds = %if.then
7272
unreachable
7373

7474
_ZN4llvm9StringRefC1EPKc.exit: ; preds = %if.then
75-
br i1 undef, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit, label %cond.false.i.i91
75+
br i1 %arg, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit, label %cond.false.i.i91
7676

7777
cond.false.i.i91: ; preds = %_ZN4llvm9StringRefC1EPKc.exit
7878
unreachable
7979

8080
_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit: ; preds = %_ZN4llvm9StringRefC1EPKc.exit
81-
br i1 undef, label %cond.false.i.i.i, label %if.end13.i.i.i.i
81+
br i1 %arg, label %cond.false.i.i.i, label %if.end13.i.i.i.i
8282

8383
if.end13.i.i.i.i: ; preds = %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit
84-
br i1 undef, label %land.lhs.true16.i.i.i.i, label %if.end19.i.i.i.i
84+
br i1 %arg, label %land.lhs.true16.i.i.i.i, label %if.end19.i.i.i.i
8585

8686
land.lhs.true16.i.i.i.i: ; preds = %if.end13.i.i.i.i
87-
br i1 undef, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i
87+
br i1 %arg, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i
8888

8989
_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i: ; preds = %land.lhs.true16.i.i.i.i
90-
br i1 undef, label %cond.false.i.i.i, label %if.end19.i.i.i.i
90+
br i1 %arg, label %cond.false.i.i.i, label %if.end19.i.i.i.i
9191

9292
if.end19.i.i.i.i: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i, %if.end13.i.i.i.i
93-
br i1 undef, label %land.lhs.true22.i.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
93+
br i1 %arg, label %land.lhs.true22.i.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
9494

9595
land.lhs.true22.i.i.i.i: ; preds = %if.end19.i.i.i.i
96-
br i1 undef, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i
96+
br i1 %arg, label %cond.false.i.i.i, label %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i
9797

9898
_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i: ; preds = %land.lhs.true22.i.i.i.i
99-
br i1 undef, label %cond.false.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
99+
br i1 %arg, label %cond.false.i.i.i, label %_ZN4llvmplERKNS_9StringRefEPKc.exit
100100

101101
cond.false.i.i.i: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i, %land.lhs.true22.i.i.i.i, %_ZNK4llvm5Twine8isBinaryEv.exit8.i.i.i.i, %land.lhs.true16.i.i.i.i, %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit
102102
unreachable
103103

104104
_ZN4llvmplERKNS_9StringRefEPKc.exit: ; preds = %_ZNK4llvm5Twine8isBinaryEv.exit.i.i.i.i, %if.end19.i.i.i.i
105-
br i1 undef, label %Retry.i, label %if.end.i99
105+
br i1 %arg, label %Retry.i, label %if.end.i99
106106

107107
Retry.i: ; preds = %if.end.i99, %_ZN4llvmplERKNS_9StringRefEPKc.exit
108-
br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit, label %new.notnull.i
108+
br i1 %arg, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit, label %new.notnull.i
109109

110110
new.notnull.i: ; preds = %Retry.i
111111
br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit
@@ -117,10 +117,10 @@ _ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit: ; preds = %new.notnull.i, %
117117
br label %for.cond.i.preheader
118118

119119
if.else: ; preds = %for.body
120-
br i1 undef, label %Retry.i108, label %if.end.i113
120+
br i1 %arg, label %Retry.i108, label %if.end.i113
121121

122122
Retry.i108: ; preds = %if.end.i113, %if.else
123-
br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114, label %new.notnull.i110
123+
br i1 %arg, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114, label %new.notnull.i110
124124

125125
new.notnull.i110: ; preds = %Retry.i108
126126
br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
@@ -129,16 +129,16 @@ if.end.i113: ; preds = %if.else
129129
br label %Retry.i108
130130

131131
_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114: ; preds = %new.notnull.i110, %Retry.i108
132-
br i1 undef, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125, label %cond.false.i.i123
132+
br i1 %arg, label %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125, label %cond.false.i.i123
133133

134134
cond.false.i.i123: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
135135
unreachable
136136

137137
_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit114
138-
br i1 undef, label %Retry.i134, label %if.end.i139
138+
br i1 %arg, label %Retry.i134, label %if.end.i139
139139

140140
Retry.i134: ; preds = %if.end.i139, %_ZNK5clang6driver3Arg8getValueERKNS0_7ArgListEj.exit125
141-
br i1 undef, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140, label %new.notnull.i136
141+
br i1 %arg, label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140, label %new.notnull.i136
142142

143143
new.notnull.i136: ; preds = %Retry.i134
144144
br label %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140
@@ -150,7 +150,7 @@ _ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140: ; preds = %new.notnull.i
150150
br label %for.cond.i.preheader
151151

152152
for.cond.i.preheader: ; preds = %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit140, %_ZN4llvm15SmallVectorImplIPKcE9push_backERKS2_.exit
153-
br i1 undef, label %for.cond.i.preheader.split.us, label %for.cond.i.preheader.for.cond.i.preheader.split_crit_edge
153+
br i1 %arg, label %for.cond.i.preheader.split.us, label %for.cond.i.preheader.for.cond.i.preheader.split_crit_edge
154154

155155
for.cond.i.preheader.for.cond.i.preheader.split_crit_edge: ; preds = %for.cond.i.preheader
156156
br label %for.cond.i.preheader.split
@@ -172,10 +172,10 @@ for.cond.i.preheader.split: ; preds = %for.cond.i.preheade
172172
br label %for.cond.i
173173

174174
for.cond.i: ; preds = %if.end.i, %for.cond.i.preheader.split
175-
br i1 undef, label %for.cond.loopexit.us-lcssa, label %if.end.i
175+
br i1 %arg, label %for.cond.loopexit.us-lcssa, label %if.end.i
176176

177177
if.end.i: ; preds = %for.cond.i
178-
br i1 undef, label %for.cond.loopexit.us-lcssa, label %for.cond.i
178+
br i1 %arg, label %for.cond.loopexit.us-lcssa, label %for.cond.i
179179

180180
for.end: ; preds = %for.cond
181181
ret void

llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ entry:
1717
br label %for.cond
1818

1919
for.cond: ; preds = %entry
20-
br i1 undef, label %lbl63A679E5, label %for.body
20+
br i1 true, label %lbl63A679E5, label %for.body
2121

2222
for.body: ; preds = %for.cond
2323
br label %for.cond1
2424

2525
for.cond1: ; preds = %for.cond1, %for.body
26-
br i1 undef, label %for.cond1, label %for.cond3.loopexit
26+
br i1 false, label %for.cond1, label %for.cond3.loopexit
2727

2828
for.cond3.loopexit: ; preds = %for.cond1
2929
br label %for.cond3
3030

3131
for.cond3: ; preds = %for.cond9, %for.cond3.loopexit
32-
br i1 undef, label %for.body4, label %for.cond17
32+
br i1 false, label %for.body4, label %for.cond17
3333

3434
for.body4: ; preds = %for.cond3
3535
br label %for.cond5
@@ -41,7 +41,7 @@ lbl63A679E5: ; preds = %for.cond
4141
br label %for.cond5
4242

4343
for.cond9: ; preds = %for.end14.split, %for.cond5
44-
br i1 undef, label %for.cond3, label %lbl64774A9B
44+
br i1 false, label %for.cond3, label %lbl64774A9B
4545

4646
lbl64774A9B: ; preds = %for.cond17, %for.cond9
4747
br label %for.end14.split

llvm/test/Transforms/LoopDeletion/bbi-59728.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ for.body45: ; preds = %for.end72, %entry
2020

2121
for.body48: ; preds = %for.body48, %for.body45
2222
store i32 433429641, ptr undef, align 1
23-
br i1 undef, label %for.body48, label %for.end72
23+
br i1 false, label %for.body48, label %for.end72
2424

2525
for.end72: ; preds = %for.body48
2626
br label %for.body45

llvm/test/Transforms/LoopDeletion/crashbc.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
; RUN: opt < %s -passes=loop-deletion -o /dev/null
33
; RUN: opt < %s -passes=loop-deletion -o /dev/null --try-experimental-debuginfo-iterators
44

5-
define void @f() {
5+
define void @f(i1 %arg) {
66
br label %bb1
77

88
bb1: ; preds = %bb1, %0
99
call void @llvm.dbg.value(metadata i16 undef, metadata !1, metadata !DIExpression()), !dbg !11
10-
br i1 undef, label %bb1, label %bb3
10+
br i1 %arg, label %bb1, label %bb3
1111

1212
bb3: ; preds = %bb1
1313
ret void

llvm/test/Transforms/LoopDeletion/pr53969.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bb1: ; preds = %bb31, %bb
6666
br i1 %tmp10, label %bb33, label %bb34
6767

6868
bb11: ; preds = %bb34
69-
br i1 undef, label %bb33, label %bb34
69+
br i1 true, label %bb33, label %bb34
7070

7171
bb12: ; preds = %bb34
7272
%tmp13 = icmp eq ptr addrspace(1) undef, null
@@ -113,7 +113,7 @@ bb34: ; preds = %bb11, %bb1
113113
%tmp39 = add i32 %tmp38, undef
114114
%tmp40 = sext i32 %tmp39 to i64
115115
%tmp41 = add i64 undef, %tmp40
116-
br i1 undef, label %bb11, label %bb12
116+
br i1 false, label %bb11, label %bb12
117117

118118
bb42: ; preds = %bb22
119119
store atomic i64 %tmp18, ptr addrspace(1) undef unordered, align 8

llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
target datalayout = "e-p:64:64:64"
99

10-
define i32 @pmat(i32 %m, i32 %n, ptr %y) nounwind {
10+
define i32 @pmat(i32 %m, i32 %n, ptr %y, i1 %arg) nounwind {
1111
; CHECK-LABEL: @pmat(
1212
; CHECK-NEXT: entry:
1313
; CHECK-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[M:%.*]], 0
@@ -45,7 +45,7 @@ w.c2.p:
4545
br i1 false, label %bb.n, label %w.e
4646

4747
w.c2:
48-
br i1 undef, label %w.b6, label %w.c2.w.ec
48+
br i1 %arg, label %w.b6, label %w.c2.w.ec
4949

5050
w.c2.w.ec:
5151
br label %w.e

0 commit comments

Comments
 (0)