6954029: Improve implicit null check generation with compressed oops

Hoist DecodeN instruction above null check

Reviewed-by: never, twisti
This commit is contained in:
Vladimir Kozlov 2010-06-02 09:49:32 -07:00
parent be95b163a6
commit a3005a16fc
9 changed files with 119 additions and 21 deletions

View file

@ -437,7 +437,7 @@ 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() || (in(1)->is_DecodeN() && Universe::narrow_oop_use_implicit_null_checks())) {
if (!t->isa_oop_ptr() || (in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks())) {
return NULL; // do not transform raw pointers or narrow oops
}
return ConstraintCastNode::Ideal_DU_postCCP(ccp);