Skip to content

Commit 96c7233

Browse files
authored
[llvm] Remove br i1 undef from some llvm/test/CodeGen tests (llvm#128272)
1 parent 2ebc69a commit 96c7233

14 files changed

+29
-28
lines changed

llvm/test/CodeGen/AArch64/arm64-early-ifcvt.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,13 @@ done:
395395

396396
; This function from 175.vpr folds an ADDWri into a CSINC.
397397
; Remember to clear the kill flag on the ADDWri.
398-
define i32 @get_ytrack_to_xtracks() nounwind ssp {
398+
define i32 @get_ytrack_to_xtracks(i1 %arg) nounwind ssp {
399399
entry:
400400
br label %for.body
401401

402402
for.body:
403403
%x0 = load i32, ptr undef, align 4
404-
br i1 undef, label %if.then.i146, label %is_sbox.exit155
404+
br i1 %arg, label %if.then.i146, label %is_sbox.exit155
405405

406406
if.then.i146:
407407
%add8.i143 = add nsw i32 0, %x0
@@ -414,7 +414,7 @@ is_sbox.exit155: ; preds = %if.then.i146, %for.
414414
%idxprom15.i152 = sext i32 %seg_offset.0.i151 to i64
415415
%arrayidx18.i154 = getelementptr inbounds i32, ptr null, i64 %idxprom15.i152
416416
%x1 = load i32, ptr %arrayidx18.i154, align 4
417-
br i1 undef, label %for.body51, label %for.body
417+
br i1 %arg, label %for.body51, label %for.body
418418

419419
for.body51: ; preds = %is_sbox.exit155
420420
call fastcc void @get_switch_type(i32 %x1, i32 undef, i16 signext undef, i16 signext undef, ptr undef)

llvm/test/CodeGen/AArch64/swift-error-unreachable-use.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ thirtythree:
3333
br i1 false, label %UelOc2l.exit, label %thirtythree
3434

3535
thirtyeight:
36-
br i1 undef, label %thirtyeight, label %thirtythree
36+
br i1 poison, label %thirtyeight, label %thirtythree
3737
}
3838

3939
attributes #0 = { noinline optnone }

llvm/test/CodeGen/AMDGPU/dagcomb-shuffle-vecextend-non2.ll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
;
1111
; GCN: s_endpgm
1212

13-
define amdgpu_ps void @main(i32 %in1, i1 %arg) local_unnamed_addr {
13+
define amdgpu_ps void @main(i32 %in1, i32 inreg %arg) local_unnamed_addr {
1414
.entry:
15-
br i1 %arg, label %bb12, label %bb
15+
%cond = icmp eq i32 %arg, 0
16+
br i1 %cond, label %bb12, label %bb
1617

1718
bb:
1819
%__llpc_global_proxy_r5.12.vec.insert = insertelement <4 x i32> undef, i32 %in1, i32 3

llvm/test/CodeGen/X86/mbp-false-cfg-break.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define void @test(i1 %cnd) !prof !{!"function_entry_count", i64 1024} {
99
; CHECK: # %rare
1010
; CHECK: # %rare.1
1111

12-
br i1 undef, label %rare.1, label %preheader, !prof !{!"branch_weights", i32 0, i32 1000}
12+
br i1 %cnd, label %rare.1, label %preheader, !prof !{!"branch_weights", i32 0, i32 1000}
1313
rare.1:
1414
call void @foo()
1515
br label %preheader

llvm/test/CodeGen/X86/misched-aa-mmos.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ target triple = "x86_64-unknown-linux-gnu"
1212

1313
declare zeroext i1 @bar(ptr, i32) #5
1414

15-
define i32 @foo() #0 align 2 {
15+
define i32 @foo(i1 %arg) #0 align 2 {
1616
entry:
1717
%temp_rhs = alloca %c1, align 8
18-
br i1 undef, label %if.else56, label %cond.end.i
18+
br i1 %arg, label %if.else56, label %cond.end.i
1919

2020
cond.end.i:
2121
%significand.i18.i = getelementptr inbounds %c1, ptr %temp_rhs, i64 0, i32 1

llvm/test/CodeGen/X86/multiple-loop-post-inc.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ return: ; preds = %entry
265265

266266
; Codegen shouldn't crash on this testcase.
267267

268-
define void @bar(i32 %a, i32 %b) nounwind {
268+
define void @bar(i32 %a, i32 %b, i1 %arg) nounwind {
269269
entry: ; preds = %bb1, %entry, %for.end204
270270
br label %outer
271271

@@ -283,7 +283,7 @@ inner: ; preds = %bb0, %if.end275
283283

284284
bb0: ; preds = %for.body332
285285
%indvar.next159 = add i32 %i8, 1 ; <i32> [#uses=1]
286-
br i1 undef, label %bb1, label %inner
286+
br i1 %arg, label %bb1, label %inner
287287

288288
bb1: ; preds = %bb0, %outer
289289
%midx.4 = phi i32 [ %t179, %bb0 ] ; <i32> [#uses=0]

llvm/test/CodeGen/X86/phi-bit-propagation.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ return: ; preds = %for.body, %for.cond
3434
}
3535

3636
; This test case caused an assertion failure; see PR9324.
37-
define void @func_37() noreturn nounwind ssp {
37+
define void @func_37(i1 %arg) noreturn nounwind ssp {
3838
entry:
39-
br i1 undef, label %lbl_919, label %entry.for.inc_crit_edge
39+
br i1 %arg, label %lbl_919, label %entry.for.inc_crit_edge
4040

4141
entry.for.inc_crit_edge: ; preds = %entry
4242
br label %for.inc
@@ -46,7 +46,7 @@ lbl_919: ; preds = %for.cond7.preheader
4646

4747
for.cond7.preheader: ; preds = %for.inc, %lbl_919
4848
%storemerge.ph = phi i8 [ 0, %lbl_919 ], [ %add, %for.inc ]
49-
br i1 undef, label %for.inc, label %lbl_919
49+
br i1 %arg, label %for.inc, label %lbl_919
5050

5151
for.inc: ; preds = %for.cond7.preheader, %entry.for.inc_crit_edge
5252
%add = add i8 undef, 1

llvm/test/CodeGen/X86/pr18846.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ target triple = "x86_64-unknown-unknown"
1313
;CHECK-NOT: vmovups {{.*#+}} 32-byte Folded Reload
1414

1515
; Function Attrs: uwtable
16-
define void @_Z16opt_kernel_cachePfS_S_() #0 {
16+
define void @_Z16opt_kernel_cachePfS_S_(i1 %arg) #0 {
1717
entry:
1818
br label %for.body29
1919

2020
for.body29: ; preds = %for.body29, %entry
21-
br i1 undef, label %for.body29, label %for.body65
21+
br i1 %arg, label %for.body29, label %for.body65
2222

2323
for.body65: ; preds = %for.body29
2424
%0 = load float, ptr undef, align 4, !tbaa !1

llvm/test/CodeGen/X86/remat-fold-load.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ target triple = "i386-unknown-linux-gnu"
1818

1919
declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind
2020

21-
define linkonce_odr void @test() nounwind {
21+
define linkonce_odr void @test(i1 %arg) nounwind {
2222
entry:
23-
br i1 undef, label %while.end.while.end26_crit_edge, label %while.body12.lr.ph
23+
br i1 %arg, label %while.end.while.end26_crit_edge, label %while.body12.lr.ph
2424

2525
while.end.while.end26_crit_edge: ; preds = %entry
2626
br label %while.end26
@@ -104,7 +104,7 @@ if.then.i.i.i.i.i43: ; preds = %if.then17
104104
unreachable
105105

106106
D: ; preds = %if.then17
107-
br i1 undef, label %if.then.i.i.i.i.i, label %E
107+
br i1 %arg, label %if.then.i.i.i.i.i, label %E
108108

109109
if.then.i.i.i.i.i: ; preds = %D
110110
unreachable
@@ -125,7 +125,7 @@ while.cond10.while.end26_crit_edge: ; preds = %if.end24
125125
br label %while.end26
126126

127127
while.end26: ; preds = %while.cond10.while.end26_crit_edge, %while.end.while.end26_crit_edge
128-
br i1 undef, label %while.body.lr.ph.i, label %F
128+
br i1 %arg, label %while.body.lr.ph.i, label %F
129129

130130
while.body.lr.ph.i: ; preds = %while.end26
131131
br label %while.body.i

llvm/test/CodeGen/X86/selectiondag-cse.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ target triple = "x86_64-apple-macosx"
2323

2424
@images = external hidden global %0, align 8
2525

26-
define hidden fastcc void @Mode_Decision_for_4x4IntraBlocks() nounwind uwtable ssp {
26+
define hidden fastcc void @Mode_Decision_for_4x4IntraBlocks(i1 %arg) nounwind uwtable ssp {
2727
bb4:
2828
%tmp = or i208 undef, 0
29-
br i1 undef, label %bb35, label %bb5
29+
br i1 %arg, label %bb35, label %bb5
3030

3131
bb5:
3232
%tmp6 = add i32 0, 2

0 commit comments

Comments
 (0)