RFR: 8309531: Incorrect result with unwrapped iotaShuffle. [v3]

Xiaohong Gong xgong at openjdk.org
Fri Jun 30 06:58:00 UTC 2023


On Fri, 30 Jun 2023 06:52:51 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Adding string overflow range check, NULL to nullptr replacements.
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 617:
> 
>> 615:     int effective_max_index = start_val->get_con() + step_val->get_con() * (num_elem - 1);
>> 616:     effective_indices_in_range = effective_min_index >= -128 && effective_max_index <= 127;
>> 617:   }
> 
> May I ask why we need to fall-back to java implementation if the indices are in-effective for constant vals?  While if the `start_val` and `step_val` are not all constants, for in-effective-indices, it subs to the lanecount? Is there any difference for constant and variable inputs?

An alternative is moving this effective indice checking for constant values in java level. C2 compiler may optimize out it for most cases?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14700#discussion_r1247504088


More information about the hotspot-compiler-dev mailing list