6747051: Improve code and implicit null check generation for compressed oops

Push DecodeN node below the Null check to the non-null path to use the mach node without 0 test.

Reviewed-by: rasbold, never
This commit is contained in:
Vladimir Kozlov 2008-09-23 12:29:06 -07:00
parent 4b1e242299
commit b15796424e
6 changed files with 209 additions and 32 deletions

View file

@ -433,8 +433,8 @@ Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
// If not converting int->oop, throw away cast after constant propagation
Node *CastPPNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
const Type *t = ccp->type(in(1));
if (!t->isa_oop_ptr()) {
return NULL; // do not transform raw pointers
if (!t->isa_oop_ptr() || in(1)->is_DecodeN()) {
return NULL; // do not transform raw pointers or narrow oops
}
return ConstraintCastNode::Ideal_DU_postCCP(ccp);
}