diff options
| author | Dan Gohman <gohman@apple.com> | 2009-11-05 23:34:59 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-11-05 23:34:59 +0000 |
| commit | eb3567cd49b6767fb9b505591245f81b4341b9f2 (patch) | |
| tree | 5400fd66e4c5daa9b0a3ae7f0cd6bfbd55913243 /lib/Transforms | |
| parent | 3f131328ffddcd6768180ef195836c8d53878940 (diff) | |
| download | external_llvm-eb3567cd49b6767fb9b505591245f81b4341b9f2.zip external_llvm-eb3567cd49b6767fb9b505591245f81b4341b9f2.tar.gz external_llvm-eb3567cd49b6767fb9b505591245f81b4341b9f2.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.cpp | 1 |
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. |
