RFR: 8278584: compiler/vectorapi/VectorMaskLoadStoreTest.java failed with "Error: ShouldNotReachHere()"

Vladimir Kozlov kvn at openjdk.java.net
Sun Dec 12 16:32:09 UTC 2021


On Sun, 12 Dec 2021 05:51:31 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> I'd like to fix the vector_length_encoding error in `long_to_maskLE8_avx` and `long_to_maskGT8_avx`.
> Since the input parameter of `vector_length_encoding` [1] is the number of vector bytes (not number of vector bits), I believe we shouldn't `mask_len*8` [2][3].
> 
> The patch also removes an useless statement [4].
> 
> Testing:
>    - vector api tests on Linux/x64-{AVX512, AVX2}
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L1219
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L9552
> [3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L9568
> [4] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86.ad#L9580

@jatin-bhateja should review it too.

My main question why we did not catch this in #6646 pre-integration testing?
The test failed only when we run it with `-Xcomp -XX:+DeoptimizeALot` flags running on AVX2 machines. which indicates that these instructions are not used during normal execution of this test or any tests in `jdk/incubator/vector`

@DamonFool, how you trigger failure with the test? May be we should increase NUM_ITER (which is only 5000) to actually trigger C2 compilation with normal execution.

@jatin-bhateja why there are no `jdk/incubator/vector` tests which use these instruction? And if there are why they are not triggered this failure during normal execution?

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

Changes requested by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list