summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-11-16 17:37:58 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-11-16 17:37:58 +0000
commit7378e7a333d16755104fa4c3f1f6cc50a5b78c0d (patch)
tree6004c97f113aed0d31a03c571272de3c2c0487bb /llvm/lib/Transforms
parent88faf6d6979dff876aabbec690b7096d123f3092 (diff)
downloadbcm5719-llvm-7378e7a333d16755104fa4c3f1f6cc50a5b78c0d.tar.gz
bcm5719-llvm-7378e7a333d16755104fa4c3f1f6cc50a5b78c0d.zip
[LoopStrengthReduce] Don't increment iterator past the end of the BB
We tried to move the insertion point beyond instructions like landingpad and cleanuppad. However, we *also* tried to move past catchpad. This is problematic because catchpad is also a terminator. This fixes PR25541. llvm-svn: 253238
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 9351a284c86..6f34c9cb8cf 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -4435,7 +4435,7 @@ LSRInstance::AdjustInsertPositionForExpand(BasicBlock::iterator LowestIP,
while (isa<PHINode>(IP)) ++IP;
// Ignore landingpad instructions.
- while (IP->isEHPad()) ++IP;
+ while (!isa<TerminatorInst>(IP) && IP->isEHPad()) ++IP;
// Ignore debug intrinsics.
while (isa<DbgInfoIntrinsic>(IP)) ++IP;
OpenPOWER on IntegriCloud