RFR(S): 8241041: C2: "assert((Value(phase) == t) || (t != TypeInt::CC_GT && t != TypeInt::CC_EQ)) failed: missing Value() optimization" still happens after fix for 8239335

Tobias Hartmann tobias.hartmann at oracle.com
Mon Mar 30 08:05:22 UTC 2020


Hi Roland,

looks good to me.

Comments (no new webrev required):
- "Node* cmp" and "const Type* t" declarations should be part of the #ifdef ASSERT.
- Please replace the ShouldNotReachHere by a fatal or assert(false) with a debug message

Best regards,
Tobias

On 24.03.20 10:57, Roland Westrelin wrote:
> 
> http://cr.openjdk.java.net/~roland/8241041/webrev.00/
> 
> See the test case: at parse time, the type of the cloned object is not
> accurate. The clone() intrinsic creates an Allocate node and a
> CheckCastPP. The type of the CheckCastPP is AbstractClass. As
> compilation proceeds the type of the allocation becomes known
> (ConcreteSubClass1). The klass input to the Allocate node improves but
> not the type of the CheckCastPP.  Expanding the SubTypeCheck to a
> LoadKlass + a CmpP can constant fold this pattern. The SubTypeCheck
> can't because the current logic is based on the type of its inputs (so
> AbstractClass in this case). Adding special handling for the pattern
> where the SubTypeCheck input is an Allocate node fixes this.
> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list