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

Sandhya Viswanathan sviswanathan at openjdk.java.net
Wed Jun 23 00:48:52 UTC 2021


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk17/pull/114/files
  - new: https://git.openjdk.java.net/jdk17/pull/114/files/2c92d5ba..41f09700

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk17&pr=114&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk17&pr=114&range=00-01

  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/114.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/114/head:pull/114

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


More information about the hotspot-compiler-dev mailing list