RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v6]
Jatin Bhateja
jbhateja at openjdk.org
Mon Apr 10 15:14:51 UTC 2023
On Fri, 7 Apr 2023 17:12:08 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> 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.
>
> Thanks a lot for your review, I think that transforming a multiplication by a power of 2 into a shift can be done by the C2 compiler. I have added the special case for `start = 0 && step == 1` since it may be more common and can be optimised away when the arguments are constants.
For x86 byte vector multiplication is done at granularity of short lanes, this case shows regression with power of two multiplications which are strength reduced to shifts currently. please file a follow up bug report for this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13093#discussion_r1161806381
More information about the hotspot-compiler-dev
mailing list