diff options
author | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:24 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:24 +0000 |
commit | 14359ef1b6a0610ac91df5f5a91c88a0b51c187c (patch) | |
tree | 53b7628ce6ecba998379d0d19f875bc9dad3b69a /llvm/unittests/Analysis/PhiValuesTest.cpp | |
parent | d9e85a0861b7e9320c34547a2ad7f49c504a9381 (diff) | |
download | bcm5719-llvm-14359ef1b6a0610ac91df5f5a91c88a0b51c187c.tar.gz bcm5719-llvm-14359ef1b6a0610ac91df5f5a91c88a0b51c187c.zip |
[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
Diffstat (limited to 'llvm/unittests/Analysis/PhiValuesTest.cpp')
-rw-r--r-- | llvm/unittests/Analysis/PhiValuesTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/unittests/Analysis/PhiValuesTest.cpp b/llvm/unittests/Analysis/PhiValuesTest.cpp index 6fd3f6d6654..82c02337ef2 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); |