RFR: 8322735: C2: minor improvements of bubble sort used in SuperWord::packset_sort [v2]

Denghui Dong ddong at openjdk.org
Tue Jan 9 05:30:22 UTC 2024


On Mon, 8 Jan 2024 21:05:03 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Denghui Dong has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update
>
> src/hotspot/share/opto/superword.cpp line 3529:
> 
>> 3527:         *(_packset.adr_at(i)) = q_low;
>> 3528:         *(_packset.adr_at(i-1)) = q_i;
>> 3529:         max_swap_index = i;
> 
> So we not using `i+1` here because all previous values should be < than `i`'s
> Right?

Yes.
The last `i`'s value is > previous values and values between `i` and end are already sorted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17190#discussion_r1445640947


More information about the hotspot-compiler-dev mailing list