8215755: ZGC: split_barrier_thru_phi: check number of inputs of phi
Reviewed-by: pliden, thartmann
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Wed Jan 09 07:52:45 2019 -0500
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Wed Jan 09 15:36:20 2019 +0100
@@ -1170,7 +1170,7 @@
if (lb->in(LoadBarrierNode::Oop)->is_Phi()) {
Node* oop_phi = lb->in(LoadBarrierNode::Oop);
- if (oop_phi->in(2) == oop_phi) {
+ if ((oop_phi->req() != 3) || (oop_phi->in(2) == oop_phi)) {
// Ignore phis with only one input
return false;
}