8215755: ZGC: split_barrier_thru_phi: check number of inputs of phi
authorneliasso
Wed, 09 Jan 2019 15:36:20 +0100
changeset 53226 4ff3f9d83fe5
parent 53225 b11483a74e5d
child 53227 f15d443f9731
8215755: ZGC: split_barrier_thru_phi: check number of inputs of phi Reviewed-by: pliden, thartmann
src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
--- 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;
     }