aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineLICM.cpp')
-rw-r--r--lib/CodeGen/MachineLICM.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index f6a08d3620..70da9828e6 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/lib/CodeGen/MachineLICM.cpp
@@ -336,6 +336,11 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
continue;
}
+ // If the header is a landing pad, then we don't want to hoist instructions
+ // out of it. This can happen with SjLj exception handling which has a
+ // dispatch table as the landing pad.
+ if (CurLoop->getHeader()->isLandingPad()) continue;
+
if (!PreRegAlloc)
HoistRegionPostRA();
else {