RFR (XS): 8153357: C2 creates incorrect cast after eliminating phi with unique input
zoltan.majo at oracle.com
Fri Apr 15 15:11:37 UTC 2016
thank you for the feedback!
On 04/15/2016 02:46 AM, Vladimir Kozlov wrote:
> I think check should use !isa_oopptr() since one of nodes could be
> ConP NULL ptr which is not klassptr.
Here is the updated webrev:
RBT testing passes. I did ~70 runs with the reproducer, no problems have
shown up so far. I'll do ~900 more runs, though.
> On 4/14/16 6:21 AM, Zoltán Majó wrote:
>> please review the patch for 8153357.
>> Problem: When determining the unique input of a phi, the C2 compiler
>> removes cast nodes connecting the phi to its unique input.
>> Then (if the phi has indeed a unique input), the C2 compiler attempts
>> replace the phi with a cast node. The new cast node feeds from the
>> unique input.
>> To be able to remove the phi node, the C2 compiler must to determine
>> the type of cast to add in place of the phi node (CastII, CastPP, or
>> The failure in the bug report appears because the C2 compiler adds a
>> cast node of unexpected type to the graph (a CheckCastPP instead of a
>> CastPP when casting between two klass pointers).
>> Please find more details about the cause of the failure in the bug
>> Solution: Refine C2's logic to determine the type of cast node added.
>> - JPRT;
>> - all hotspot compiler tests with RBT (-Xmixed, -Xcomp);
>> - 500 non-failing runs with the reproducer (the problem reproduces
>> with < 100 runs).
>> Thank you and best regards,
More information about the hotspot-compiler-dev