@@ -7,29 +7,29 @@ define void @test() {
77; CHECK-LABEL: @test(
88; CHECK-NEXT: br label [[FOR_BODY_LR_PH_I_I_I:%.*]]
99; CHECK: for.body.lr.ph.i.i.i:
10- ; CHECK-NEXT: br i1 true , label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
10+ ; CHECK-NEXT: br i1 poison , label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
1111; CHECK: vector.ph:
1212; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
1313; CHECK: vector.body:
1414; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
1515; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
16- ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i64 [[INDEX_NEXT]], 0
16+ ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i64 [[INDEX_NEXT]], poison
1717; CHECK-NEXT: br i1 [[TMP1]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
1818; CHECK: middle.block:
19- ; CHECK-NEXT: br i1 false , label [[FOR_END_I_I_I:%.*]], label [[SCALAR_PH]]
19+ ; CHECK-NEXT: br i1 poison , label [[FOR_END_I_I_I:%.*]], label [[SCALAR_PH]]
2020; CHECK: scalar.ph:
21- ; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ 0 , [[MIDDLE_BLOCK]] ], [ 0, [[FOR_BODY_LR_PH_I_I_I]] ]
21+ ; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ poison , [[MIDDLE_BLOCK]] ], [ 0, [[FOR_BODY_LR_PH_I_I_I]] ]
2222; CHECK-NEXT: br label [[FOR_BODY_I_I_I:%.*]]
2323; CHECK: for.body.i.i.i:
2424; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC_I_I_I:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ]
2525; CHECK-NEXT: br label [[FOR_INC_I_I_I]]
2626; CHECK: for.inc.i.i.i:
2727; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add i64 [[INDVARS_IV]], 1
2828; CHECK-NEXT: [[LFTR_WIDEIV:%.*]] = trunc i64 [[INDVARS_IV_NEXT]] to i32
29- ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i32 [[LFTR_WIDEIV]], undef
29+ ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i32 [[LFTR_WIDEIV]], poison
3030; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY_I_I_I]], label [[FOR_END_I_I_I]], !llvm.loop [[LOOP3:![0-9]+]]
3131; CHECK: for.end.i.i.i:
32- ; CHECK-NEXT: [[LCSSA:%.*]] = phi ptr [ undef , [[FOR_INC_I_I_I]] ], [ undef , [[MIDDLE_BLOCK]] ]
32+ ; CHECK-NEXT: [[LCSSA:%.*]] = phi ptr [ poison , [[FOR_INC_I_I_I]] ], [ poison , [[MIDDLE_BLOCK]] ]
3333; CHECK-NEXT: unreachable
3434;
3535 br label %for.body.lr.ph.i.i.i
@@ -44,19 +44,19 @@ for.body.i.i.i:
4444for.inc.i.i.i:
4545 %indvars.iv.next = add i64 %indvars.iv , 1
4646 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
47- %exitcond = icmp ne i32 %lftr.wideiv , undef
47+ %exitcond = icmp ne i32 %lftr.wideiv , poison
4848 br i1 %exitcond , label %for.body.i.i.i , label %for.end.i.i.i
4949
5050for.end.i.i.i:
51- %lcssa = phi ptr [ undef , %for.inc.i.i.i ]
51+ %lcssa = phi ptr [ poison , %for.inc.i.i.i ]
5252 unreachable
5353}
5454
5555; PR16139
5656define void @test2 (ptr %x ) {
5757; CHECK-LABEL: @test2(
5858; CHECK-NEXT: entry:
59- ; CHECK-NEXT: indirectbr ptr [[X:%.*]], [label [[L0:%.*]], label %L1 ]
59+ ; CHECK-NEXT: indirectbr ptr [[X:%.*]], [label [[L0:%.*]], label [[L1:%.*]] ]
6060; CHECK: L0:
6161; CHECK-NEXT: br label [[L0]]
6262; CHECK: L1:
7676define void @test3 () {
7777; CHECK-LABEL: @test3(
7878; CHECK-NEXT: entry:
79- ; CHECK-NEXT: [[ADD41:%.*]] = add i32 undef, undef
79+ ; CHECK-NEXT: [[ADD41:%.*]] = add i32 poison, poison
8080; CHECK-NEXT: [[IDXPROM4736:%.*]] = zext i32 [[ADD41]] to i64
8181; CHECK-NEXT: br label [[WHILE_BODY:%.*]]
8282; CHECK: while.body:
8383; CHECK-NEXT: [[IDXPROM4738:%.*]] = phi i64 [ [[IDXPROM47:%.*]], [[WHILE_BODY]] ], [ [[IDXPROM4736]], [[ENTRY:%.*]] ]
8484; CHECK-NEXT: [[POS_337:%.*]] = phi i32 [ [[INC46:%.*]], [[WHILE_BODY]] ], [ [[ADD41]], [[ENTRY]] ]
8585; CHECK-NEXT: [[INC46]] = add i32 [[POS_337]], 1
86- ; CHECK-NEXT: [[ARRAYIDX48:%.*]] = getelementptr inbounds [1024 x i8], ptr undef , i64 0, i64 [[IDXPROM4738]]
86+ ; CHECK-NEXT: [[ARRAYIDX48:%.*]] = getelementptr inbounds [1024 x i8], ptr poison , i64 0, i64 [[IDXPROM4738]]
8787; CHECK-NEXT: store i8 0, ptr [[ARRAYIDX48]], align 1
8888; CHECK-NEXT: [[AND43:%.*]] = and i32 [[INC46]], 3
8989; CHECK-NEXT: [[CMP44:%.*]] = icmp eq i32 [[AND43]], 0
@@ -95,15 +95,15 @@ define void @test3() {
9595; CHECK-NEXT: ret void
9696;
9797entry:
98- %add41 = add i32 undef , undef
98+ %add41 = add i32 poison, poison
9999 %idxprom4736 = zext i32 %add41 to i64
100100 br label %while.body
101101
102102while.body:
103103 %idxprom4738 = phi i64 [ %idxprom47 , %while.body ], [ %idxprom4736 , %entry ]
104104 %pos.337 = phi i32 [ %inc46 , %while.body ], [ %add41 , %entry ]
105105 %inc46 = add i32 %pos.337 , 1
106- %arrayidx48 = getelementptr inbounds [1024 x i8 ], ptr undef , i64 0 , i64 %idxprom4738
106+ %arrayidx48 = getelementptr inbounds [1024 x i8 ], ptr poison , i64 0 , i64 %idxprom4738
107107 store i8 0 , ptr %arrayidx48 , align 1
108108 %and43 = and i32 %inc46 , 3
109109 %cmp44 = icmp eq i32 %and43 , 0
0 commit comments