[jdk17] RFR: 8266854: LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out [v2]
Jatin Bhateja
jbhateja at openjdk.java.net
Wed Jun 23 02:52:31 UTC 2021
On Wed, 23 Jun 2021 00:48:52 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> LibraryCallKit::inline_preconditions_checkIndex can result in the following assert sometimes:
>> "# assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out"
>>
>> Consider the following code snippet:
>> ...
>> set_control(_gvn.transform(new IfTrueNode(rc)));
>> {
>> PreserveJVMState pjvms(this);
>> set_control(_gvn.transform(new IfFalseNode(rc)));
>> uncommon_trap(Deoptimization::Reason_range_check,
>> Deoptimization::Action_make_not_entrant);
>> }
>> ..
>> Here the control is being modified by set_control and afterwards a bailout happens.
>>
>> The fix is as per discussion on https://github.com/openjdk/jdk/pull/3958.
>>
>> Best Regards,
>> Sandhya
>
> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>
> Added comments
Thanks @sviswa7
-------------
Marked as reviewed by jbhateja (Committer).
PR: https://git.openjdk.java.net/jdk17/pull/114
More information about the hotspot-compiler-dev
mailing list