diff options
Diffstat (limited to 'lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | lib/CodeGen/MachineSink.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index a85a41fbae..468bd01548 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -212,6 +212,11 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) { // If there are no outputs, it must have side-effects. if (SuccToSinkTo == 0) return false; + + // It's not safe to sink instructions to EH landing pad. Control flow into + // landing pad is implicitly defined. + if (SuccToSinkTo->isLandingPad()) + return false; DEBUG(cerr << "Sink instr " << *MI); DEBUG(cerr << "to block " << *SuccToSinkTo); |