RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]
Jie Fu
jiefu at openjdk.java.net
Fri Feb 26 15:39:42 UTC 2021
On Fri, 26 Feb 2021 13:55:15 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> IMO the fix should be in `src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShape.java`.
>
> JVM does the right job when it signals vector support is absent (by returning `-1`).
>
> `jdk.incubator.vector` implementation should take that into account and choose a preferred shape for pure Java execution mode.
Hi @iwanowww ,
Thanks for your review.
>From the view of C2 compiler, you are right.
But the Java programmer may be confused if we got something like DoubleVector.SPECIES_PREFERRED.length() > VectorSupport.getMaxLaneCount(double.class).
I'd like to keep DoubleVector.SPECIES_PREFERRED.length() <= VectorSupport.getMaxLaneCount(double.class) for Java programmers since the VectorSupport_GetMaxLaneCount is used to implement a Java API.
What do you think?
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2722
More information about the hotspot-compiler-dev
mailing list