8007294: ReduceFieldZeroing doesn't check for dependent load and can lead to incorrect execution

InitializeNode::can_capture_store() must check that the captured store doesn't overwrite a memory location that is loaded before the store.

Reviewed-by: kvn
This commit is contained in:
Roland Westrelin 2013-02-25 14:13:04 +01:00
parent c444c1faea
commit fe92862089
5 changed files with 206 additions and 7 deletions

View file

@ -1261,6 +1261,7 @@ static void kill_dead_code( Node *dead, PhaseIterGVN *igvn ) {
if (dead->is_expensive()) {
igvn->C->remove_expensive_node(dead);
}
igvn->C->record_dead_node(dead->_idx);
// Kill all inputs to the dead guy
for (uint i=0; i < dead->req(); i++) {
Node *n = dead->in(i); // Get input to dead guy