RFR: 8354282: C2: more crashes in compiled code because of dependency on removed range check CastIIs [v3]
Emanuel Peter
epeter at openjdk.org
Wed Nov 12 08:33:31 UTC 2025
On Wed, 12 Nov 2025 08:19:21 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/castnode.cpp line 625:
>>
>>> 623: if (!phase->C->post_loop_opts_phase()) {
>>> 624: return this_type;
>>> 625: }
>>
>> Honestly, I would prefer to see this "delay to post loop opts" to be done outside of `widen_type`. It would just make more sense there. What do you think?
>
> But maybe that is a refactoring for a separate RFE, and then not really worth it.
But conceptually, we want to say: if we are in post loop opts, then widen the types.
Now it looks like we want to widen always ... but then we check for post loop opts inside the method and bail out anyway. Not very transparent. Another idea: rename the method to `widen_type_in_post_loop_opts`.
Totally up to you though.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24575#discussion_r2517350982
More information about the graal-dev
mailing list