commit | 6ec78274df2f8de1fe3c99a54e168c8d4ccf5cf5 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Sat Jan 05 01:39:17 2008 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Sat Jan 05 01:39:17 2008 +0000 |
tree | 670dc89adbb0f95db866830307d78818b53fdbcb | |
parent | e666bc272d7003e575e54aeabf09066df0a71335 [diff] [blame] |
fix a common crash. llvm-svn: 45614
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index 0665e87..dff60f6 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -180,6 +180,10 @@ } } + // 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);