RFR: 8286279: [vectorapi] Only check index of masked lanes if offset is out of array boundary for masked store

Xiaohong Gong xgong at openjdk.java.net
Thu May 12 03:43:49 UTC 2022


On Thu, 12 May 2022 03:36:31 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Thanks for the review @PaulSandoz ! For the `VectorIntrinsics.checkFromIndexSize`, I'm afraid it's not suitable to be used here because the `outOfBounds` exception will be thrown if the offset is not inside of the valid array boundary. And  for the masked operations, this is not needed since we only need to check the masked lanes. Please correct me if I didn't understand correctly. Thanks!
>
> Silly me! i commented too quickly, `checkFromIndexSize` cannot be used. My intent was that we could use a method rather than repeating the expression in numerous places (including masked loads IIRC).

Good idea! I will try. Thanks!

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

PR: https://git.openjdk.java.net/jdk/pull/8620


More information about the core-libs-dev mailing list