[vectorIntrinsics] RFR: x86 intrinsics for zero extension casts

Paul Sandoz psandoz at openjdk.java.net
Fri Oct 29 17:47:29 UTC 2021


On Wed, 20 Oct 2021 02:24:18 GMT, Mai Đặng Quân Anh <duke at openjdk.java.net> wrote:

> This patch implements the zero extension intrinsics for x86. I also fix the bug with the previous implementation where the sign elimination mask is calculated incorrectly and add several tests for this operation. I hope this will be useful.
> 
> Thank you very much.

Thank you for the contribution. The test updates look good, but makes me think we should split this test up according to the multiple categories, reshape, rebracket, cast, and unsigned cast. We could do that separately.

I'll let other review the HotSpot code in detail. They can judge whether this is a good candidate to go directly into the jdk repo. We have being doing that in other cases for focused implementation enhancements and fixes, rather than binding to a JEP.

src/hotspot/share/prims/vectorSupport.hpp line 79:

> 77:     // Convert
> 78:     VECTOR_OP_CAST        = 17,
> 79:     VECTOR_OP_UCAST       = 24,

I noticed this aliases with `VECTOR_OP_RROTATE`, did you mean 25? 
I think we should just renumber the subsequent values and update `VectorSupport.java` accordingly.

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

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


More information about the panama-dev mailing list