[vectorIntrinsics+compress] RFR: 8274839: Intrinsic support for compress & expand VectorAPI

Sandhya Viswanathan sviswanathan at openjdk.java.net
Wed Oct 6 17:36:22 UTC 2021


On Wed, 6 Oct 2021 13:42:11 GMT, Joshua Zhu <jzhu at openjdk.org> wrote:

> I separate my implementation of "compress" API into several patches for easy review.
> This change is the intrinsic support for compress/expand API.
> The intrinsic method "selectiveOp" in VectorSupport accepts boolean to indicate expansion or compression.

src/hotspot/cpu/x86/x86.ad line 9249:

> 9247:   ins_pipe( pipe_slow );
> 9248: %}
> 9249: 

Did you intend this to be part of pull 144.

src/hotspot/share/opto/vectorIntrinsics.cpp line 2746:

> 2744: 
> 2745:   bool is_compress = (opr == TypeInt::ONE);
> 2746:   assert(is_compress, "Temporary assert. Will remove after enable expand.");

Let us remove this assert as arch_supports_vector will return false till we support expand in the .ad file.

src/hotspot/share/opto/vectorIntrinsics.cpp line 2749:

> 2747:   int num_elem = vlen->get_con();
> 2748:   int sopc = Op_CompressV;
> 2749:   // int sopc = is_compress ? Op_CompressV : Op_ExpandV;

Better to uncomment 
int sopc = is_compress ? Op_CompressV : Op_ExpandV;
instead of forcing sopc.
arch_supports_vector will return false for expand.

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

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


More information about the panama-dev mailing list