hotspot/src/share/vm/opto/lcm.cpp
changeset 2254 f13dda645a4b
parent 2022 28ce8115a91d
child 2259 d3c946e7f127
--- a/hotspot/src/share/vm/opto/lcm.cpp	Wed Mar 11 14:16:13 2009 -0700
+++ b/hotspot/src/share/vm/opto/lcm.cpp	Thu Mar 12 10:37:46 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;