--- a/hotspot/src/share/vm/opto/addnode.cpp Mon Dec 17 11:00:22 2012 -0800
+++ b/hotspot/src/share/vm/opto/addnode.cpp Tue Dec 18 14:55:25 2012 +0100
@@ -189,6 +189,11 @@
set_req(1, addx);
set_req(2, a22);
progress = this;
+ PhaseIterGVN *igvn = phase->is_IterGVN();
+ if (add2->outcnt() == 0 && igvn) {
+ // add disconnected.
+ igvn->_worklist.push(add2);
+ }
}
}
@@ -624,6 +629,11 @@
if( t22->singleton() && (t22 != Type::TOP) ) { // Right input is an add of a constant?
set_req(Address, phase->transform(new (phase->C) AddPNode(in(Base),in(Address),add->in(1))));
set_req(Offset, add->in(2));
+ PhaseIterGVN *igvn = phase->is_IterGVN();
+ if (add->outcnt() == 0 && igvn) {
+ // add disconnected.
+ igvn->_worklist.push((Node*)add);
+ }
return this; // Made progress
}
}