[llvm-commits] [llvm] r45614 - /llvm/trunk/lib/CodeGen/MachineSink.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 4 17:39:17 PST 2008
Author: lattner
Date: Fri Jan 4 19:39:17 2008
New Revision: 45614
URL: http://llvm.org/viewvc/llvm-project?rev=45614&view=rev
Log:
fix a common crash.
Modified:
llvm/trunk/lib/CodeGen/MachineSink.cpp
Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=45614&r1=45613&r2=45614&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineSink.cpp Fri Jan 4 19:39:17 2008
@@ -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);
More information about the llvm-commits
mailing list