8031188: Fix for 8029015: PPC64 (part 216): opto: trap based null and range checks

Mon, 06 Jan 2014 11:02:21 +0100

author
goetz
date
Mon, 06 Jan 2014 11:02:21 +0100
changeset 6500
4345c6a92f35
parent 6499
ad3b94907eed
child 6501
c668f307a4c0

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

src/share/vm/opto/block.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/block.cpp	Fri Dec 20 13:51:14 2013 +0100
     1.2 +++ b/src/share/vm/opto/block.cpp	Mon Jan 06 11:02:21 2014 +0100
     1.3 @@ -748,6 +748,11 @@
     1.4    block->_succs.map(0, get_block_for_node(proj_never ->raw_out(0)));   // The target of the trap.
     1.5    block->_succs.map(1, get_block_for_node(proj_always->raw_out(0)));   // The fall through target.
     1.6  
     1.7 +  if (block->get_node(block->number_of_nodes() - block->_num_succs + 1) != proj_always) {
     1.8 +    block->map_node(proj_never,  block->number_of_nodes() - block->_num_succs + 0);
     1.9 +    block->map_node(proj_always, block->number_of_nodes() - block->_num_succs + 1);
    1.10 +  }
    1.11 +
    1.12    // Place the fall through block after this block.
    1.13    Block *bs1 = block->non_connector_successor(1);
    1.14    if (bs1 != bnext && move_to_next(bs1, block_pos)) {

mercurial