comparison src/share/vm/opto/library_call.cpp @ 4894:b9bc6cae88f2

7143491: G1 C2 CTW: assert(p2x->outcnt() == 2) failed: expects 2 users: Xor and URShift nodes Summary: Adjust the assert and code in eliminate_card_mark() method for case when stored value is NULL. Reviewed-by: iveresov, never
author kvn
date Tue, 07 Feb 2012 16:33:43 -0800
parents 35acf8f0a2e4
children f174909614bd
comparison
equal deleted inserted replaced
4893:5e9fba4e8718 4894:b9bc6cae88f2
2676 break; 2676 break;
2677 case T_LONG: 2677 case T_LONG:
2678 cas = _gvn.transform(new (C, 5) CompareAndSwapLNode(control(), mem, adr, newval, oldval)); 2678 cas = _gvn.transform(new (C, 5) CompareAndSwapLNode(control(), mem, adr, newval, oldval));
2679 break; 2679 break;
2680 case T_OBJECT: 2680 case T_OBJECT:
2681 // reference stores need a store barrier. 2681 // Transformation of a value which could be NULL pointer (CastPP #NULL)
2682 // could be delayed during Parse (for example, in adjust_map_after_if()).
2683 // Execute transformation here to avoid barrier generation in such case.
2684 if (_gvn.type(newval) == TypePtr::NULL_PTR)
2685 newval = _gvn.makecon(TypePtr::NULL_PTR);
2686
2687 // Reference stores need a store barrier.
2682 // (They don't if CAS fails, but it isn't worth checking.) 2688 // (They don't if CAS fails, but it isn't worth checking.)
2683 pre_barrier(true /* do_load*/, 2689 pre_barrier(true /* do_load*/,
2684 control(), base, adr, alias_idx, newval, value_type->make_oopptr(), 2690 control(), base, adr, alias_idx, newval, value_type->make_oopptr(),
2685 NULL /* pre_val*/, 2691 NULL /* pre_val*/,
2686 T_OBJECT); 2692 T_OBJECT);