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

C2 x64 AVX2 vpminmax: assert(regs[i] != regs[j]) failed: regs[1] and regs[2] are both: xmm0

XMLWordPrintable

    • b21
    • 16
    • x86

      I found this with the Template Framework JDK-8344942.

      java -Xbatch -XX:CompileCommand=compileonly,Test::test* -XX:CompileCommand=printcompilation,Test::test* --add-modules=jdk.incubator.vector -XX:UseAVX=2 Test.java

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (.../src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp:1010), pid=1913056, tid=1913070
      # assert(regs[i] != regs[j]) failed: regs[1] and regs[2] are both: xmm0
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-LTS-2025-03-11-0926490.emanuel...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-LTS-2025-03-11-0926490.emanuel..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x8bb13d] void assert_different_registers_impl<XMMRegister, XMMRegister, XMMRegister>(char const*, int, XMMRegister, XMMRegister, XMMRegister)+0xfd
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /oracle-work/jdk-fork0/build/linux-x64-debug/jdk/bin/core.1913056)
      #
      # An error report file with more information is saved as:
      # /.../build/linux-x64-debug/jdk/bin/hs_err_pid1913056.log
      #
      # Compiler replay data is saved as:
      # /.../build/linux-x64-debug/jdk/bin/replay_pid1913056.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #


      Current CompileTask:
      C2:2396 103 b 4 Test::test (43 bytes)

      Stack: [0x000074f69a700000,0x000074f69a800000], sp=0x000074f69a7fb740, free space=1005k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x8bb13d] void assert_different_registers_impl<XMMRegister, XMMRegister, XMMRegister>(char const*, int, XMMRegister, XMMRegister, XMMRegister)+0xfd (c2_MacroAssembler_x86.cpp:1010)
      V [libjvm.so+0x8b92b4] C2_MacroAssembler::vpminmax(int, BasicType, XMMRegister, XMMRegister, XMMRegister, int)+0x154 (c2_MacroAssembler_x86.cpp:1010)
      V [libjvm.so+0x3f7453] vminmaxL_reg_avxNode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const+0x173 (x86.ad:6561)
      V [libjvm.so+0x161b95e] PhaseOutput::scratch_emit_size(Node const*)+0x49e (output.cpp:3385)
      V [libjvm.so+0x1613b22] PhaseOutput::shorten_branches(unsigned int*)+0x382 (output.cpp:539)
      V [libjvm.so+0x1625e36] PhaseOutput::Output()+0xa36 (output.cpp:339)
      V [libjvm.so+0xa7f124] Compile::Code_Gen()+0xa14 (compile.cpp:3081)
      V [libjvm.so+0xa8430f] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1fcf (compile.cpp:891)
      V [libjvm.so+0x8c3d00] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x440 (c2compiler.cpp:141)
      V [libjvm.so+0xa91cec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xbfc (compileBroker.cpp:2331)
      V [libjvm.so+0xa92c28] CompileBroker::compiler_thread_loop()+0x598 (compileBroker.cpp:1975)
      V [libjvm.so+0xf7eb0f] JavaThread::thread_main_inner()+0x12f (javaThread.cpp:776)
      V [libjvm.so+0x1947b56] Thread::call_run()+0xb6 (thread.cpp:231)
      V [libjvm.so+0x15fa1b8] thread_native_entry(Thread*)+0x128 (os_linux.cpp:877)
      C [libc.so.6+0x9caa4]

        1. hs_err_pid1913056.log
          82 kB
        2. replay_pid1913056.log
          324 kB
        3. Test.java
          0.6 kB

            jbhateja Jatin Bhateja
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: