1.1 --- a/src/share/vm/opto/loopopts.cpp Thu Jul 31 15:47:42 2008 -0700 1.2 +++ b/src/share/vm/opto/loopopts.cpp Fri Aug 01 10:06:45 2008 -0700 1.3 @@ -96,6 +96,10 @@ 1.4 // our new node, even though we may throw the node away. 1.5 // (Note: This tweaking with igvn only works because x is a new node.) 1.6 _igvn.set_type(x, t); 1.7 + // If x is a TypeNode, capture any more-precise type permanently into Node 1.8 + // othewise it will be not updated during igvn->transform since 1.9 + // igvn->type(x) is set to x->Value() already. 1.10 + x->raise_bottom_type(t); 1.11 Node *y = x->Identity(&_igvn); 1.12 if( y != x ) { 1.13 wins++; 1.14 @@ -464,11 +468,11 @@ 1.15 case T_FLOAT: 1.16 case T_DOUBLE: 1.17 case T_ADDRESS: // (RawPtr) 1.18 - case T_NARROWOOP: 1.19 cost++; 1.20 break; 1.21 + case T_NARROWOOP: // Fall through 1.22 case T_OBJECT: { // Base oops are OK, but not derived oops 1.23 - const TypeOopPtr *tp = phi->type()->isa_oopptr(); 1.24 + const TypeOopPtr *tp = phi->type()->make_ptr()->isa_oopptr(); 1.25 // Derived pointers are Bad (tm): what's the Base (for GC purposes) of a 1.26 // CMOVE'd derived pointer? It's a CMOVE'd derived base. Thus 1.27 // CMOVE'ing a derived pointer requires we also CMOVE the base. If we 1.28 @@ -499,11 +503,11 @@ 1.29 return NULL; // Too much speculative goo 1.30 } 1.31 } 1.32 - // See if the Phi is used by a Cmp. This will likely Split-If, a 1.33 - // higher-payoff operation. 1.34 + // See if the Phi is used by a Cmp or Narrow oop Decode/Encode. 1.35 + // This will likely Split-If, a higher-payoff operation. 1.36 for (DUIterator_Fast kmax, k = phi->fast_outs(kmax); k < kmax; k++) { 1.37 Node* use = phi->fast_out(k); 1.38 - if( use->is_Cmp() ) 1.39 + if( use->is_Cmp() || use->is_DecodeN() || use->is_EncodeP() ) 1.40 return NULL; 1.41 } 1.42 }