[lworld] RFR: 8228361: [lworld] Optimize the substitutability check in C2 [v3]
Tobias Hartmann
thartmann at openjdk.org
Thu Dec 18 16:05:42 UTC 2025
On Thu, 18 Dec 2025 15:52:23 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> Not sure if I'm following, do you mean by inverting the condition of `if (this_field->is_InlineType()) {`?
>
> I meant
> ```c++
> if (ft->is_primitive_type()) {
> acmp_val_guard();
> } else if (this_type->is_InlineType()) {
> ...
> } else {
> assert()
> }
>
> But now that I wrote it down, I fail to see the benefit.
I don't think that would be equivalent / correct though because we need to take that path as well when `!ft->is_primitive_type()`, right? The field can be of an object type that is `!ft->as_klass()->can_be_inline_klass()`.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1823#discussion_r2631668585
More information about the valhalla-dev
mailing list