RFR: 8262355: Support for AVX-512 opmask register allocation. [v3]

Vladimir Ivanov vlivanov at openjdk.java.net
Thu Mar 18 12:00:44 UTC 2021


On Wed, 17 Mar 2021 03:54:28 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> @XiaohongGong, can you elaborate why SVE predicate needs the basic type of vector element it is applied to?
>
> The main reason is that the lane size of SVE predicate depends on the vector lane type, i.e `1-mask-bit per one byte` while `2-mask-bit per one short` and so on. So most of the predicate operations depend on the vector element basic type. We uses the `CNTP` as an example which computes the active numbers in a predicate register:  CNTP` <Xd>, <Pg>, <Pn>.B` is different from `CNTP <Xd>, <Pg>, <Pn>.H`. Another usage of the real basic type is the API `VectorMask.toVector()`. When creating a vector from a mask, we need the real element type (T_BOOLEAN is not enough).

Ok, so it's a mask bit per vector byte then. It looks similar to how AVX/AVX2 represents masks (w/o predicate registers, but reusing wide vector registers).

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

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


More information about the hotspot-compiler-dev mailing list