@@ -261,7 +261,7 @@ TEST(OperationsTest, SplitBlock) {
261261 // Create a block with only a return and split it on the return.
262262 auto *BB = BasicBlock::Create (Ctx, " BB" , F);
263263 auto *RI = ReturnInst::Create (Ctx, BB);
264- SBOp.BuilderFunc ({UndefValue ::get (Type::getInt1Ty (Ctx))}, RI->getIterator ());
264+ SBOp.BuilderFunc ({PoisonValue ::get (Type::getInt1Ty (Ctx))}, RI->getIterator ());
265265
266266 // We should end up with an unconditional branch from BB to BB1, and the
267267 // return ends up in BB1.
@@ -368,11 +368,11 @@ TEST(OperationsTest, GEP) {
368368 auto *RI = ReturnInst::Create (Ctx, BB);
369369
370370 auto GEPOp = fuzzerop::gepDescriptor (1 );
371- EXPECT_TRUE (GEPOp.SourcePreds [0 ].matches ({}, UndefValue ::get (Int8PtrTy)));
372- EXPECT_TRUE (GEPOp.SourcePreds [1 ].matches ({UndefValue ::get (Int8PtrTy)},
371+ EXPECT_TRUE (GEPOp.SourcePreds [0 ].matches ({}, PoisonValue ::get (Int8PtrTy)));
372+ EXPECT_TRUE (GEPOp.SourcePreds [1 ].matches ({PoisonValue ::get (Int8PtrTy)},
373373 ConstantInt::get (Int32Ty, 0 )));
374374
375- GEPOp.BuilderFunc ({UndefValue ::get (Int8PtrTy), ConstantInt::get (Int32Ty, 0 )},
375+ GEPOp.BuilderFunc ({PoisonValue ::get (Int8PtrTy), ConstantInt::get (Int32Ty, 0 )},
376376 RI->getIterator ());
377377 EXPECT_FALSE (verifyModule (M, &errs ()));
378378}
@@ -419,11 +419,11 @@ TEST(OperationsTest, ExtractAndInsertValue) {
419419 auto IVOp = fuzzerop::insertValueDescriptor (1 );
420420
421421 // Sanity check the source preds.
422- Constant *SVal = UndefValue ::get (StructTy);
423- Constant *OVal = UndefValue ::get (OpaqueTy);
424- Constant *AVal = UndefValue ::get (ArrayTy);
425- Constant *ZAVal = UndefValue ::get (ZeroSizedArrayTy);
426- Constant *VVal = UndefValue ::get (VectorTy);
422+ Constant *SVal = PoisonValue ::get (StructTy);
423+ Constant *OVal = PoisonValue ::get (OpaqueTy);
424+ Constant *AVal = PoisonValue ::get (ArrayTy);
425+ Constant *ZAVal = PoisonValue ::get (ZeroSizedArrayTy);
426+ Constant *VVal = PoisonValue ::get (VectorTy);
427427
428428 EXPECT_TRUE (EVOp.SourcePreds [0 ].matches ({}, SVal));
429429 EXPECT_FALSE (EVOp.SourcePreds [0 ].matches ({}, OVal));
@@ -462,12 +462,12 @@ TEST(OperationsTest, ExtractAndInsertValue) {
462462
463463 // InsertValue should accept any type in the struct, but only in positions
464464 // where it makes sense.
465- EXPECT_TRUE (IVOp.SourcePreds [1 ].matches ({SVal}, UndefValue ::get (Int8PtrTy)));
466- EXPECT_TRUE (IVOp.SourcePreds [1 ].matches ({SVal}, UndefValue ::get (Int32Ty)));
467- EXPECT_FALSE (IVOp.SourcePreds [1 ].matches ({SVal}, UndefValue ::get (Int64Ty)));
468- EXPECT_FALSE (IVOp.SourcePreds [2 ].matches ({SVal, UndefValue ::get (Int32Ty)},
465+ EXPECT_TRUE (IVOp.SourcePreds [1 ].matches ({SVal}, PoisonValue ::get (Int8PtrTy)));
466+ EXPECT_TRUE (IVOp.SourcePreds [1 ].matches ({SVal}, PoisonValue ::get (Int32Ty)));
467+ EXPECT_FALSE (IVOp.SourcePreds [1 ].matches ({SVal}, PoisonValue ::get (Int64Ty)));
468+ EXPECT_FALSE (IVOp.SourcePreds [2 ].matches ({SVal, PoisonValue ::get (Int32Ty)},
469469 ConstantInt::get (Int32Ty, 0 )));
470- EXPECT_TRUE (IVOp.SourcePreds [2 ].matches ({SVal, UndefValue ::get (Int32Ty)},
470+ EXPECT_TRUE (IVOp.SourcePreds [2 ].matches ({SVal, PoisonValue ::get (Int32Ty)},
471471 ConstantInt::get (Int32Ty, 1 )));
472472
473473 EXPECT_THAT (IVOp.SourcePreds [1 ].generate ({SVal}, {}),
0 commit comments