RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v6]

Jatin Bhateja jbhateja at openjdk.org
Fri Apr 7 14:22:57 UTC 2023


On Fri, 7 Apr 2023 12:36:04 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   small cosmetics
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java line 226:
> 
>> 224: 
>> 225:         AbstractSpecies<?> species = vspecies().asIntegral();
>> 226:         Vector iota = species.iota();
> 
> we can do an early exist by returning species..iota() if start = 0 and step = 1

Power of two step count may be replaced by logical right shifts. But special handling may impact generic path
, currently c2 inline expander handles these special cases.

Alternatively we can keep this implementation at its and enhance vector idealizations to handle identity scenarios, multiply by 1, addition by 0, shift replacement for power of two multiply, since their scalar counterparts do handle these cases and SLP generated code gets a benefit of that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13093#discussion_r1160706670


More information about the core-libs-dev mailing list