RFR: 8283232: x86: Improve vector broadcast operations [v10]

Vladimir Kozlov kvn at openjdk.org
Wed Jul 27 15:10:00 UTC 2022


On Tue, 26 Jul 2022 16:40:57 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   replI_mem
>
> The testing of version 07 got failure when run vector tests with `-XX:UseAVX=0 -XX:UseSSE=2`:
> 
> # Internal Error (/workspace/open/src/hotspot/share/opto/constantTable.cpp:217), pid=2750036, tid=2750067
> #  assert((constant_addr - _masm.code()->consts()->start()) == con.offset()) failed: must be: 8 == 0
> 
> Current CompileTask:
> C2:    287   29 %  b        compiler.codegen.TestByteVect::test_ci @ 2 (20 bytes)
> 
> Stack: [0x00007f7abf144000,0x00007f7abf245000],  sp=0x00007f7abf23fa30,  free space=1006k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0xb731c8]  ConstantTable::emit(CodeBuffer&) const+0x1c8
> V  [libjvm.so+0x17c3673]  PhaseOutput::fill_buffer(CodeBuffer*, unsigned int*)+0x293
> V  [libjvm.so+0xb191bb]  Compile::Code_Gen()+0x42b
> V  [libjvm.so+0xb1e899]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1699
> 
> 
> and 
> 
> 
> #  Internal Error (/workspace/open/src/hotspot/cpu/x86/assembler_x86.cpp:5095), pid=1431469, tid=1431493
> #  Error: assert(VM_Version::supports_ssse3()) failed
> 
> Current CompileTask:
> C2:    468  240 %  b  4       java.util.Arrays::fill @ 5 (21 bytes)
> 
> Stack: [0x00007fdecd422000,0x00007fdecd523000],  sp=0x00007fdecd51d8c0,  free space=1006k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0x73079c]  Assembler::pshufb(XMMRegisterImpl*, XMMRegisterImpl*)+0x13c
> V  [libjvm.so+0x4005d1]  ReplB_regNode::emit(CodeBuffer&, PhaseRegAlloc*) const+0x1a1
> V  [libjvm.so+0x17be04e]  PhaseOutput::scratch_emit_size(Node const*)+0x45e
> V  [libjvm.so+0x17b4548]  PhaseOutput::shorten_branches(unsigned int*)+0x2d8
> V  [libjvm.so+0x17c6faa]  PhaseOutput::Output()+0xcfa
> V  [libjvm.so+0xb191bb]  Compile::Code_Gen()+0x42b
> V  [libjvm.so+0xb1e899]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1699

> @vnkozlov I have fixed those errors in the last commits. The second one is due to `pshufb` being supported only on ssse3 machines. And the first one is because the constant table itself is not aligned enough given that currently, it is only aligned at 8 bytes. I chose to avoid the problem and only emit constants requiring at most 8 bytes of alignment as this patch has already touched many areas. A proper solution would be in a separate issue. What do you think?
> 
I agree with doing in separate changes. And I will start new testing.

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

PR: https://git.openjdk.org/jdk/pull/7832


More information about the hotspot-compiler-dev mailing list