src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/addnode.cpp Thu Mar 16 19:06:15 2017
--- new/src/share/vm/opto/addnode.cpp Thu Mar 16 19:06:15 2017
*** 614,623 ****
--- 614,634 ----
// If this is a NULL+long form (from unsafe accesses), switch to a rawptr.
if (phase->type(in(Address)) == TypePtr::NULL_PTR) {
Node* offset = in(Offset);
return new CastX2PNode(offset);
}
+ // Mixed unsafe access with non-null base. Convert to on-heap access.
+ if (in(Address)->is_CheckCastPP() &&
+ in(Address)->bottom_type()->isa_rawptr()) {
+ Node* base = in(Address)->in(1);
+ const TypePtr* base_type = phase->type(base)->isa_oopptr();
+ if (base_type != NULL &&
+ !TypePtr::NULL_PTR->higher_equal(base_type) &&
+ base_type->offset() == 0 /* always? convert to assert? */) {
+ return new AddPNode(base, base, in(Offset));
+ }
+ }
}
// If the right is an add of a constant, push the offset down.
// Convert: (ptr + (offset+con)) into (ptr+offset)+con.
// The idea is to merge array_base+scaled_index groups together,
src/share/vm/opto/addnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File