[9] RFR (XS): 8153357: C2 creates incorrect cast after eliminating phi with unique input
Zoltán Majó
zoltan.majo at oracle.com
Fri Apr 15 15:11:37 UTC 2016
Hi Vladimir,
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:
http://cr.openjdk.java.net/~zmajo/8153357/webrev.01/
RBT testing passes. I did ~70 runs with the reproducer, no problems have
shown up so far. I'll do ~900 more runs, though.
Thank you!
Best regards,
Zoltan
>
> Thanks,
> Vladimir
>
> On 4/14/16 6:21 AM, Zoltán Majó wrote:
>> Hi,
>>
>>
>> please review the patch for 8153357.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8153357
>>
>> Problem: When determining the unique input of a phi, the C2 compiler
>> removes cast nodes connecting the phi to its unique input.
>> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/a76d63163758/src/share/vm/opto/cfgnode.cpp#l1181
>>
>>
>> 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
>> CheckCastPP).
>> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/a76d63163758/src/share/vm/opto/cfgnode.cpp#l1705
>>
>>
>> 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
>> description:
>> https://bugs.openjdk.java.net/browse/JDK-8153357?focusedCommentId=13927108&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13927108
>>
>>
>>
>> Solution: Refine C2's logic to determine the type of cast node added.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~zmajo/8153357/webrev.00/
>>
>> Testing:
>> - 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,
>>
>>
>> Zoltan
>>
More information about the hotspot-compiler-dev
mailing list