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

Xiaohong Gong xgong at openjdk.java.net
Wed Mar 17 03:57:07 UTC 2021


On Tue, 16 Mar 2021 12:27:51 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Thanks! Actually that's correct for AVX-512. However, unlike AVX-512 K registers, SVE predicate needs the real basic type as a reference when controlling the vector operations. I'm worried that this is not friendly for SVE.
>
> @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_BYTE is enough).

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

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


More information about the hotspot-compiler-dev mailing list