From 14359ef1b6a0610ac91df5f5a91c88a0b51c187c Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Fri, 1 Feb 2019 20:44:24 +0000 Subject: [opaque pointer types] Pass value type to LoadInst creation. This cleans up all LoadInst creation in LLVM to explicitly pass the value type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57172 llvm-svn: 352911 --- llvm/unittests/Analysis/PhiValuesTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'llvm/unittests/Analysis/PhiValuesTest.cpp') diff --git a/llvm/unittests/Analysis/PhiValuesTest.cpp b/llvm/unittests/Analysis/PhiValuesTest.cpp index 6fd3f6d..82c0233 100644 --- a/llvm/unittests/Analysis/PhiValuesTest.cpp +++ b/llvm/unittests/Analysis/PhiValuesTest.cpp @@ -37,10 +37,10 @@ TEST(PhiValuesTest, SimplePhi) { BranchInst::Create(Then, If); BranchInst::Create(Then, Else); - Value *Val1 = new LoadInst(UndefValue::get(I32PtrTy), "val1", Entry); - Value *Val2 = new LoadInst(UndefValue::get(I32PtrTy), "val2", Entry); - Value *Val3 = new LoadInst(UndefValue::get(I32PtrTy), "val3", Entry); - Value *Val4 = new LoadInst(UndefValue::get(I32PtrTy), "val4", Entry); + Value *Val1 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val1", Entry); + Value *Val2 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val2", Entry); + Value *Val3 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val3", Entry); + Value *Val4 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val4", Entry); PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then); Phi1->addIncoming(Val1, If); @@ -110,10 +110,10 @@ TEST(PhiValuesTest, DependentPhi) { BranchInst::Create(End, If2); BranchInst::Create(End, Else2); - Value *Val1 = new LoadInst(UndefValue::get(I32PtrTy), "val1", Entry); - Value *Val2 = new LoadInst(UndefValue::get(I32PtrTy), "val2", Entry); - Value *Val3 = new LoadInst(UndefValue::get(I32PtrTy), "val3", Entry); - Value *Val4 = new LoadInst(UndefValue::get(I32PtrTy), "val4", Entry); + Value *Val1 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val1", Entry); + Value *Val2 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val2", Entry); + Value *Val3 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val3", Entry); + Value *Val4 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val4", Entry); PHINode *Phi1 = PHINode::Create(I32Ty, 2, "phi1", Then); Phi1->addIncoming(Val1, If1); -- cgit v1.1