Diagnosis and patch thanks to Jakub Staszak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72562
91177308-0d34-0410-b5e6-
96231b3b80d8
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;