[vectorIntrinsics+mask] RFR: 8271539: Add masking support for load/store from/into byte array/buffer

Xiaohong Gong xgong at openjdk.java.net
Wed Aug 4 01:26:05 UTC 2021


This patch adds the predicate support for the following masked vector load/store operations:
  - fromByteArray/fromByteBuffer
  - intoByteArray/intoByteBuffer

The masked APIs can respectively call the `VectorSupport.loadMasked/storeMasked` intrinsics with transforming the right mask class and value to them. The hotspot compiler will check whether it is using byte array/buffer when doing the memory accessing, and the input vector mask should be reinterpreted to a mask with the byte element type before used if it is. Besides, similar with the non-masked operations, the input vector to store should be reinterpreted to byte type before storing, and the vector loaded from the byte memory should be reinterpreted to the real vector type.

Also fix an issue when checking array indexes with mask before calling the intrinsics. The original checking method doesn't take effect for negative offset.

Note that this patch doesn't contain any backend changes.

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

Commit messages:
 - 8271539: Add masking support for load/store from/into byte array/buffer

Changes: https://git.openjdk.java.net/panama-vector/pull/107/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-vector&pr=107&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8271539
  Stats: 1668 lines in 41 files changed: 1536 ins; 78 del; 54 mod
  Patch: https://git.openjdk.java.net/panama-vector/pull/107.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-vector pull/107/head:pull/107

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


More information about the panama-dev mailing list