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 | a1bf0c0accd53c79e1204ea1db33052e105c802d (patch) | |
tree | 946295c4711cffc4f4561a623617cd914c831b68 | |
parent | 98693a3ac2f4f5a7e86e4a00899eaf9a30706497 (diff) | |
download | bcm5719-llvm-a1bf0c0accd53c79e1204ea1db33052e105c802d.tar.gz bcm5719-llvm-a1bf0c0accd53c79e1204ea1db33052e105c802d.zip |
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
llvm-svn: 86193
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 288dd476e9f..4b82dbfd539 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/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. |