Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8252964

[vectorIntrinsics] jdk/incubator/vector/Short64VectorTests.java crashes on AVX512 machines



      # A fatal error has been detected by the Java Runtime Environment:
      # Internal Error (/home/dev/src/hotspot/cpu/x86/assembler_x86.cpp:8682), pid=108652, tid=108664
      # assert(((dst_enc < 16 && nds_enc < 16 && src_enc < 16) || (!attributes->is_legacy_mode()))) failed: XMM register should be 0-15
      # JRE version: OpenJDK Runtime Environment (16.0+4) (fastdebug build 16-internal+4-adhoc..dev)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 16-internal+4-adhoc..dev, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x630b1f] Assembler::vex_prefix_and_encode(int, int, int, Assembler::VexSimdPrefix, Assembler::VexOpcode, InstructionAttr*) [clone .constprop.1]+0x21f

      Current thread (0x00007f4530401f40): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=108664, stack(0x00007f4502348000,0x00007f4502449000)]

      Current CompileTask:
      C2: 2502 950 % b 4 Short64VectorTests::ADDReduceShort64VectorTestsMasked @ 85 (232 bytes)

      Stack: [0x00007f4502348000,0x00007f4502449000], sp=0x00007f4502443ee0, 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+0x630b1f] Assembler::vex_prefix_and_encode(int, int, int, Assembler::VexSimdPrefix, Assembler::VexOpcode, InstructionAttr*) [clone .constprop.1]+0x21f
      V [libjvm.so+0x667d51] Assembler::phaddw(XMMRegisterImpl*, XMMRegisterImpl*)+0x71
      V [libjvm.so+0x85f22e] C2_MacroAssembler::reduce4S(int, RegisterImpl*, RegisterImpl*, XMMRegisterImpl*, XMMRegisterImpl*, XMMRegisterImpl*)+0x5e
      V [libjvm.so+0x3e8a3a] reductionSNode::emit(CodeBuffer&, PhaseRegAlloc*) const+0x21a
      V [libjvm.so+0x16049ea] PhaseOutput::scratch_emit_size(Node const*)+0x3fa
      V [libjvm.so+0x15fb414] PhaseOutput::shorten_branches(unsigned int*)+0x2c4
      V [libjvm.so+0x160ce3a] PhaseOutput::Output()+0xc8a
      V [libjvm.so+0xa26ad3] Compile::Code_Gen()+0x463
      V [libjvm.so+0xa30398] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x15f8
      V [libjvm.so+0x870575] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x195
      V [libjvm.so+0xa3e7c9] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xde9
      V [libjvm.so+0xa3f2f8] CompileBroker::compiler_thread_loop()+0x5b8
      V [libjvm.so+0x1a4e536] JavaThread::thread_main_inner()+0x266
      V [libjvm.so+0x1a54634] Thread::call_run()+0x104
      V [libjvm.so+0x15e441e] thread_native_entry(Thread*)+0x11e

      Suggested fix:
      diff -r 34b4be5c12d4 src/hotspot/cpu/x86/x86.ad
      --- a/src/hotspot/cpu/x86/x86.ad Tue Sep 08 19:36:56 2020 -0700
      +++ b/src/hotspot/cpu/x86/x86.ad Wed Sep 09 18:52:57 2020 +0800
      @@ -4637,7 +4637,7 @@

       // =======================Short Reduction==========================================

      -instruct reductionS(rRegI dst, rRegI src1, vec src2, vec vtmp1, vec vtmp2) %{
      +instruct reductionS(rRegI dst, rRegI src1, legVec src2, legVec vtmp1, legVec vtmp2) %{
         predicate(vector_element_basic_type(n->in(2)) == T_SHORT &&
                   vector_length(n->in(2)) <= 16); // src2
         match(Set dst (AddReductionVI src1 src2));


          Issue Links



              • Assignee:
                jiefu Jie Fu
                jiefu Jie Fu
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: