7143491: G1 C2 CTW: assert(p2x->outcnt() == 2) failed: expects 2 users: Xor and URShift nodes

Adjust the assert and code in eliminate_card_mark() method for case when stored value is NULL.

Reviewed-by: iveresov, never
This commit is contained in:
Vladimir Kozlov 2012-02-07 16:33:43 -08:00
parent 2856b9535e
commit e6015c7c26
3 changed files with 23 additions and 5 deletions

View file

@ -1522,6 +1522,11 @@ Node* GraphKit::store_oop(Node* ctl,
const TypeOopPtr* val_type,
BasicType bt,
bool use_precise) {
// Transformation of a value which could be NULL pointer (CastPP #NULL)
// could be delayed during Parse (for example, in adjust_map_after_if()).
// Execute transformation here to avoid barrier generation in such case.
if (_gvn.type(val) == TypePtr::NULL_PTR)
val = _gvn.makecon(TypePtr::NULL_PTR);
set_control(ctl);
if (stopped()) return top(); // Dead path ?