RFR: 8290451: Incorrect result when switching to C2 OSR compilation from C1 [v2]

Roland Westrelin roland at openjdk.org
Mon Aug 29 09:12:01 UTC 2022


> In BadStateAtLongCmp.test(), the field increment is between the lcmp
> and iflt bytecodes that implement the loop exit condition (handcrafted
> bytecodes required as such a sequence is not generated by javac). When
> compiled by C1, lcmp+iflt is canonicalized to a single If and it
> captures the state of the lcmp bytecode. Tiered compilation attaches
> the state to a deoptimization call to switch to an OSR
> compilation. That state causes the field increment to be reexecuted
> when the switch to a C2 method occurs at the backbranch. Proposed fix
> is to use the state at the iflt instead.

Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - change class file verson
 - Merge branch 'master' into JDK-8290451
 - comment
 - fix
 - test

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/9938/files
  - new: https://git.openjdk.org/jdk/pull/9938/files/61be28c2..d0a821aa

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9938&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9938&range=00-01

  Stats: 8793 lines in 375 files changed: 5338 ins; 1364 del; 2091 mod
  Patch: https://git.openjdk.org/jdk/pull/9938.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9938/head:pull/9938

PR: https://git.openjdk.org/jdk/pull/9938


More information about the hotspot-compiler-dev mailing list