mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8077504: Unsafe load can loose control dependency and cause crash
Node::depends_only_on_test() should return false for Unsafe loads Reviewed-by: kvn, adinn
This commit is contained in:
parent
9f6b61b959
commit
a3c77df5f1
13 changed files with 228 additions and 67 deletions
|
@ -437,7 +437,13 @@ class Invariance : public StackObj {
|
|||
}
|
||||
}
|
||||
if (all_inputs_invariant) {
|
||||
_invariant.set(n->_idx); // I am a invariant too
|
||||
// If n's control is a predicate that was moved out of the
|
||||
// loop, it was marked invariant but n is only invariant if
|
||||
// it depends only on that test. Otherwise, unless that test
|
||||
// is out of the loop, it's not invariant.
|
||||
if (n->is_CFG() || n->depends_only_on_test() || n->in(0) == NULL || !_phase->is_member(_lpt, n->in(0))) {
|
||||
_invariant.set(n->_idx); // I am a invariant too
|
||||
}
|
||||
}
|
||||
} else { // process next input
|
||||
_stack.set_index(idx + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue