--- old/src/share/vm/opto/loopTransform.cpp 2013-03-19 12:55:09.000000000 -0400 +++ new/src/share/vm/opto/loopTransform.cpp 2013-03-19 12:55:09.000000000 -0400 @@ -886,8 +886,10 @@ // Find common pieces of the loop being guarded with pre & post loops CountedLoopNode *main_head = loop->_head->as_CountedLoop(); + guarantee(main_head != NULL, "no main head loop node"); assert( main_head->is_normal_loop(), "" ); CountedLoopEndNode *main_end = main_head->loopexit(); + guarantee(main_end != NULL, "no main end loop node"); assert( main_end->outcnt() == 2, "1 true, 1 false path only" ); uint dd_main_head = dom_depth(main_head); uint max = main_head->outcnt(); @@ -2554,13 +2556,16 @@ ok.set(store->_idx); ok.set(store->in(MemNode::Memory)->_idx); + CountedLoopEndNode* head_exit = head->loopexit(); + guarantee(head_exit != NULL, "no head exit loop node"); + // Loop structure is ok ok.set(head->_idx); - ok.set(head->loopexit()->_idx); + ok.set(head_exit->_idx); ok.set(head->phi()->_idx); ok.set(head->incr()->_idx); - ok.set(head->loopexit()->cmp_node()->_idx); - ok.set(head->loopexit()->in(1)->_idx); + ok.set(head_exit->cmp_node()->_idx); + ok.set(head_exit->in(1)->_idx); // Address elements are ok if (con) ok.set(con->_idx);