commit | 7ebe08504ba075c4a83df7ecec86d5e032b20781 | [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 | 54fec129fe5809a42c76dfa1cfb759c94ea318c9 | |
parent | 1bcd6ddb70e165d81e7e280c1afc333b95193f11 [diff] [blame] |
fix a common crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45614 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index 0665e87..dff60f6 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/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);