[jdk17] RFR: 8266854: LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out

Vladimir Kozlov kvn at openjdk.java.net
Tue Jun 22 00:15:41 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

Good.

-------------

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.java.net/jdk17/pull/114


More information about the hotspot-compiler-dev mailing list