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

x86_32 fails Short*Vector tests

    XMLWordPrintable

    Details

      Description

      $ CONF=linux-x86-server-fastdebug make clean run-test TEST=jdk/incubator/vector/

      test Short256VectorTests.divShort256VectorTestsMasked(short[-i * 5], short[i + 1], mask[i % 2]): success
      test Short256VectorTests.divShort256VectorTestsMasked(short[-i * 5], short[cornerCaseValue(i)], mask[i % 2]): failure
      java.lang.ArithmeticException: zero vector lane in dividend [32767, -32768, -32768, 32767, 1, 32767, -32768, -32768, 32767, 0, 32767, -32768, -32768, 32767, 1, 32767]
      at jdk.incubator.vector/jdk.incubator.vector.AbstractVector.divZeroException(AbstractVector.java:494)
      at jdk.incubator.vector/jdk.incubator.vector.ShortVector.lanewiseTemplate(ShortVector.java:622)
      at jdk.incubator.vector/jdk.incubator.vector.Short256Vector.lanewise(Short256Vector.java:279)
      at jdk.incubator.vector/jdk.incubator.vector.Short256Vector.lanewise(Short256Vector.java:41)
      at jdk.incubator.vector/jdk.incubator.vector.ShortVector.lanewise(ShortVector.java:684)

      The failure goes away with -XX:-Inline or -XX:DisableIntrinsics=_VectorCompare.

      This also helps:

      diff --git a/src/hotspot/cpu/x86/x86.ad b/src/hotspot/cpu/x86/x86.ad
      index 1ea22eee800..05930a6a171 100644
      --- a/src/hotspot/cpu/x86/x86.ad
      +++ b/src/hotspot/cpu/x86/x86.ad
      @@ -1815,7 +1815,7 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
             }
             break;
           case Op_VectorMaskCmp:
      - if (vlen < 2 || size_in_bits < 32) {
      + if (!is_LP64 || vlen < 2 || size_in_bits < 32) {
               return false;
             }
             break;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: