RFR: 8262096: Vector API fails to work due to VectorShape initialization exception
Paul Sandoz
psandoz at openjdk.java.net
Tue Mar 2 17:20:54 UTC 2021
On Thu, 25 Feb 2021 09:31:01 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> Vector API fails to work when:
> - case 1: MaxVectorSize is set to <=8, or
> - case 2: C2 is disabled
>
> The reason is that {max/preferred} VectorShape initialization fails in both cases.
> And the root cause is that VectorSupport_GetMaxLaneCount [1] returns unreasonable values (0 for case 1 and -1 for case 2).
>
> Vector API should not depend on C2 to run.
> It should work even there is no JIT compiler since it's a Java-level api.
> So let's fix it.
>
> Testing:
> - jdk/incubator/vector with -XX:MaxVectorSize=default/8 on Linux/x64
>
> Thanks.
> Best regards,
> Jie
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/prims/vectorSupport.cpp#L364
@DamonFool that worked out better than i expected :-)
One last thing i missed last time. The `PreferredSpeciesTest` also needs to be executed with no HotSpot flags. No need for another round of review.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2722
More information about the hotspot-compiler-dev
mailing list