[vectorIntrinsics] [PATCH] Elemental shifts and rotates speedup

John Rose john.r.rose at oracle.com
Thu May 30 16:35:50 UTC 2019


I looked at the Java changes.  They look good.

(We need a way to tell webrev to exclude those
generated files.  They bulk up the webrev but
don't add much information.)

I am in the process of "shuffling" the shuffle
API a bit, but nothing you've done invalidates my
assumptions.  I'm glad to see more use of shuffles.

I think we want byte-level shuffles to implement
byte-swapping (lane-wise Integer.reverseBytes),
when there is no instruction that's faster.
Perhaps you could look into that.  I have code
sketched out that uses ByteOrder arguments
to gate an application of a bytewise shuffle
when byte order != native order.

Someone else should look at the JIT work.

— John

On May 15, 2019, at 7:41 PM, Bhateja, Jatin <jatin.bhateja at intel.com> wrote:
> 
> 
> Hi All,
> 
> Please find a patch having following changes:-
> 
> A)      Intrinsification of two vector APIs:
> 
> 1)      VectorShuffle.shuffleIota(VectorSpecies,  int)
> 
> 2)      VectorShuffle.toVector()
> 
> B)      Re-implimentation of following vector APIs using above intrinsified APIs.
> 
> 1)      Vector.shiftLanesLeft(int)
> 
> 2)      Vector.shiftLanesRight(int)
> 
> 3)      Vector.rotateLanesLeft(int)
> 
> 4)      Vector.rotateLanesRight(int)
> 
> With this we see around ~2X gains in elemental shifts and rotate operations.
> Webrev: http://cr.openjdk.java.net/~kkharbas/Jatin/rotate_and_shift_lanes/webrev.00/
> 
> Kindly review the patch.
> 
> Best Regards,
> Jatin
> 
> 



More information about the panama-dev mailing list