@@ -133,7 +133,7 @@ TEST_F(ScalarEvolutionsTest, SimplifiedPHI) {
133
133
BasicBlock *LoopBB = BasicBlock::Create (Context, " loop" , F);
134
134
BasicBlock *ExitBB = BasicBlock::Create (Context, " exit" , F);
135
135
BranchInst::Create (LoopBB, EntryBB);
136
- BranchInst::Create (LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)),
136
+ BranchInst::Create (LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)),
137
137
LoopBB);
138
138
ReturnInst::Create (Context, nullptr , ExitBB);
139
139
auto *Ty = Type::getInt32Ty (Context);
@@ -328,11 +328,11 @@ TEST_F(ScalarEvolutionsTest, CompareSCEVComplexity) {
328
328
for (int i = 0 ; i < 8 ; i++) {
329
329
PHINode *Phi = cast<PHINode>(&*II++);
330
330
Phi->addIncoming (Acc[i], LoopBB);
331
- Phi->addIncoming (UndefValue ::get (Ty), EntryBB);
331
+ Phi->addIncoming (PoisonValue ::get (Ty), EntryBB);
332
332
}
333
333
334
334
BasicBlock *ExitBB = BasicBlock::Create (Context, " bb2" , F);
335
- BranchInst::Create (LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)),
335
+ BranchInst::Create (LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)),
336
336
LoopBB);
337
337
338
338
Acc[0 ] = BinaryOperator::CreateAdd (Acc[0 ], Acc[1 ], " " , ExitBB);
@@ -491,7 +491,7 @@ TEST_F(ScalarEvolutionsTest, SCEVNormalization) {
491
491
" %iv1 = phi i32 [ %iv1.inc, %loop ], [ -2147483648, %loop.ph ] "
492
492
" %iv0.inc = add i32 %iv0, 1 "
493
493
" %iv1.inc = add i32 %iv1, 3 "
494
- " br i1 undef , label %for.end.loopexit, label %loop "
494
+ " br i1 poison , label %for.end.loopexit, label %loop "
495
495
" "
496
496
" for.end.loopexit: "
497
497
" ret void "
@@ -503,19 +503,18 @@ TEST_F(ScalarEvolutionsTest, SCEVNormalization) {
503
503
" br label %loop_0 "
504
504
" "
505
505
" loop_0: "
506
- " br i1 undef , label %loop_0, label %loop_1 "
506
+ " br i1 poison , label %loop_0, label %loop_1 "
507
507
" "
508
508
" loop_1: "
509
- " br i1 undef , label %loop_2, label %loop_1 "
509
+ " br i1 poison , label %loop_2, label %loop_1 "
510
510
" "
511
511
" "
512
512
" loop_2: "
513
- " br i1 undef , label %end, label %loop_2 "
513
+ " br i1 poison , label %end, label %loop_2 "
514
514
" "
515
515
" end: "
516
516
" ret void "
517
- " } "
518
- ,
517
+ " } " ,
519
518
Err, C);
520
519
521
520
assert (M && " Could not parse module?" );
@@ -914,7 +913,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstants) {
914
913
%1 = shl i64 %0, 32
915
914
%2 = ashr exact i64 %1, 32
916
915
%3 = add i64 %2, -9223372036854775808
917
- br i1 undef , label %exit, label %loop
916
+ br i1 poison , label %exit, label %loop
918
917
exit:
919
918
ret void
920
919
*/
@@ -929,7 +928,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstants) {
929
928
ConstantInt::get (Context, APInt (64 , 0x8000000000000000U , true ));
930
929
auto *Int64_32 = ConstantInt::get (Context, APInt (64 , 32 ));
931
930
auto *Br = BranchInst::Create (
932
- LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)), LoopBB);
931
+ LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)), LoopBB);
933
932
auto *Phi =
934
933
PHINode::Create (Type::getInt64Ty (Context), 2 , " " , Br->getIterator ());
935
934
auto *Shl = BinaryOperator::CreateShl (Phi, Int64_32, " " , Br->getIterator ());
@@ -973,7 +972,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstantAccum) {
973
972
%2 = shl i32 %1, 16
974
973
%3 = ashr exact i32 %2, 16
975
974
%4 = add i32 %3, -2147483648
976
- br i1 undef , label %exit, label %loop
975
+ br i1 poison , label %exit, label %loop
977
976
exit:
978
977
ret void
979
978
*/
@@ -987,7 +986,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstantAccum) {
987
986
auto *MinInt32 = ConstantInt::get (Context, APInt (32 , 0x80000000U ));
988
987
auto *Int32_16 = ConstantInt::get (Context, APInt (32 , 16 ));
989
988
auto *Br = BranchInst::Create (
990
- LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)), LoopBB);
989
+ LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)), LoopBB);
991
990
auto *Phi = PHINode::Create (Int32Ty, 2 , " " , Br->getIterator ());
992
991
auto *Shl = BinaryOperator::CreateShl (Phi, Int32_16, " " , Br->getIterator ());
993
992
auto *AShr =
0 commit comments