1.1 --- a/src/share/vm/opto/lcm.cpp Wed Apr 06 16:02:53 2011 -0700 1.2 +++ b/src/share/vm/opto/lcm.cpp Fri Apr 08 14:19:50 2011 -0700 1.3 @@ -688,20 +688,22 @@ 1.4 } 1.5 ready_cnt[n->_idx] = local; // Count em up 1.6 1.7 +#ifdef ASSERT 1.8 + if( UseConcMarkSweepGC || UseG1GC ) { 1.9 + if( n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_StoreCM ) { 1.10 + // Check the precedence edges 1.11 + for (uint prec = n->req(); prec < n->len(); prec++) { 1.12 + Node* oop_store = n->in(prec); 1.13 + if (oop_store != NULL) { 1.14 + assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark"); 1.15 + } 1.16 + } 1.17 + } 1.18 + } 1.19 +#endif 1.20 + 1.21 // A few node types require changing a required edge to a precedence edge 1.22 // before allocation. 1.23 - if( UseConcMarkSweepGC || UseG1GC ) { 1.24 - if( n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_StoreCM ) { 1.25 - // Note: Required edges with an index greater than oper_input_base 1.26 - // are not supported by the allocator. 1.27 - // Note2: Can only depend on unmatched edge being last, 1.28 - // can not depend on its absolute position. 1.29 - Node *oop_store = n->in(n->req() - 1); 1.30 - n->del_req(n->req() - 1); 1.31 - n->add_prec(oop_store); 1.32 - assert(cfg->_bbs[oop_store->_idx]->_dom_depth <= this->_dom_depth, "oop_store must dominate card-mark"); 1.33 - } 1.34 - } 1.35 if( n->is_Mach() && n->req() > TypeFunc::Parms && 1.36 (n->as_Mach()->ideal_Opcode() == Op_MemBarAcquire || 1.37 n->as_Mach()->ideal_Opcode() == Op_MemBarVolatile) ) {