Integrated: 8290451: Incorrect result when switching to C2 OSR compilation from C1

Roland Westrelin roland at openjdk.org
Tue Aug 30 07:31:26 UTC 2022


On Fri, 19 Aug 2022 08:16:42 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: afa5d4ce
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/afa5d4ced38b7f3752932c28af96d8fc600d1df7
Stats:     113 lines in 3 files changed: 112 ins; 0 del; 1 mod

8290451: Incorrect result when switching to C2 OSR compilation from C1

Reviewed-by: thartmann, kvn

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

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


More information about the hotspot-compiler-dev mailing list