[lworld] Integrated: 8274950: [lworld] LoadNode::Identity optimization should not skip casts
Tobias Hartmann
thartmann at openjdk.java.net
Tue Oct 19 13:29:22 UTC 2021
On Tue, 19 Oct 2021 11:26:19 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> When implementing scalarization of nullable inline types with [JDK-8267665](https://bugs.openjdk.java.net/browse/JDK-8267665), I added code to skip cast nodes. This allows the `LoadNode::Identity` optimization to fold loads from `InlineTypePtrNodes` that are hidden behind casts. However, skipping casts is often not correct because not only do we potentially lose type information but the cast could also fail. In the reported case, we hit an assert because we are loading from an offset that does not correspond to a field in the inline type (because the cast would fail).
>
> This patch handles cast nodes properly by pushing them up through the InlineTypePtrNode oop input.
>
> Best regards,
> Tobias
This pull request has now been integrated.
Changeset: df020e01
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.java.net/valhalla/commit/df020e0183e5edc546af2135510b68bef364a514
Stats: 115 lines in 6 files changed: 93 ins; 1 del; 21 mod
8274950: [lworld] LoadNode::Identity optimization should not skip casts
-------------
PR: https://git.openjdk.java.net/valhalla/pull/566
More information about the valhalla-dev
mailing list