[jdk18] RFR: 8278948: compiler/vectorapi/reshape/TestVectorCastAVX1.java crashes in assembler
Quan Anh Mai
duke at openjdk.java.net
Tue Dec 21 17:49:14 UTC 2021
On Sat, 18 Dec 2021 02:15:00 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
> This patch fixes a crash spotted in `compiler/vectorapi/reshape/TestVectorCastAVX1.java` in mainline. The reason for the failure is the incorrect vector encoding of integer promotion operation leads to unsupported instruction `vpmovsxbd/vpmovsxwd ymm, xmm` on AVX1. For the same reason we currently cannot cast a short or byte vector to a 256-bit float vector on AVX1, so I also fixed that.
Hi, I have commented in the bug report, the crash can be observed by uncommenting line 51 in `compiler/vectorapi/reshape/utils/TestCastMethods.java` which tells `TestVectorCastAVX1.java` to perform a cast from `Short64Vector` to `Double256Vector`.
https://github.com/openjdk/jdk/blob/f7309060ded0edb1e614663572f876d83b77c28e/test/hotspot/jtreg/compiler/vectorapi/reshape/utils/TestCastMethods.java#L51
The crash happens at `void Assembler::vpmovsxwd(XMMRegister dst, XMMRegister src, int vector_len)` due to `assert(vector_len == AVX_128bit ? VM_Version::supports_avx() : vector_len == AVX_256bit ? VM_Version::supports_avx2() : VM_Version::supports_evex(), "");`
Thank you very much.
-------------
PR: https://git.openjdk.java.net/jdk18/pull/46
More information about the hotspot-compiler-dev
mailing list