hotspot/src/share/vm/opto/arraycopynode.cpp
changeset 40365 3791c1b34e36
parent 39254 fb4492288b01
child 42086 feac795f345d
--- a/hotspot/src/share/vm/opto/arraycopynode.cpp	Thu Aug 04 08:58:22 2016 +0200
+++ b/hotspot/src/share/vm/opto/arraycopynode.cpp	Thu Aug 04 10:34:34 2016 +0200
@@ -630,6 +630,12 @@
 }
 
 bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac) {
+  if (n->Opcode() == Op_StoreCM ||
+      n->Opcode() == Op_StoreB) {
+    // Ignore card mark stores
+    n = n->in(MemNode::Memory);
+  }
+
   if (n->is_Proj()) {
     n = n->in(0);
     if (n->is_Call() && n->as_Call()->may_modify(t_oop, phase)) {
@@ -657,9 +663,6 @@
           }
         }
       }
-    } else if (n->Opcode() == Op_StoreCM) {
-      // Ignore card mark stores
-      return may_modify_helper(t_oop, n->in(MemNode::Memory), phase, ac);
     }
   }