--- 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;