< prev index next >
src/hotspot/share/opto/graphKit.cpp
Print this page
@@ -3724,10 +3724,14 @@
// Given an oop pointer or raw pointer, see if it feeds from an AllocateNode.
AllocateNode* AllocateNode::Ideal_allocation(Node* ptr, PhaseTransform* phase) {
if (ptr == NULL) { // reduce dumb test in callers
return NULL;
}
+
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ ptr = bs->step_over_gc_barrier(ptr);
+
if (ptr->is_CheckCastPP()) { // strip only one raw-to-oop cast
ptr = ptr->in(1);
if (ptr == NULL) return NULL;
}
// Return NULL for allocations with several casts:
< prev index next >