RFR: 8305324: C2: Wrong execution of vectorizing Interger.reverseBytes [v4]

Daohan Qu duke at openjdk.org
Tue Apr 11 17:10:38 UTC 2023


On Tue, 11 Apr 2023 16:05:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Daohan Qu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update full name
>
> src/hotspot/share/opto/vectornode.cpp line 440:
> 
>> 438: // of its higher order bits/bytes
>> 439: bool VectorNode::requires_higher_order_bits_of_integer(int opc) {
>> 440:   if (is_shift_opcode(opc) && opc != Op_LShiftI) {
> 
> Checking Op_LShiftI here will change behavior for `Short s = LShiftI(LoadB)` case and similar. May be it is okay and previous code worked because we did not vectorize due to different sizes of destination and Load.

Yes, I see. AFAICS, the if-condition calling this function wants to check whether higher order bits are needed. So I distill the condition content into a function. The `Op_LShiftI` is excluded since it doesn't need such info. Do I miss something? Or does the if-condition should have checked more than what I thought? Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13406#discussion_r1163107639


More information about the hotspot-compiler-dev mailing list