@@ -133,7 +133,7 @@ TEST_F(ScalarEvolutionsTest, SimplifiedPHI) {
133133 BasicBlock *LoopBB = BasicBlock::Create (Context, " loop" , F);
134134 BasicBlock *ExitBB = BasicBlock::Create (Context, " exit" , F);
135135 BranchInst::Create (LoopBB, EntryBB);
136- BranchInst::Create (LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)),
136+ BranchInst::Create (LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)),
137137 LoopBB);
138138 ReturnInst::Create (Context, nullptr , ExitBB);
139139 auto *Ty = Type::getInt32Ty (Context);
@@ -328,11 +328,11 @@ TEST_F(ScalarEvolutionsTest, CompareSCEVComplexity) {
328328 for (int i = 0 ; i < 8 ; i++) {
329329 PHINode *Phi = cast<PHINode>(&*II++);
330330 Phi->addIncoming (Acc[i], LoopBB);
331- Phi->addIncoming (UndefValue ::get (Ty), EntryBB);
331+ Phi->addIncoming (PoisonValue ::get (Ty), EntryBB);
332332 }
333333
334334 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)),
336336 LoopBB);
337337
338338 Acc[0 ] = BinaryOperator::CreateAdd (Acc[0 ], Acc[1 ], " " , ExitBB);
@@ -491,7 +491,7 @@ TEST_F(ScalarEvolutionsTest, SCEVNormalization) {
491491 " %iv1 = phi i32 [ %iv1.inc, %loop ], [ -2147483648, %loop.ph ] "
492492 " %iv0.inc = add i32 %iv0, 1 "
493493 " %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 "
495495 " "
496496 " for.end.loopexit: "
497497 " ret void "
@@ -503,19 +503,18 @@ TEST_F(ScalarEvolutionsTest, SCEVNormalization) {
503503 " br label %loop_0 "
504504 " "
505505 " loop_0: "
506- " br i1 undef , label %loop_0, label %loop_1 "
506+ " br i1 poison , label %loop_0, label %loop_1 "
507507 " "
508508 " loop_1: "
509- " br i1 undef , label %loop_2, label %loop_1 "
509+ " br i1 poison , label %loop_2, label %loop_1 "
510510 " "
511511 " "
512512 " loop_2: "
513- " br i1 undef , label %end, label %loop_2 "
513+ " br i1 poison , label %end, label %loop_2 "
514514 " "
515515 " end: "
516516 " ret void "
517- " } "
518- ,
517+ " } " ,
519518 Err, C);
520519
521520 assert (M && " Could not parse module?" );
@@ -914,7 +913,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstants) {
914913 %1 = shl i64 %0, 32
915914 %2 = ashr exact i64 %1, 32
916915 %3 = add i64 %2, -9223372036854775808
917- br i1 undef , label %exit, label %loop
916+ br i1 poison , label %exit, label %loop
918917 exit:
919918 ret void
920919 */
@@ -929,7 +928,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstants) {
929928 ConstantInt::get (Context, APInt (64 , 0x8000000000000000U , true ));
930929 auto *Int64_32 = ConstantInt::get (Context, APInt (64 , 32 ));
931930 auto *Br = BranchInst::Create (
932- LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)), LoopBB);
931+ LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)), LoopBB);
933932 auto *Phi =
934933 PHINode::Create (Type::getInt64Ty (Context), 2 , " " , Br->getIterator ());
935934 auto *Shl = BinaryOperator::CreateShl (Phi, Int64_32, " " , Br->getIterator ());
@@ -973,7 +972,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstantAccum) {
973972 %2 = shl i32 %1, 16
974973 %3 = ashr exact i32 %2, 16
975974 %4 = add i32 %3, -2147483648
976- br i1 undef , label %exit, label %loop
975+ br i1 poison , label %exit, label %loop
977976 exit:
978977 ret void
979978 */
@@ -987,7 +986,7 @@ TEST_F(ScalarEvolutionsTest, SCEVAddRecFromPHIwithLargeConstantAccum) {
987986 auto *MinInt32 = ConstantInt::get (Context, APInt (32 , 0x80000000U ));
988987 auto *Int32_16 = ConstantInt::get (Context, APInt (32 , 16 ));
989988 auto *Br = BranchInst::Create (
990- LoopBB, ExitBB, UndefValue ::get (Type::getInt1Ty (Context)), LoopBB);
989+ LoopBB, ExitBB, PoisonValue ::get (Type::getInt1Ty (Context)), LoopBB);
991990 auto *Phi = PHINode::Create (Int32Ty, 2 , " " , Br->getIterator ());
992991 auto *Shl = BinaryOperator::CreateShl (Phi, Int32_16, " " , Br->getIterator ());
993992 auto *AShr =
0 commit comments