diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-15 08:36:12 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-15 08:36:12 +0000 |
commit | b599979ab591a6f4557337a4190153094725ef45 (patch) | |
tree | ef37060f23a3f5131e64845b1807545abfc415d0 /lib/CodeGen/MachineSink.cpp | |
parent | 8f40afe62db871230ac149de1c4ccc16ff48253a (diff) |
Fix PR3522. It's not safe to sink into landing pad BB's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64582 91177308-0d34-0410-b5e6-96231b3b80d8
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); |