--- old/src/share/vm/opto/memnode.cpp 2016-03-25 20:28:57.000000000 +0300 +++ new/src/share/vm/opto/memnode.cpp 2016-03-25 20:28:56.000000000 +0300 @@ -742,7 +742,7 @@ // standard dump does this in Verbose and WizardMode st->print(" #"); _type->dump_on(st); } - if (!_depends_only_on_test) { + if (!depends_only_on_test()) { st->print(" (does not depend only on test)"); } } @@ -914,7 +914,7 @@ } } // load depends on the tests that validate the arraycopy - ld->as_Load()->_depends_only_on_test = Pinned; + ld->as_Load()->_control_dependency = Pinned; return ld; } return NULL; @@ -1118,6 +1118,39 @@ return this; } +// Construct an equivalent unsigned load. +Node* LoadNode::convert_to_unsigned_load(PhaseGVN& gvn) { + BasicType bt = T_ILLEGAL; + const Type* rt = NULL; + switch (Opcode()) { + case Op_LoadUB: return this; + case Op_LoadUS: return this; + case Op_LoadB: bt = T_BOOLEAN; rt = TypeInt::UBYTE; break; + case Op_LoadS: bt = T_CHAR; rt = TypeInt::CHAR; break; + default: + assert(false, "no unsigned variant"); + return NULL; + } + return LoadNode::make(gvn, in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), + adr_type(), rt, bt, _mo, _control_dependency, + is_unaligned_access(), is_mismatched_access()); +} + +// Construct an equivalent signed load. +Node* LoadNode::convert_to_signed_load(PhaseGVN& gvn) { + BasicType bt = T_ILLEGAL; + const Type* rt = NULL; + switch (Opcode()) { + case Op_LoadUB: bt = T_BYTE; rt = TypeInt::BYTE; break; + case Op_LoadUS: bt = T_SHORT; rt = TypeInt::SHORT; break; + default: + return this; // All other loads are signed. + } + return LoadNode::make(gvn, in(MemNode::Control), in(MemNode::Memory), in(MemNode::Address), + adr_type(), rt, bt, _mo, _control_dependency, + is_unaligned_access(), is_mismatched_access()); +} + // We're loading from an object which has autobox behaviour. // If this object is result of a valueOf call we'll have a phi // merging a newly allocated object and a load from the cache.