Request for reviews (S): 7143491: G1 C2 CTW: assert(p2x->outcnt() == 2) failed: expects 2 users: Xor and URShift nodes
vladimir.kozlov at oracle.com
Tue Feb 7 16:25:58 PST 2012
Tom Rodriguez wrote:
> On Feb 7, 2012, at 3:05 PM, Vladimir Kozlov wrote:
>> 7143491: G1 C2 CTW: assert(p2x->outcnt() == 2) failed: expects 2 users: Xor and URShift nodes
>> Constant Propagation or other ideal graph transformation may stored oop value withi NULL oop. As result part of G1 post barrier code (under the value check for NULL) become dead and removed.
>> Adjust the assert and code in eliminate_card_mark() method for such case. I also added the value transformation before generating store's barriers since it could be transformed to NULL and as results barriers will not be needed.
> Is it safe do this in general? I know it will be fine it _gvn is a PhaseGVN but if it's a PhaseIterGVN then we could free val which could still be used in the caller.
My push failed. It seems, even in PhaseGVN we can't call transform() at that
place. I replaced transform() call with explicit NULL type check and using NULL
+ if (_gvn.type(val) == TypePtr::NULL_PTR)
+ val = _gvn.makecon(TypePtr::NULL_PTR);
This way it does not affect passed val node.
>> Verified with failed test.
More information about the hotspot-compiler-dev