--- a/src/hotspot/share/opto/memnode.cpp Thu Nov 01 11:42:59 2018 -0400
+++ b/src/hotspot/share/opto/memnode.cpp Wed Nov 07 20:21:35 2018 +0100
@@ -1697,7 +1697,7 @@
// as to alignment, which will therefore produce the smallest
// possible base offset.
const int min_base_off = arrayOopDesc::base_offset_in_bytes(T_BYTE);
- const bool off_beyond_header = ((uint)off >= (uint)min_base_off);
+ const bool off_beyond_header = (off >= min_base_off);
// Try to constant-fold a stable array element.
if (FoldStableValues && !is_mismatched_access() && ary->is_stable()) {
@@ -1734,7 +1734,7 @@
&& Opcode() != Op_LoadKlass && Opcode() != Op_LoadNKlass) {
// t might actually be lower than _type, if _type is a unique
// concrete subclass of abstract class t.
- if (off_beyond_header) { // is the offset beyond the header?
+ if (off_beyond_header || off == Type::OffsetBot) { // is the offset beyond the header?
const Type* jt = t->join_speculative(_type);
// In any case, do not allow the join, per se, to empty out the type.
if (jt->empty() && !t->empty()) {