[lworld] Integrated: 8275824: [lworld] C2 generates unused code (klass ptr check) when oop value of scalarized return is not used

Tobias Hartmann thartmann at openjdk.java.net
Tue Oct 26 06:09:26 UTC 2021


On Mon, 25 Oct 2021 12:30:13 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> When an inline type is returned as fields in registers, one register (`rax` on x86) either contains an oop if the inline type is buffered or a pointer to the corresponding `InlineKlass` with the lowest bit set to 1 (used by the interpreter and C1 to buffer). To use the oop, C2 emits code to zero that register if the lowest bit is set after a call. However, that code should not be emitted if the oop is never used.
> 
> Thanks to @kuksenko for reporting!
> 
> Best regards,
> Tobias

This pull request has now been integrated.

Changeset: e7ddeb2f
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/e7ddeb2f540750908f0712d297fe079429600df9
Stats:     7 lines in 4 files changed: 0 ins; 4 del; 3 mod

8275824: [lworld] C2 generates unused code (klass ptr check) when oop value of scalarized return is not used

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

PR: https://git.openjdk.java.net/valhalla/pull/570



More information about the valhalla-dev mailing list