aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-05 23:34:59 +0000
committerDan Gohman <gohman@apple.com>2009-11-05 23:34:59 +0000
commit2b4eb23c3ae503dbfe2f2d14ac14a513d033755c (patch)
tree5400fd66e4c5daa9b0a3ae7f0cd6bfbd55913243 /lib/Transforms
parentcabfc80a201e5153d12f5ba18a6376b5641170b6 (diff)
downloadexternal_llvm-2b4eb23c3ae503dbfe2f2d14ac14a513d033755c.zip
external_llvm-2b4eb23c3ae503dbfe2f2d14ac14a513d033755c.tar.gz
external_llvm-2b4eb23c3ae503dbfe2f2d14ac14a513d033755c.tar.bz2
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 288dd47..4b82dbf 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -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.