RFR: 8338023: Support two vector selectFrom API [v3]

Sandhya Viswanathan sviswanathan at openjdk.org
Wed Aug 21 19:34:06 UTC 2024


On Wed, 21 Aug 2024 18:27:09 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Is it possible for the intrinsic to be responsible for wrapping, if needed? If was looking at [`vpermi2b`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpermi2b&ig_expand=4917,4982,5004,5010,5014&techs=AVX_512) and AFAICT it implicitly wraps, operating on the lower N bits. Is that correct?

It is good to keep wrapping separate. Two reasons: 1) Not all permute instructions do wrapping e.g. pshufb has a different behavior if MSB is set. 2) By keeping wrapping separate it can move out of the loop if shuffle is loop invariant.

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

PR Comment: https://git.openjdk.org/jdk/pull/20508#issuecomment-2302865908


More information about the core-libs-dev mailing list