aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-07-21 00:40:04 +0000
committerAndrew Trick <atrick@apple.com>2011-07-21 00:40:04 +0000
commit37eb38d3f8531115f17f4e829013ccb513952bad (patch)
tree573ffec2fcbe10ca4bc29bcd3a48d0e6d895db8b /lib/Transforms/Scalar
parent36c62d3cbe04fc2bde371fa4bda4085baffc799f (diff)
downloadexternal_llvm-37eb38d3f8531115f17f4e829013ccb513952bad.zip
external_llvm-37eb38d3f8531115f17f4e829013ccb513952bad.tar.gz
external_llvm-37eb38d3f8531115f17f4e829013ccb513952bad.tar.bz2
LSR crashes on an empty IVUsers list.
rdar://9786536 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index e90b5bc..4598df0 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -3740,6 +3740,9 @@ LSRInstance::LSRInstance(const TargetLowering *tli, Loop *l, Pass *P)
OptimizeShadowIV();
OptimizeLoopTermCond();
+ // If loop preparation eliminates all interesting IV users, bail.
+ if (IU.empty()) return;
+
// Start collecting data and preparing for the solver.
CollectInterestingTypesAndFactors();
CollectFixupsAndInitialFormulae();