aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-26 20:40:15 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-26 20:40:15 +0000
commit2b18881185b123e5f163eb7b32b3452fc3f339d8 (patch)
tree2a2138982a8173abbc0779cf995ca8a6aeb87ef5 /lib/Transforms/Scalar/IndVarSimplify.cpp
parent6ca06cd8a84b8df751c90264c2d595fd325fdfdb (diff)
Don't sink landingpad instructions during ind-var simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 4433657bf9..b12a76acf8 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1724,6 +1724,10 @@ void IndVarSimplify::SinkUnusedInvariants(Loop *L) {
if (isa<DbgInfoIntrinsic>(I))
continue;
+ // Skip landingpad instructions.
+ if (isa<LandingPadInst>(I))
+ continue;
+
// Don't sink static AllocaInsts out of the entry block, which would
// turn them into dynamic allocas!
if (AllocaInst *AI = dyn_cast<AllocaInst>(I))