src/share/vm/opto/loopPredicate.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/loopPredicate.cpp

src/share/vm/opto/loopPredicate.cpp

Print this page
rev 7391 : 8077504: Unsafe load can loose control dependency and cause crash
Summary: Node::depends_only_on_test() should return false for Unsafe loads
Reviewed-by: kvn, adinn

*** 436,447 **** --- 436,453 ---- all_inputs_invariant = false; break; } } if (all_inputs_invariant) { + // 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); Node* m = n->in(idx); if (m != NULL && !_visited.test_set(m->_idx)) { visit(n, m);
src/share/vm/opto/loopPredicate.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File