[vectorIntrinsics+compress] RFR: 8274889: Intrinsify Vector.expand/compress APIs for X86 [v3]

Jatin Bhateja jbhateja at openjdk.java.net
Sat Oct 9 02:30:18 UTC 2021


On Fri, 8 Oct 2021 13:02:53 GMT, Joshua Zhu <jzhu at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8274889: Post merge IR cleanup and special case handling for allTrue mask.
>
> src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java line 638:
> 
>> 636:      M extends VectorMask<E>,
>> 637:      E>
>> 638:     V comExpOp(int opr,
> 
> I prefer boolean instead of int.

I have kept the implementation consistent with rest of vector API code and passing an Opcode instead of flag to differentiate between compress/expand operation

> src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java line 640:
> 
>> 638:     V comExpOp(int opr,
>> 639:               Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
>> 640:               int length, V v1, V v2, M m,
> 
> No need to use two vectors here. Use zeroing-masking with one vector could meet requirement, right?

Two vectors are added in anticipation to support an explicit background vector in future since original APIs had them. 
>From the Java side background vector passed currently is ZERO which is why a merging semantics is used in emitted compress/expand instruction instead of zeroing semantics.

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

PR: https://git.openjdk.java.net/panama-vector/pull/146


More information about the panama-dev mailing list