[vectorIntrinsics] RFR: 8258072: Add Reinterpret nodes implementation for Arm SVE [v2]

Xiaohong Gong xgong at openjdk.java.net
Tue Dec 29 08:26:18 UTC 2020


On Wed, 16 Dec 2020 08:07:15 GMT, Wang Huang <whuang at openjdk.org> wrote:

>> Add reinterpret nodes implementation for Arm SVE. We also adjust the implementation of Matcher::min_vector_size in the same patch.
>
> Wang Huang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

src/hotspot/cpu/aarch64/aarch64_sve.ad line 371:

> 369:              as_FloatRegister($src$$reg));
> 370:     }
> 371:   %}

Did you consider the resize case when the dst vector length in bytes is higher than the src vector length in bytes? I understand that for the parts that the length is `LE` to the src vector length, the values should be moved from the src values, otherwise the dst values are expected 0. Do you think it needs to use the SVE predicate feature to control the action here? 

For an example:
   1. byte[] a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
   2. byte[] b = new byte[8];
       b = reinterpret(a) ;    // b = [1, 2, 3, 4, 5, 6, 7, 8] 
   3. byte[] c = new byte[16];
       c = reinterpret(b);     // c = [1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0]
If no vector length info is referenced here, I'm wondering whether the final result is:
    c = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]

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

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


More information about the panama-dev mailing list