6731641: assert(m->adr_type() == mach->adr_type(),"matcher should not change adr type")

Fixed few addP node type and narrow oop type problems.

Reviewed-by: rasbold, never
This commit is contained in:
Vladimir Kozlov 2008-08-01 10:06:45 -07:00
parent 5e94e3bf69
commit 897278fce0
11 changed files with 87 additions and 22 deletions

View file

@ -1231,6 +1231,10 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
// our new node, even though we may throw the node away.
// (This tweaking with igvn only works because x is a new node.)
igvn->set_type(x, t);
// If x is a TypeNode, capture any more-precise type permanently into Node
// othewise it will be not updated during igvn->transform since
// igvn->type(x) is set to x->Value() already.
x->raise_bottom_type(t);
Node *y = x->Identity(igvn);
if( y != x ) {
wins++;
@ -1409,7 +1413,7 @@ const Type *LoadNode::Value( PhaseTransform *phase ) const {
// had an original form like p1:(AddP x x (LShiftL quux 3)), where the
// expression (LShiftL quux 3) independently optimized to the constant 8.
if ((t->isa_int() == NULL) && (t->isa_long() == NULL)
&& Opcode() != Op_LoadKlass) {
&& Opcode() != Op_LoadKlass && Opcode() != Op_LoadNKlass) {
// t might actually be lower than _type, if _type is a unique
// concrete subclass of abstract class t.
// Make sure the reference is not into the header, by comparing