mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
LSR fix: add a missing phi check during IV hoisting.
Fixes PR12898: SCEVExpander crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -955,7 +955,8 @@ bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) {
|
||||
|
||||
// InsertPos must itself dominate IncV so that IncV's new position satisfies
|
||||
// its existing users.
|
||||
if (!SE.DT->dominates(InsertPos->getParent(), IncV->getParent()))
|
||||
if (isa<PHINode>(InsertPos)
|
||||
|| !SE.DT->dominates(InsertPos->getParent(), IncV->getParent()))
|
||||
return false;
|
||||
|
||||
// Check that the chain of IV operands leading back to Phi can be hoisted.
|
||||
|
Reference in New Issue
Block a user