2712 Node* offset = NULL; |
2712 Node* offset = NULL; |
2713 if (!match_fill_loop(lpt, store, store_value, shift, offset)) { |
2713 if (!match_fill_loop(lpt, store, store_value, shift, offset)) { |
2714 return false; |
2714 return false; |
2715 } |
2715 } |
2716 |
2716 |
|
2717 Node* exit = head->loopexit()->proj_out(0); |
|
2718 if (exit == NULL) { |
|
2719 return false; |
|
2720 } |
|
2721 |
2717 #ifndef PRODUCT |
2722 #ifndef PRODUCT |
2718 if (TraceLoopOpts) { |
2723 if (TraceLoopOpts) { |
2719 tty->print("ArrayFill "); |
2724 tty->print("ArrayFill "); |
2720 lpt->dump_head(); |
2725 lpt->dump_head(); |
2721 } |
2726 } |
2829 } |
2834 } |
2830 } |
2835 } |
2831 */ |
2836 */ |
2832 |
2837 |
2833 // Redirect the old control and memory edges that are outside the loop. |
2838 // Redirect the old control and memory edges that are outside the loop. |
2834 Node* exit = head->loopexit()->proj_out(0); |
|
2835 // Sometimes the memory phi of the head is used as the outgoing |
2839 // Sometimes the memory phi of the head is used as the outgoing |
2836 // state of the loop. It's safe in this case to replace it with the |
2840 // state of the loop. It's safe in this case to replace it with the |
2837 // result_mem. |
2841 // result_mem. |
2838 _igvn.replace_node(store->in(MemNode::Memory), result_mem); |
2842 _igvn.replace_node(store->in(MemNode::Memory), result_mem); |
2839 lazy_replace(exit, result_ctrl); |
2843 lazy_replace(exit, result_ctrl); |