< prev index next >

src/hotspot/share/opto/subnode.cpp

Print this page

        

@@ -832,13 +832,14 @@
 //=============================================================================
 //------------------------------sub--------------------------------------------
 // Simplify an CmpP (compare 2 pointers) node, based on local information.
 // If both inputs are constants, compare them.
 const Type *CmpPNode::sub( const Type *t1, const Type *t2 ) const {
-  if (t1->isa_valuetype() || t2->isa_valuetype() ||
+  if (ACmpOnValues != 3 &&
+      (t1->isa_valuetype() || t2->isa_valuetype() ||
       ((t1->is_valuetypeptr() || t2->is_valuetypeptr()) &&
-      (!t1->maybe_null() || !t2->maybe_null()))) {
+        (!t1->maybe_null() || !t2->maybe_null())))) {
     // One operand is a value type and one operand is never null, fold to constant false
     return TypeInt::CC_GT;
   }
 
   const TypePtr *r0 = t1->is_ptr(); // Handy access

@@ -1104,11 +1105,11 @@
     Node* base = addP->in(AddPNode::Base);
     if (base->is_top()) {
       // RawPtr comparison
       return NULL;
     }
-    assert(EnableValhalla && UsePointerPerturbation, "unexpected perturbed oop");
+    assert(EnableValhalla && ACmpOnValues == 1, "unexpected perturbed oop");
     return in(1);
   }
   return NULL;
 }
 
< prev index next >