[lworld] RFR: 8372824: [lworld] C2 hits "Unexpected argument type" assertion with --enable-preview [v2]
Quan Anh Mai
qamai at openjdk.org
Wed Jan 21 15:43:32 UTC 2026
On Wed, 21 Jan 2026 11:29:18 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Unfortunately, the `CallNode` here does not have a generator, because it is created just above. Checking `is_late_inline` does not work either, because we are too deep handling now. `LateInlineVirtualCallGenerator::do_late_inline_check` calls into `Compile::call_generator` to find the replacement. This method, after deciding that it does not want to inline the callee, will create a `PredictedCallGenerator` with the fast path being a `DirectCallGenerator`. And this `DirectCallGenerator` is the one calling the method we are in, and this subclass of `CallGenerator` does not return `true` for `is_late_inline()`.
>
> Ah, too bad. What about `Compile::strength_reduction` that @dafedafe introduced with https://github.com/openjdk/valhalla/pull/1768? I think it would just be nice to have a strong assert here because these kind of asserts helped in the past to catch cases where we failed to scalarize early.
Thanks for the pointer, I have added some asserts that we are during call devirtualization, not during parsing.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1935#discussion_r2713148087
More information about the valhalla-dev
mailing list