hotspot/src/share/vm/opto/lcm.cpp
changeset 2259 d3c946e7f127
parent 2105 347008ce7984
parent 2254 f13dda645a4b
child 2348 4e71ed4c2709
--- a/hotspot/src/share/vm/opto/lcm.cpp	Wed Mar 18 11:37:48 2009 -0400
+++ b/hotspot/src/share/vm/opto/lcm.cpp	Thu Mar 19 09:13:24 2009 -0700
@@ -158,7 +158,14 @@
           continue;             // Give up if offset is beyond page size
         // cannot reason about it; is probably not implicit null exception
       } else {
-        const TypePtr* tptr = base->bottom_type()->is_ptr();
+        const TypePtr* tptr;
+        if (UseCompressedOops && Universe::narrow_oop_shift() == 0) {
+          // 32-bits narrow oop can be the base of address expressions
+          tptr = base->bottom_type()->make_ptr();
+        } else {
+          // only regular oops are expected here
+          tptr = base->bottom_type()->is_ptr();
+        }
         // Give up if offset is not a compile-time constant
         if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot )
           continue;