RFR: 8302673: [SuperWord] MaxReduction and MinReduction should vectorize for int [v2]

Roberto CastaƱeda Lozano rcastanedalo at openjdk.org
Wed May 31 07:17:00 UTC 2023


On Wed, 17 May 2023 10:56:36 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Int.java line 82:
>> 
>>> 80:         for (int i = 0; i < a.length; i++) {
>>> 81:             a[i] = -i;
>>> 82:             b[i] = i;
>> 
>> That means that `a[i] * b[i] == -i*i`, and get increasingly smaller. I think it would be better if this was a bit more random, and not biased to the maximum always being at the beginning and the minimum at the end.
>
> Plus, we should try to cover the whole int range, or at least as much as possible.
> One solution: just pick two random ints, and then add/subtract them before min/max.

Thanks for the suggestion, I randomized the input values now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13924#discussion_r1211194254


More information about the hotspot-compiler-dev mailing list