aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/memnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/opto/memnode.cpp')
-rw-r--r--src/share/vm/opto/memnode.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp
index 3a6d4998b..7330f77ff 100644
--- a/src/share/vm/opto/memnode.cpp
+++ b/src/share/vm/opto/memnode.cpp
@@ -306,33 +306,16 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) {
int alias_idx = phase->C->get_alias_index(t_adr->is_ptr());
}
-#ifdef ASSERT
Node* base = NULL;
- if (address->is_AddP())
+ if (address->is_AddP()) {
base = address->in(AddPNode::Base);
+ }
if (base != NULL && phase->type(base)->higher_equal(TypePtr::NULL_PTR) &&
!t_adr->isa_rawptr()) {
// Note: raw address has TOP base and top->higher_equal(TypePtr::NULL_PTR) is true.
- Compile* C = phase->C;
- tty->cr();
- tty->print_cr("===== NULL+offs not RAW address =====");
- if (C->is_dead_node(this->_idx)) tty->print_cr("'this' is dead");
- if ((ctl != NULL) && C->is_dead_node(ctl->_idx)) tty->print_cr("'ctl' is dead");
- if (C->is_dead_node(mem->_idx)) tty->print_cr("'mem' is dead");
- if (C->is_dead_node(address->_idx)) tty->print_cr("'address' is dead");
- if (C->is_dead_node(base->_idx)) tty->print_cr("'base' is dead");
- tty->cr();
- base->dump(1);
- tty->cr();
- this->dump(2);
- tty->print("this->adr_type(): "); adr_type()->dump(); tty->cr();
- tty->print("phase->type(address): "); t_adr->dump(); tty->cr();
- tty->print("phase->type(base): "); phase->type(address)->dump(); tty->cr();
- tty->cr();
- }
- assert(base == NULL || t_adr->isa_rawptr() ||
- !phase->type(base)->higher_equal(TypePtr::NULL_PTR), "NULL+offs not RAW address?");
-#endif
+ // Skip this node optimization if its address has TOP base.
+ return NodeSentinel; // caller will return NULL
+ }
// Avoid independent memory operations
Node* old_mem = mem;