comparison src/share/vm/opto/block.cpp @ 17792:4345c6a92f35

8031188: Fix for 8029015: PPC64 (part 216): opto: trap based null and range checks Summary: Swap the Projs in the block list so that the new block is added behind the proper node. Reviewed-by: kvn
author goetz
date Mon, 06 Jan 2014 11:02:21 +0100
parents 41b780b43b74
children abec000618bf
comparison
equal deleted inserted replaced
17791:ad3b94907eed 17792:4345c6a92f35
745 } 745 }
746 assert(iff->_prob <= 2*PROB_NEVER, "Trap based checks are expected to trap never!"); 746 assert(iff->_prob <= 2*PROB_NEVER, "Trap based checks are expected to trap never!");
747 // Map the successors properly 747 // Map the successors properly
748 block->_succs.map(0, get_block_for_node(proj_never ->raw_out(0))); // The target of the trap. 748 block->_succs.map(0, get_block_for_node(proj_never ->raw_out(0))); // The target of the trap.
749 block->_succs.map(1, get_block_for_node(proj_always->raw_out(0))); // The fall through target. 749 block->_succs.map(1, get_block_for_node(proj_always->raw_out(0))); // The fall through target.
750
751 if (block->get_node(block->number_of_nodes() - block->_num_succs + 1) != proj_always) {
752 block->map_node(proj_never, block->number_of_nodes() - block->_num_succs + 0);
753 block->map_node(proj_always, block->number_of_nodes() - block->_num_succs + 1);
754 }
750 755
751 // Place the fall through block after this block. 756 // Place the fall through block after this block.
752 Block *bs1 = block->non_connector_successor(1); 757 Block *bs1 = block->non_connector_successor(1);
753 if (bs1 != bnext && move_to_next(bs1, block_pos)) { 758 if (bs1 != bnext && move_to_next(bs1, block_pos)) {
754 bnext = bs1; 759 bnext = bs1;