RFR: 8374889: C2 VectorAPI: must handle impossible combination of signed cast from float
Quan Anh Mai
qamai at openjdk.org
Tue Jan 13 08:28:00 UTC 2026
On Tue, 13 Jan 2026 07:43:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/vectorIntrinsics.cpp line 2338:
>>
>>> 2336: // expected to violate this at runtime, but we may compile unreachable code
>>> 2337: // where such impossible combinations arise.
>>> 2338: if (is_ucast && (!is_integral_type(elem_bt_from) || elem_bt_from == T_LONG)) {
>>
>> I would suggest eagerly killing this path to be extra sure that it is indeed a dead path and we are not encountering some other issue here.
>
> Hmm, indeed, we could try to put a `Halt` node here, right?
> @merykitty How exactly would you do that? Are there places we already do that?
If you look at the end of `GraphKit::uncommon_trap`, the procedure would look like this:
HaltNode* halt = new HaltNode(control(), frameptr(), "uncommon trap returned which should never happen"
PRODUCT_ONLY(COMMA /*reachable*/false));
_gvn.set_type_bottom(halt);
root()->add_req(halt);
stop_and_kill_map();
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29169#discussion_r2685366719
More information about the hotspot-compiler-dev
mailing list