On Tue, 20 Jan 2026 19:01:14 GMT, Quan Anh Mai <[email protected]> wrote:
>> src/hotspot/share/opto/graphKit.cpp line 1960: >> >>> 1958: // scalarized receiver instead. >>> 1959: assert(arg_idx == 0 && !call->method()->is_static(), "must >>> be the receiver"); >>> 1960: arg = InlineTypeNode::make_from_oop(this, arg, >>> t->inline_klass()); >> >> So this is post-parse call-devirtualization, i.e. >> [JDK-8257211](https://bugs.openjdk.org/browse/JDK-8257211), right? Could we >> assert `call->generator()->is_virtual_late_inline()` here? > > 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. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1935#discussion_r2712152107
