< prev index next >
src/hotspot/share/opto/macro.cpp
Print this page
*** 708,717 ****
--- 708,719 ----
NOT_PRODUCT(fail_eliminate = "NULL or TOP memory";)
can_eliminate = false;
} else {
safepoints.append_if_missing(sfpt);
}
+ } else if (use->is_ValueType() && use->isa_ValueType()->get_oop() == res) {
+ // ok to eliminate
} else if (use->Opcode() != Op_CastP2X) { // CastP2X is used by card mark
if (use->is_Phi()) {
if (use->outcnt() == 1 && use->unique_out()->Opcode() == Op_Return) {
NOT_PRODUCT(fail_eliminate = "Object is return value";)
} else {
*** 1042,1051 ****
--- 1044,1057 ----
if (src->outcnt() == 0 && !src->is_top()) {
_igvn.remove_dead_node(src);
}
_igvn._worklist.push(ac);
+ } else if (use->is_ValueType()) {
+ assert(use->isa_ValueType()->get_oop() == res, "unexpected value type use");
+ _igvn.rehash_node_delayed(use);
+ use->isa_ValueType()->set_oop(_igvn.zerocon(T_VALUETYPE));
} else {
eliminate_gc_barrier(use);
}
j -= (oc1 - res->outcnt());
}
< prev index next >