mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Fix an issue where phiMap was not being updated properly when doing load PRE.
Diagnosis and patch thanks to Jakub Staszak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abdbc57abb
commit
246ddf55d1
@ -1125,6 +1125,11 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
|
||||
LI->getAlignment(),
|
||||
UnavailablePred->getTerminator());
|
||||
|
||||
SmallPtrSet<Instruction*, 4> &p = phiMap[LI->getPointerOperand()];
|
||||
for (SmallPtrSet<Instruction*, 4>::iterator I = p.begin(), E = p.end();
|
||||
I != E; ++I)
|
||||
ValuesPerBlock.push_back(std::make_pair((*I)->getParent(), *I));
|
||||
|
||||
DenseMap<BasicBlock*, Value*> BlockReplValues;
|
||||
BlockReplValues.insert(ValuesPerBlock.begin(), ValuesPerBlock.end());
|
||||
BlockReplValues[UnavailablePred] = NewLoad;
|
||||
|
Loading…
Reference in New Issue
Block a user