mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
7044738: Loop unroll optimization causes incorrect result
Take into account memory dependencies when clonning nodes in clone_up_backedge_goo(). Reviewed-by: never
This commit is contained in:
parent
565f8579ac
commit
b3505a88a4
7 changed files with 211 additions and 13 deletions
|
@ -391,13 +391,9 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
|
|||
}
|
||||
}
|
||||
// Check if an appropriate new value phi already exists.
|
||||
Node* new_phi = NULL;
|
||||
uint size = value_phis->size();
|
||||
for (uint i=0; i < size; i++) {
|
||||
if ( mem->_idx == value_phis->index_at(i) ) {
|
||||
return value_phis->node_at(i);
|
||||
}
|
||||
}
|
||||
Node* new_phi = value_phis->find(mem->_idx);
|
||||
if (new_phi != NULL)
|
||||
return new_phi;
|
||||
|
||||
if (level <= 0) {
|
||||
return NULL; // Give up: phi tree too deep
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue