[jdk17] RFR: 8266854: LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Tue Jun 22 00:22:28 UTC 2021
On Tue, 22 Jun 2021 00:05:39 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
Created a separate RFE for test case https://bugs.openjdk.java.net/browse/JDK-8269107.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/114
More information about the hotspot-compiler-dev
mailing list