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

C2 Superword fix: use VectorMaskCmp and VectorBlend instead of CMoveVF/D

XMLWordPrintable

    • b25
    • x86_64

      I found this during work of JDK-8306088 / JDK-8304720.

      With appended Test.java run like this:

      ./java -Xcomp -XX:CompileCommand=compileonly,Test::test -XX:+TraceLoopOpts -XX:+UseVectorCmov -XX:+UseCMoveUnconditionally -XX:+TraceSuperWord -XX:MaxVectorSize=32 -XX:+TraceNewVectors Test.java

      I get:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/emanuel/Documents/fork7-jdk/open/src/hotspot/share/opto/node.hpp:392), pid=21814, tid=21831
      # assert(i < _max) failed: oob: i=1, _max=1
      #
      # JRE version: Java(TM) SE Runtime Environment (21.0) (slowdebug build 21-internal-LTS-2023-04-17-1039212.emanuel...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 21-internal-LTS-2023-04-17-1039212.emanuel..., compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x416445] Node::in(unsigned int) const+0x41

      Note: the body of the loop can contain the equals check, or non-equals - it fails for both:
      dataFc[i] = (dataFa[i] == dataFb[i]) ? dataFa[i] : dataFb[i];
      dataFc[i] = (dataFa[i] != dataFb[i]) ? dataFa[i] : dataFb[i];

      My guess is that something is wrong with the "EQ/NEQ tests (cmpOpUCF2)" in x86.

        1. hs_err_pid22009.log
          60 kB
          Emanuel Peter
        2. replay_pid22009.log
          243 kB
          Emanuel Peter
        3. Test.java
          0.8 kB
          Emanuel Peter
        4. Test2.java
          2 kB
          Emanuel Peter

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

              Created:
              Updated:
              Resolved: