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

C2 SuperWord: assert(vmask != nullptr) failed: vector mask should be generated

XMLWordPrintable

      Bad combination of:
      -XX:+PostLoopMultiversioning -XX:-DoReserveCopyInSuperWord

      Tested with AVX512.

      Without PostLoopMultiversioning we would not create vector mask.
      With DoReserveCopyInSuperWord we would just bail out of SuperWord::output.

      I see that PostLoopMultiversioning is generally not very stable, given these issues, I guess that is why it is an experimental flag: JDK-8304774 JDK-8301904 JDK-8301657

      JDK17 SIGSEGV with this:
      java -XX:CompileCommand=compileonly,Test::test -Xbatch -XX:+UnlockExperimentalVMOptions -XX:+PostLoopMultiversioning -XX:-DoReserveCopyInSuperWord Test.java


      Master hits assert with this:
      ./java -XX:CompileCommand=compileonly,Test::test -XX:+TraceNewVectors -XX:+TraceSuperWord -XX:-Verbose -Xbatch -XX:+TraceLoopOpts -XX:+UnlockExperimentalVMOptions -XX:+PostLoopMultiversioning -XX:-DoReserveCopyInSuperWord Test.java


      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/oracle-work/jdk-fork2/open/src/hotspot/share/opto/superword.cpp:2708), pid=1527892, tid=1527905
      # assert(vmask != nullptr) failed: vector mask should be generated
      #
      # JRE version: Java(TM) SE Runtime Environment (21.0) (slowdebug build 21-internal-LTS-2023-05-24-0919094.emanuel...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 21-internal-LTS-2023-05-24-0919094.emanuel..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x1472d09] SuperWord::output()+0x689

        1. Test.java
          0.6 kB
        2. hs_err_pid1527892.log
          81 kB
        3. replay_pid1527892.log
          242 kB

            epeter Emanuel Peter
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: