mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-11 07:18:44 +00:00
PHI nodes not in the loop header aren't part of the loop iteration initial
state. Furthermore, they might not have two operands. This fixes the underlying issue behind the crashes introduced in r142781. llvm-svn: 142788
This commit is contained in:
parent
4d47e224d7
commit
341bf1548e
@ -4856,7 +4856,7 @@ ScalarEvolution::getConstantEvolutionLoopExitValue(PHINode *PN,
|
||||
for (DenseMap<Instruction *, Constant *>::const_iterator
|
||||
I = CurrentIterVals.begin(), E = CurrentIterVals.end(); I != E; ++I){
|
||||
PHINode *PHI = dyn_cast<PHINode>(I->first);
|
||||
if (!PHI || PHI == PN) continue;
|
||||
if (!PHI || PHI == PN || PHI->getParent() != Header) continue;
|
||||
Constant *&NextPHI = NextIterVals[PHI];
|
||||
if (NextPHI) continue; // Already computed!
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user