summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-05 01:39:17 +0000
committerChris Lattner <sabre@nondot.org>2008-01-05 01:39:17 +0000
commit6ec78274df2f8de1fe3c99a54e168c8d4ccf5cf5 (patch)
tree670dc89adbb0f95db866830307d78818b53fdbcb /llvm/lib/CodeGen/MachineSink.cpp
parente666bc272d7003e575e54aeabf09066df0a71335 (diff)
downloadbcm5719-llvm-6ec78274df2f8de1fe3c99a54e168c8d4ccf5cf5.tar.gz
bcm5719-llvm-6ec78274df2f8de1fe3c99a54e168c8d4ccf5cf5.zip
fix a common crash.
llvm-svn: 45614
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineSink.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index 0665e87f67a..dff60f6d395 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -180,6 +180,10 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI) {
}
}
+ // If there are no outputs, it must have side-effects.
+ if (SuccToSinkTo == 0)
+ return false;
+
// FIXME: Check that the instr doesn't have side effects etc.
DEBUG(cerr << "Sink instr " << *MI);
OpenPOWER on IntegriCloud