6880574: C2 assert in escape.cpp:445 on linux-amd64
Summary: Look through chained AddP nodes in get_addp_base().
Reviewed-by: jrose
--- a/hotspot/src/share/vm/opto/escape.cpp Wed Sep 09 16:28:03 2009 -0700
+++ b/hotspot/src/share/vm/opto/escape.cpp Thu Sep 10 10:36:24 2009 -0700
@@ -439,6 +439,11 @@
Node *base = addp->in(AddPNode::Base)->uncast();
if (base->is_top()) { // The AddP case #3 and #6.
base = addp->in(AddPNode::Address)->uncast();
+ while (base->is_AddP()) {
+ // Case #6 (unsafe access) may have several chained AddP nodes.
+ assert(base->in(AddPNode::Base)->is_top(), "expected unsafe access address only");
+ base = base->in(AddPNode::Address)->uncast();
+ }
assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal ||
base->Opcode() == Op_CastX2P || base->is_DecodeN() ||
(base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) ||