From 0e3da924ad1c923da75642dc3aff1a151608e7e1 Mon Sep 17 00:00:00 2001 From: adlertz Date: Wed, 8 Jan 2014 12:05:19 +0100 Subject: [PATCH] 8029446: assert(_cfg.get_block_for_node(proj) == borig) failed: incorrect block for kill projections Summary: Added loadConP0 projection node to block in case of re-materialization of the loadConP0. x86_64 only. Reviewed-by: kvn --- src/share/vm/opto/chaitin.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/share/vm/opto/chaitin.cpp b/src/share/vm/opto/chaitin.cpp index 492bf384f..47fa4ba6b 100644 --- a/src/share/vm/opto/chaitin.cpp +++ b/src/share/vm/opto/chaitin.cpp @@ -1682,9 +1682,21 @@ Node *PhaseChaitin::find_base_for_derived( Node **derived_base_map, Node *derive // (where top() node is placed). base->init_req(0, _cfg.get_root_node()); Block *startb = _cfg.get_block_for_node(C->top()); - startb->insert_node(base, startb->find_node(C->top())); + uint node_pos = startb->find_node(C->top()); + startb->insert_node(base, node_pos); _cfg.map_node_to_block(base, startb); assert(_lrg_map.live_range_id(base) == 0, "should not have LRG yet"); + + // The loadConP0 might have projection nodes depending on architecture + // Add the projection nodes to the CFG + for (DUIterator_Fast imax, i = base->fast_outs(imax); i < imax; i++) { + Node* use = base->fast_out(i); + if (use->is_MachProj()) { + startb->insert_node(use, ++node_pos); + _cfg.map_node_to_block(use, startb); + new_lrg(use, maxlrg++); + } + } } if (_lrg_map.live_range_id(base) == 0) { new_lrg(base, maxlrg++); -- GitLab