aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-15 18:22:49 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-15 18:22:49 +0000
commitda005e7d20ddd623ac6174955473d4df27b1b7d4 (patch)
tree520d96011474b6c2c2a987bd28acdb716b4df2cc /lib/Analysis/LoopInfo.cpp
parentbc4fcbbc7b61e21f154ec3a4687178ec20a5f09b (diff)
The landingpad instruction isn't loop-invariant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopInfo.cpp')
-rw-r--r--lib/Analysis/LoopInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp
index 9a7c50d7fa..36fd598d13 100644
--- a/lib/Analysis/LoopInfo.cpp
+++ b/lib/Analysis/LoopInfo.cpp
@@ -99,6 +99,9 @@ bool Loop::makeLoopInvariant(Instruction *I, bool &Changed,
return false;
if (I->mayReadFromMemory())
return false;
+ // The landingpad instruction is immobile.
+ if (isa<LandingPadInst>(I))
+ return false;
// Determine the insertion point, unless one was given.
if (!InsertPt) {
BasicBlock *Preheader = getLoopPreheader();