@@ -261,7 +261,7 @@ TEST(OperationsTest, SplitBlock) {
261
261
// Create a block with only a return and split it on the return.
262
262
auto *BB = BasicBlock::Create (Ctx, " BB" , F);
263
263
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 ());
265
265
266
266
// We should end up with an unconditional branch from BB to BB1, and the
267
267
// return ends up in BB1.
@@ -368,11 +368,11 @@ TEST(OperationsTest, GEP) {
368
368
auto *RI = ReturnInst::Create (Ctx, BB);
369
369
370
370
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)},
373
373
ConstantInt::get (Int32Ty, 0 )));
374
374
375
- GEPOp.BuilderFunc ({UndefValue ::get (Int8PtrTy), ConstantInt::get (Int32Ty, 0 )},
375
+ GEPOp.BuilderFunc ({PoisonValue ::get (Int8PtrTy), ConstantInt::get (Int32Ty, 0 )},
376
376
RI->getIterator ());
377
377
EXPECT_FALSE (verifyModule (M, &errs ()));
378
378
}
@@ -419,11 +419,11 @@ TEST(OperationsTest, ExtractAndInsertValue) {
419
419
auto IVOp = fuzzerop::insertValueDescriptor (1 );
420
420
421
421
// 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);
427
427
428
428
EXPECT_TRUE (EVOp.SourcePreds [0 ].matches ({}, SVal));
429
429
EXPECT_FALSE (EVOp.SourcePreds [0 ].matches ({}, OVal));
@@ -462,12 +462,12 @@ TEST(OperationsTest, ExtractAndInsertValue) {
462
462
463
463
// InsertValue should accept any type in the struct, but only in positions
464
464
// 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)},
469
469
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)},
471
471
ConstantInt::get (Int32Ty, 1 )));
472
472
473
473
EXPECT_THAT (IVOp.SourcePreds [1 ].generate ({SVal}, {}),
0 commit comments