6826960: C2 Sparc: assert(bb->_nodes(_bb_end)->is_Proj(),"skipping projections after expected call")
authorkvn
Tue, 07 Apr 2009 10:05:04 -0700
changeset 2531 c974c3e10bf7
parent 2530 8e437991f5c0
child 2532 da0b1680593b
6826960: C2 Sparc: assert(bb->_nodes(_bb_end)->is_Proj(),"skipping projections after expected call") Summary: Add the check when a Halt node is placed in a separate block. Reviewed-by: twisti
hotspot/src/share/vm/opto/output.cpp
--- a/hotspot/src/share/vm/opto/output.cpp	Mon Apr 06 11:53:17 2009 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Tue Apr 07 10:05:04 2009 -0700
@@ -2256,7 +2256,8 @@
     // bother scheduling them.
     Node *last = bb->_nodes[_bb_end];
     if( last->is_Catch() ||
-       (last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
+       // Exclude unreachable path case when Halt node is in a separate block.
+       (_bb_end > 1 && last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
       // There must be a prior call.  Skip it.
       while( !bb->_nodes[--_bb_end]->is_Call() ) {
         assert( bb->_nodes[_bb_end]->is_Proj(), "skipping projections after expected call" );