RFR: 8286941: Add mask IR for partial vector operations for ARM SVE [v3]
Xiaohong Gong
xgong at openjdk.org
Mon Jun 20 02:19:45 UTC 2022
On Mon, 20 Jun 2022 01:59:25 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Yes, I agree with you to add the SuperWordMaxVectorSize reference. Thanks! I will change it.
>
> I'm afraid that we cannot directly use `MIN(SuperWordMaxVectorSize, MaxVectorSize)` here. As I know `SuperWordMaxVectorSize` is used to control the max vector limit specially for auto-vectorization. It should not have any influence to the VectorAPI max vector size. So if the supported max vector size for VetorAPI is larger than auto-vectorization, the transformation will be influenced. For example, if a SVE hardware supported 128-bytes max vector size, but the `SuperWordMaxVectorSize` is 64, the predicate will not be generated for vectors whose vector size is smaller than 128-bytes. And I think x86 also has the similar issue. I think we'd better need a unit method to compute the `max_vector_size` that can handle the differences for superword and VectorAPI. And then all the orignal max_vector_size should be replaced with it. WDYT?
BTW, the max vector size used here should be referenced from the hardware supported max vector size, which should be `MaxVectorSize` for SVE. For those vectors whose vector size is `SuperWordMaxVectorSize`, but smaller than the hardware supported max size, we still need to generate a predicate for them to make sure the results are right. So using `MaxVectorSize` is necessary here.
-------------
PR: https://git.openjdk.org/jdk/pull/9037
More information about the hotspot-compiler-dev
mailing list