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 | 2510436e20b761010cd2507cf3822cd36d4d799f (patch) | |
tree | 4c9e7f9c22cb2489d7e1410ccb085462b198a2d5 /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 37959570afb01916b05614a4010f879bd1d7bac4 (diff) | |
download | llvm-2510436e20b761010cd2507cf3822cd36d4d799f.zip llvm-2510436e20b761010cd2507cf3822cd36d4d799f.tar.gz llvm-2510436e20b761010cd2507cf3822cd36d4d799f.tar.bz2 |
Fix PR3522. It's not safe to sink into landing pad BB's.
llvm-svn: 64582
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index a85a41f..468bd01 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/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); |