diff src/share/vm/opto/connode.cpp @ 368:36ccc817fca4

6747051: Improve code and implicit null check generation for compressed oops Summary: Push DecodeN node below the Null check to the non-null path to use the mach node without 0 test. Reviewed-by: rasbold, never
author kvn
date Tue, 23 Sep 2008 12:29:06 -0700
parents ab075d07f1ba
children 98cb887364d3
line wrap: on
line diff
--- a/src/share/vm/opto/connode.cpp	Wed Sep 17 12:59:52 2008 -0700
+++ b/src/share/vm/opto/connode.cpp	Tue Sep 23 12:29:06 2008 -0700
@@ -433,8 +433,8 @@
 // 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);
 }