RFR: 8259840: [Vector API] Fix an assert in Assembler::vpmovzxbw if UseAVX=0
Jie Fu
jiefu at openjdk.java.net
Sat Jan 16 04:15:10 UTC 2021
On Fri, 15 Jan 2021 13:40:04 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> This assert was observed when running jdk/incubator/vector/ShortMaxVectorTests.java with -XX:UseAVX=0.
>
> #
> # Internal Error (/home/jvm/jiefu/docker/jdk/src/hotspot/cpu/x86/assembler_x86.cpp:4263), pid=19129, tid=19145
> # Error: assert(vector_len == AVX_128bit? VM_Version::supports_avx() : vector_len == AVX_256bit? VM_Version::supports_avx2() : vector_len == AVX_512bit? VM_Version::supports_avx512bw() : 0) failed
> #
>
> Stack: [0x00007f4c095fa000,0x00007f4c096fb000], sp=0x00007f4c096f5d40, free space=1007k
> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V [libjvm.so+0x5e0ab6] Assembler::vpmovzxbw(XMMRegisterImpl*, XMMRegisterImpl*, int)+0x136
> V [libjvm.so+0x41d0dd] loadShuffleSNode::emit(CodeBuffer&, PhaseRegAlloc*) const+0x3ad
> V [libjvm.so+0x13ea963] PhaseOutput::scratch_emit_size(Node const*)+0x423
> V [libjvm.so+0x13e1b44] PhaseOutput::shorten_branches(unsigned int*)+0x2a4
> V [libjvm.so+0x13f25aa] PhaseOutput::Output()+0xb8a
> V [libjvm.so+0x96a003] Compile::Code_Gen()+0x443
> V [libjvm.so+0x97303a] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x178a
>
> The reason is that loadShuffleS should not use vpmovzxbw when -XX:UseAVX=0.
> The fix splits loadShuffleS's AVX code-gen logic into loadShuffleS_avx.
>
> Testing:
> - jdk/incubator/vector on an AVX512 machine with UseAVX=3/2/1/0, no regression
>
> Thanks.
> Best regards,
> Jie
Close this PR after https://github.com/openjdk/jdk/pull/2103
-------------
PR: https://git.openjdk.java.net/jdk/pull/2100
More information about the hotspot-compiler-dev
mailing list