[vectorIntrinsics+mask] RFR: 8272100: VectorAPI: modify existing implementation of masked neg and not operation.
Xiaohong Gong
xgong at openjdk.java.net
Mon Aug 9 07:15:46 UTC 2021
On Fri, 6 Aug 2021 17:36:26 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> - Masked NEG/NOT operations can be implemented using existing masked operations instead of emitting an explicit vector blend after the operation.
> - Changes shows around 1.3-1.5X gain when merged with X86 backend changes for masking operations. https://github.com/openjdk/panama-vector/pull/99
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java line 596:
> 594: return lanewise(XOR, broadcast(-1), m);
> 595: } else if (op == NEG) {
> 596: return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
Why not directly intrinsify `NEG` as an unary op and generate the "NegVI" node in compiler? SVE supports the masked neg instruction. How about x86 AVX-512?
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/108
More information about the panama-dev
mailing list