--- a/hotspot/src/share/vm/opto/machnode.cpp Thu Mar 26 14:39:39 2009 -0700
+++ b/hotspot/src/share/vm/opto/machnode.cpp Thu Mar 26 15:04:55 2009 -0700
@@ -340,6 +340,10 @@
if (base == NodeSentinel) return TypePtr::BOTTOM;
const Type* t = base->bottom_type();
+ if (UseCompressedOops && Universe::narrow_oop_shift() == 0) {
+ // 32-bit unscaled narrow oop can be the base of any address expression
+ t = t->make_ptr();
+ }
if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
// We cannot assert that the offset does not look oop-ish here.
// Depending on the heap layout the cardmark base could land
@@ -353,6 +357,7 @@
// be conservative if we do not recognize the type
if (tp == NULL) {
+ assert(false, "this path may produce not optimal code");
return TypePtr::BOTTOM;
}
assert(tp->base() != Type::AnyPtr, "not a bare pointer");