forked from OSchip/llvm-project
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
llvm-svn: 86193
This commit is contained in:
parent
98693a3ac2
commit
a1bf0c0acc
|
@ -490,6 +490,7 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEV *const &NewBase,
|
|||
// is the canonical backedge for this loop, as this can make some
|
||||
// inserted code be in an illegal position.
|
||||
if (e != 1 && PHIPred->getTerminator()->getNumSuccessors() > 1 &&
|
||||
!isa<IndirectBrInst>(PHIPred->getTerminator()) &&
|
||||
(PN->getParent() != L->getHeader() || !L->contains(PHIPred))) {
|
||||
|
||||
// First step, split the critical edge.
|
||||
|
|
Loading…
Reference in New Issue