< prev index next >

test/jdk/jdk/incubator/vector/Short256VectorTests.java

Print this page
@@ -259,10 +259,59 @@
              int idx = i + j;
              Assert.assertEquals(r[i+j], a[i+order[i+j]], "at index #" + idx + ", input = " + a[i+order[i+j]]);
          }
      }
  
+     static void assertcompressArraysEquals(short[] r, short[] a, boolean[] m, int vector_len) {
+         int i = 0, j = 0, k = 0;
+         try {
+             for (; i < a.length; i += vector_len) {
+                 k = 0;
+                 for (j = 0; j < vector_len; j++) {
+                     if (m[(i + j) % SPECIES.length()]) {
+                         Assert.assertEquals(r[i + k], a[i + j]);
+                         k++;
+                     }
+                 }
+                 for (; k < vector_len; k++) {
+                     Assert.assertEquals(r[i + k], (short)0);
+                 }
+             }
+         } catch (AssertionError e) {
+             int idx = i + k;
+             if (m[(i + j) % SPECIES.length()]) {
+                 Assert.assertEquals(r[idx], a[i + j], "at index #" + idx);
+             } else {
+                 Assert.assertEquals(r[idx], (short)0, "at index #" + idx);
+             }
+         }
+     }
+ 
+     static void assertexpandArraysEquals(short[] r, short[] a, boolean[] m, int vector_len) {
+         int i = 0, j = 0, k = 0;
+         try {
+             for (; i < a.length; i += vector_len) {
+                 k = 0;
+                 for (j = 0; j < vector_len; j++) {
+                     if (m[(i + j) % SPECIES.length()]) {
+                         Assert.assertEquals(r[i + j], a[i + k]);
+                         k++;
+                     } else {
+                         Assert.assertEquals(r[i + j], (short)0);
+                     }
+                 }
+             }
+         } catch (AssertionError e) {
+             int idx = i + j;
+             if (m[idx % SPECIES.length()]) {
+                 Assert.assertEquals(r[idx], a[i + k], "at index #" + idx);
+             } else {
+                 Assert.assertEquals(r[idx], (short)0, "at index #" + idx);
+             }
+         }
+     }
+ 
      static void assertSelectFromArraysEquals(short[] r, short[] a, short[] order, int vector_len) {
          int i = 0, j = 0;
          try {
              for (; i < a.length; i += vector_len) {
                  for (j = 0; j < vector_len; j++) {

@@ -882,11 +931,10 @@
          } catch (AssertionError e) {
              Assert.assertEquals(r[i], (double)(a[i+offs]), "at index #" + i + ", input = " + a[i+offs]);
          }
      }
  
- 
      static short bits(short e) {
          return  e;
      }
  
      static final List<IntFunction<short[]>> SHORT_GENERATORS = List.of(

@@ -977,12 +1025,10 @@
                      return new Object[] {fa, fm};
                  })).
                  toArray(Object[][]::new);
      }
  
- 
- 
      @DataProvider
      public Object[][] maskProvider() {
          return BOOLEAN_MASK_GENERATORS.stream().
                  map(f -> new Object[]{f}).
                  toArray(Object[][]::new);

@@ -1054,11 +1100,10 @@
                          return new Object[] {fa, fs, fm};
                  }))).
                  toArray(Object[][]::new);
      }
  
- 
      static final List<IntFunction<short[]>> SHORT_COMPARE_GENERATORS = List.of(
              withToString("short[i]", (int s) -> {
                  return fill(s * BUFFER_REPS,
                              i -> (short)i);
              }),

@@ -1195,10 +1240,26 @@
  
      static short ROR_scalar(short a, short b) {
          return (short)(((((short)a) & 0xFFFF) >>> (b & 15)) | ((((short)a) & 0xFFFF) << (16 - (b & 15))));
      }
  
+     static short TRAILING_ZEROS_COUNT_scalar(short a) {
+         return (short) (a != 0 ? Integer.numberOfTrailingZeros(a) : 16);
+     }
+ 
+     static short LEADING_ZEROS_COUNT_scalar(short a) {
+         return (short) (a >= 0 ? Integer.numberOfLeadingZeros(a) - 16 : 0);
+     }
+ 
+     static short REVERSE_scalar(short a) {
+         short b = ROL_scalar(a, (short) 8);
+         b = (short) (((b & 0x5555) << 1) | ((b & 0xAAAA) >>> 1));
+         b = (short) (((b & 0x3333) << 2) | ((b & 0xCCCC) >>> 2));
+         b = (short) (((b & 0x0F0F) << 4) | ((b & 0xF0F0) >>> 4));
+         return b;
+     }
+ 
      static boolean eq(short a, short b) {
          return a == b;
      }
  
      static boolean neq(short a, short b) {

@@ -1344,10 +1405,11 @@
              a.div(b, m);
              Assert.fail();
          } catch (ArithmeticException e) {
          }
      }
+ 
      static short ADD(short a, short b) {
          return (short)(a + b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1364,10 +1426,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::ADD);
      }
+ 
      static short add(short a, short b) {
          return (short)(a + b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1420,10 +1483,11 @@
              av.add(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::add);
      }
+ 
      static short SUB(short a, short b) {
          return (short)(a - b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1440,10 +1504,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::SUB);
      }
+ 
      static short sub(short a, short b) {
          return (short)(a - b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1496,10 +1561,11 @@
              av.sub(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::sub);
      }
+ 
      static short MUL(short a, short b) {
          return (short)(a * b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1516,10 +1582,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::MUL);
      }
+ 
      static short mul(short a, short b) {
          return (short)(a * b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1573,12 +1640,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::mul);
      }
  
- 
- 
      static short DIV(short a, short b) {
          return (short)(a / b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1597,10 +1662,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::DIV);
      }
+ 
      static short div(short a, short b) {
          return (short)(a / b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1620,12 +1686,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void DIVShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -1727,10 +1791,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::AND);
      }
+ 
      static short and(short a, short b) {
          return (short)(a & b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1746,12 +1811,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ANDShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -1768,11 +1831,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::AND);
      }
  
- 
      static short AND_NOT(short a, short b) {
          return (short)(a & ~b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1790,12 +1852,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::AND_NOT);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void AND_NOTShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -1812,11 +1872,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::AND_NOT);
      }
  
- 
      static short OR(short a, short b) {
          return (short)(a | b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1833,10 +1892,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::OR);
      }
+ 
      static short or(short a, short b) {
          return (short)(a | b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1852,12 +1912,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ORShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -1874,11 +1932,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::OR);
      }
  
- 
      static short XOR(short a, short b) {
          return (short)(a ^ b);
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -1896,12 +1953,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::XOR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void XORShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -1918,11 +1973,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::XOR);
      }
  
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void addShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2012,13 +2066,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Short256VectorTests::mul);
      }
  
- 
- 
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void divShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2031,12 +2082,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, Short256VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void divShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2052,12 +2101,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Short256VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void ORShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2082,12 +2129,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, Short256VectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ORShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2101,12 +2146,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Short256VectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void ANDShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2131,12 +2174,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, Short256VectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ANDShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2150,12 +2191,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Short256VectorTests::AND);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void ORShort256VectorTestsBroadcastLongSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2166,12 +2205,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, Short256VectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ORShort256VectorTestsBroadcastMaskedLongSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2185,11 +2222,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, Short256VectorTests::OR);
      }
  
- 
      @Test(dataProvider = "shortBinaryOpProvider")
      static void ADDShort256VectorTestsBroadcastLongSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2217,14 +2253,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, Short256VectorTests::ADD);
      }
  
- 
- 
- 
- 
      static short LSHL(short a, short b) {
          return (short)((a << (b & 0xF)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2242,12 +2274,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::LSHL);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void LSHLShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2264,15 +2294,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::LSHL);
      }
  
- 
- 
- 
- 
- 
      static short ASHR(short a, short b) {
          return (short)((a >> (b & 0xF)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2290,12 +2315,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::ASHR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ASHRShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2312,15 +2335,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::ASHR);
      }
  
- 
- 
- 
- 
- 
      static short LSHR(short a, short b) {
          return (short)(((a & 0xFFFF) >>> (b & 0xF)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2338,12 +2356,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::LSHR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void LSHRShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2360,15 +2376,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::LSHR);
      }
  
- 
- 
- 
- 
- 
      static short LSHL_unary(short a, short b) {
          return (short)((a << (b & 15)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2385,12 +2396,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, Short256VectorTests::LSHL_unary);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void LSHLShort256VectorTestsScalarShiftMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2406,15 +2415,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, Short256VectorTests::LSHL_unary);
      }
  
- 
- 
- 
- 
- 
      static short LSHR_unary(short a, short b) {
          return (short)(((a & 0xFFFF) >>> (b & 15)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2431,12 +2435,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, Short256VectorTests::LSHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void LSHRShort256VectorTestsScalarShiftMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2452,15 +2454,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, Short256VectorTests::LSHR_unary);
      }
  
- 
- 
- 
- 
- 
      static short ASHR_unary(short a, short b) {
          return (short)((a >> (b & 15)));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2477,12 +2474,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, Short256VectorTests::ASHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ASHRShort256VectorTestsScalarShiftMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2498,11 +2493,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, Short256VectorTests::ASHR_unary);
      }
  
- 
      static short ROR(short a, short b) {
          return (short)(ROR_scalar(a,b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2520,12 +2514,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::ROR);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void RORShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2542,11 +2534,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::ROR);
      }
  
- 
      static short ROL(short a, short b) {
          return (short)(ROL_scalar(a,b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2564,12 +2555,10 @@
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::ROL);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ROLShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2586,11 +2575,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, Short256VectorTests::ROL);
      }
  
- 
      static short ROR_unary(short a, short b) {
          return (short)(ROR_scalar(a, b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2607,12 +2595,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, Short256VectorTests::ROR_unary);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void RORShort256VectorTestsScalarShiftMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2628,11 +2614,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, Short256VectorTests::ROR_unary);
      }
  
- 
      static short ROL_unary(short a, short b) {
          return (short)(ROL_scalar(a, b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2649,12 +2634,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, Short256VectorTests::ROL_unary);
      }
  
- 
- 
      @Test(dataProvider = "shortBinaryOpMaskProvider")
      static void ROLShort256VectorTestsScalarShiftMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -2669,16 +2652,10 @@
              }
          }
  
          assertShiftArraysEquals(r, a, b, mask, Short256VectorTests::ROL_unary);
      }
- 
- 
- 
- 
- 
- 
      static short LSHR_binary_const(short a) {
          return (short)(((a & 0xFFFF) >>> CONST_SHIFT));
      }
  
      @Test(dataProvider = "shortUnaryOpProvider")

@@ -2694,12 +2671,10 @@
          }
  
          assertShiftConstEquals(r, a, Short256VectorTests::LSHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void LSHRShort256VectorTestsScalarShiftMaskedConst(IntFunction<short[]> fa,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2714,12 +2689,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, Short256VectorTests::LSHR_binary_const);
      }
  
- 
- 
      static short LSHL_binary_const(short a) {
          return (short)((a << CONST_SHIFT));
      }
  
      @Test(dataProvider = "shortUnaryOpProvider")

@@ -2735,12 +2708,10 @@
          }
  
          assertShiftConstEquals(r, a, Short256VectorTests::LSHL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void LSHLShort256VectorTestsScalarShiftMaskedConst(IntFunction<short[]> fa,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2755,12 +2726,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, Short256VectorTests::LSHL_binary_const);
      }
  
- 
- 
      static short ASHR_binary_const(short a) {
          return (short)((a >> CONST_SHIFT));
      }
  
      @Test(dataProvider = "shortUnaryOpProvider")

@@ -2776,12 +2745,10 @@
          }
  
          assertShiftConstEquals(r, a, Short256VectorTests::ASHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ASHRShort256VectorTestsScalarShiftMaskedConst(IntFunction<short[]> fa,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2796,12 +2763,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, Short256VectorTests::ASHR_binary_const);
      }
  
- 
- 
      static short ROR_binary_const(short a) {
          return (short)(ROR_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "shortUnaryOpProvider")

@@ -2817,12 +2782,10 @@
          }
  
          assertShiftConstEquals(r, a, Short256VectorTests::ROR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void RORShort256VectorTestsScalarShiftMaskedConst(IntFunction<short[]> fa,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2837,12 +2800,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, Short256VectorTests::ROR_binary_const);
      }
  
- 
- 
      static short ROL_binary_const(short a) {
          return (short)(ROL_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "shortUnaryOpProvider")

@@ -2858,12 +2819,10 @@
          }
  
          assertShiftConstEquals(r, a, Short256VectorTests::ROL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ROLShort256VectorTestsScalarShiftMaskedConst(IntFunction<short[]> fa,
                                            IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -2899,10 +2858,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::MIN);
      }
+ 
      static short min(short a, short b) {
          return (short)(Math.min(a, b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2917,10 +2877,11 @@
              av.min(bv).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::min);
      }
+ 
      static short MAX(short a, short b) {
          return (short)(Math.max(a, b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -2937,10 +2898,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Short256VectorTests::MAX);
      }
+ 
      static short max(short a, short b) {
          return (short)(Math.max(a, b));
      }
  
      @Test(dataProvider = "shortBinaryOpProvider")

@@ -3030,11 +2992,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void ANDReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = -1;

@@ -3056,11 +3017,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::ANDReduce, Short256VectorTests::ANDReduceAll);
      }
  
- 
      static short ANDReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = -1;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res &= a[i];

@@ -3076,11 +3036,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ANDReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3104,11 +3063,10 @@
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::ANDReduceMasked, Short256VectorTests::ANDReduceAllMasked);
      }
  
- 
      static short ORReduce(short[] a, int idx) {
          short res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res |= a[i];
          }

@@ -3123,11 +3081,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void ORReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = 0;

@@ -3149,11 +3106,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::ORReduce, Short256VectorTests::ORReduceAll);
      }
  
- 
      static short ORReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res |= a[i];

@@ -3169,11 +3125,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ORReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3197,11 +3152,10 @@
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::ORReduceMasked, Short256VectorTests::ORReduceAllMasked);
      }
  
- 
      static short XORReduce(short[] a, int idx) {
          short res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res ^= a[i];
          }

@@ -3216,11 +3170,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void XORReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = 0;

@@ -3242,11 +3195,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::XORReduce, Short256VectorTests::XORReduceAll);
      }
  
- 
      static short XORReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res ^= a[i];

@@ -3262,11 +3214,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void XORReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3307,10 +3258,11 @@
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void ADDReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = 0;

@@ -3331,10 +3283,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::ADDReduce, Short256VectorTests::ADDReduceAll);
      }
+ 
      static short ADDReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res += a[i];

@@ -3349,10 +3302,11 @@
              res += ADDReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ADDReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3375,10 +3329,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::ADDReduceMasked, Short256VectorTests::ADDReduceAllMasked);
      }
+ 
      static short MULReduce(short[] a, int idx) {
          short res = 1;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res *= a[i];
          }

@@ -3392,10 +3347,11 @@
              res *= MULReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void MULReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = 1;

@@ -3416,10 +3372,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::MULReduce, Short256VectorTests::MULReduceAll);
      }
+ 
      static short MULReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = 1;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res *= a[i];

@@ -3434,10 +3391,11 @@
              res *= MULReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void MULReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3460,10 +3418,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::MULReduceMasked, Short256VectorTests::MULReduceAllMasked);
      }
+ 
      static short MINReduce(short[] a, int idx) {
          short res = Short.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (short) Math.min(res, a[i]);
          }

@@ -3477,10 +3436,11 @@
              res = (short) Math.min(res, MINReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void MINReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = Short.MAX_VALUE;

@@ -3501,10 +3461,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::MINReduce, Short256VectorTests::MINReduceAll);
      }
+ 
      static short MINReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = Short.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (short) Math.min(res, a[i]);

@@ -3519,10 +3480,11 @@
              res = (short) Math.min(res, MINReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void MINReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3545,10 +3507,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::MINReduceMasked, Short256VectorTests::MINReduceAllMasked);
      }
+ 
      static short MAXReduce(short[] a, int idx) {
          short res = Short.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (short) Math.max(res, a[i]);
          }

@@ -3562,10 +3525,11 @@
              res = (short) Math.max(res, MAXReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void MAXReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = Short.MIN_VALUE;

@@ -3586,10 +3550,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::MAXReduce, Short256VectorTests::MAXReduceAll);
      }
+ 
      static short MAXReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = Short.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (short) Math.max(res, a[i]);

@@ -3604,10 +3569,11 @@
              res = (short) Math.max(res, MAXReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void MAXReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3630,10 +3596,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Short256VectorTests::MAXReduceMasked, Short256VectorTests::MAXReduceAllMasked);
      }
+ 
      static short FIRST_NONZEROReduce(short[] a, int idx) {
          short res = (short) 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = firstNonZero(res, a[i]);
          }

@@ -3647,10 +3614,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void FIRST_NONZEROReduceShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          short ra = (short) 0;

@@ -3671,10 +3639,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Short256VectorTests::FIRST_NONZEROReduce, Short256VectorTests::FIRST_NONZEROReduceAll);
      }
+ 
      static short FIRST_NONZEROReduceMasked(short[] a, int idx, boolean[] mask) {
          short res = (short) 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = firstNonZero(res, a[i]);

@@ -3689,10 +3658,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void FIRST_NONZEROReduceShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3725,11 +3695,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "boolUnaryOpProvider")
      static void anyTrueShort256VectorTests(IntFunction<boolean[]> fm) {
          boolean[] mask = fm.apply(SPECIES.length());
          boolean[] r = fmr.apply(SPECIES.length());
  

@@ -3741,21 +3710,19 @@
          }
  
          assertReductionBoolArraysEquals(r, mask, Short256VectorTests::anyTrue);
      }
  
- 
      static boolean allTrue(boolean[] a, int idx) {
          boolean res = true;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res &= a[i];
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "boolUnaryOpProvider")
      static void allTrueShort256VectorTests(IntFunction<boolean[]> fm) {
          boolean[] mask = fm.apply(SPECIES.length());
          boolean[] r = fmr.apply(SPECIES.length());
  

@@ -3767,11 +3734,10 @@
          }
  
          assertReductionBoolArraysEquals(r, mask, Short256VectorTests::allTrue);
      }
  
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void withShort256VectorTests(IntFunction<short []> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
  

@@ -3785,10 +3751,11 @@
  
          for (int i = 0, j = 0; i < a.length; i += SPECIES.length()) {
              assertInsertArraysEquals(r, a, (short)(65535+i), (j++ & (SPECIES.length()-1)), i , i + SPECIES.length());
          }
      }
+ 
      static boolean testIS_DEFAULT(short a) {
          return bits(a)==0;
      }
  
      @Test(dataProvider = "shortTestOpProvider")

@@ -3825,10 +3792,11 @@
                      Assert.assertEquals(mv.laneIsSet(j),  vmask.laneIsSet(j) && testIS_DEFAULT(a[i + j]));
                  }
              }
          }
      }
+ 
      static boolean testIS_NEGATIVE(short a) {
          return bits(a)<0;
      }
  
      @Test(dataProvider = "shortTestOpProvider")

@@ -3866,13 +3834,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void LTShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -3888,11 +3853,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void ltShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -3931,11 +3895,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void GTShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -3974,11 +3937,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void EQShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -3994,11 +3956,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void eqShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4037,11 +3998,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void NEShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4080,11 +4040,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void LEShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4123,11 +4082,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void GEShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4166,12 +4124,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void UNSIGNED_LTShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4187,12 +4143,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void UNSIGNED_LTShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4212,13 +4166,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void UNSIGNED_GTShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4234,12 +4185,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void UNSIGNED_GTShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4259,13 +4208,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void UNSIGNED_LEShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4281,12 +4227,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void UNSIGNED_LEShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4306,13 +4250,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void UNSIGNED_GEShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4328,12 +4269,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void UNSIGNED_GEShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4353,12 +4292,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "shortCompareOpProvider")
      static void LTShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
  

@@ -4371,11 +4308,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void LTShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa,
                                  IntFunction<short[]> fb, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4408,11 +4344,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < (short)((long)b[i]));
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void LTShort256VectorTestsBroadcastLongMaskedSmokeTest(IntFunction<short[]> fa,
                                  IntFunction<short[]> fb, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4445,11 +4380,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void EQShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa,
                                  IntFunction<short[]> fb, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4482,11 +4416,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == (short)((long)b[i]));
              }
          }
      }
  
- 
      @Test(dataProvider = "shortCompareOpMaskProvider")
      static void EQShort256VectorTestsBroadcastLongMaskedSmokeTest(IntFunction<short[]> fa,
                                  IntFunction<short[]> fb, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -4561,10 +4494,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void compressShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.compress(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertcompressArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void expandShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.expand(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertexpandArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void getShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
  

@@ -4731,14 +4701,10 @@
          }
  
          assertBroadcastArraysEquals(r, a);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void ZeroShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = new short[a.length];
  

@@ -4749,13 +4715,10 @@
          }
  
          Assert.assertEquals(a, r);
      }
  
- 
- 
- 
      static short[] sliceUnary(short[] a, int origin, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = a[idx+i+origin];

@@ -4777,10 +4740,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Short256VectorTests::sliceUnary);
      }
+ 
      static short[] sliceBinary(short[] a, short[] b, int origin, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = a[idx+i+origin];

@@ -4806,10 +4770,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, Short256VectorTests::sliceBinary);
      }
+ 
      static short[] slice(short[] a, short[] b, int origin, boolean[] mask, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = mask[i] ? a[idx+i+origin] : (short)0;

@@ -4839,10 +4804,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, mask, Short256VectorTests::slice);
      }
+ 
      static short[] unsliceUnary(short[] a, int origin, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i < origin)
                  res[i] = (short)0;

@@ -4866,10 +4832,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Short256VectorTests::unsliceUnary);
      }
+ 
      static short[] unsliceBinary(short[] a, short[] b, int origin, int part, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if (part == 0) {
                  if (i < origin)

@@ -4905,10 +4872,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, part, Short256VectorTests::unsliceBinary);
      }
+ 
      static short[] unslice(short[] a, short[] b, int origin, int part, boolean[] mask, int idx) {
          short[] res = new short[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = b[idx+i+origin];

@@ -4962,40 +4930,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Short256VectorTests::unslice);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static short BITWISE_BLEND(short a, short b, short c) {
          return (short)((a&~(c))|(b&c));
      }
+ 
      static short bitwiseBlend(short a, short b, short c) {
          return (short)((a&~(c))|(b&c));
      }
  
- 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void BITWISE_BLENDShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5010,10 +4956,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, Short256VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void bitwiseBlendShort256VectorTests(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5027,11 +4974,10 @@
          }
  
          assertArraysEquals(r, a, b, c, Short256VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "shortTernaryOpMaskProvider")
      static void BITWISE_BLENDShort256VectorTestsMasked(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<short[]> fc, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -5050,13 +4996,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, Short256VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void BITWISE_BLENDShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5082,10 +5025,11 @@
              ShortVector cv = ShortVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Short256VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void bitwiseBlendShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5112,11 +5056,10 @@
              av.bitwiseBlend(b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Short256VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "shortTernaryOpMaskProvider")
      static void BITWISE_BLENDShort256VectorTestsBroadcastMaskedSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<short[]> fc, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -5151,13 +5094,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, Short256VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void BITWISE_BLENDShort256VectorTestsDoubleBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5168,10 +5108,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Short256VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "shortTernaryOpProvider")
      static void bitwiseBlendShort256VectorTestsDoubleBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb, IntFunction<short[]> fc) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());
          short[] c = fc.apply(SPECIES.length());

@@ -5183,11 +5124,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Short256VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "shortTernaryOpMaskProvider")
      static void BITWISE_BLENDShort256VectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb,
                                            IntFunction<short[]> fc, IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -5202,11 +5142,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, Short256VectorTests::BITWISE_BLEND);
      }
  
- 
      static short NEG(short a) {
          return (short)(-((short)a));
      }
  
      static short neg(short a) {

@@ -5315,21 +5254,18 @@
          }
  
          assertArraysEquals(r, a, mask, Short256VectorTests::ABS);
      }
  
- 
      static short NOT(short a) {
          return (short)(~((short)a));
      }
  
      static short not(short a) {
          return (short)(~((short)a));
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void NOTShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
  

@@ -5356,12 +5292,10 @@
          }
  
          assertArraysEquals(r, a, Short256VectorTests::not);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void NOTMaskedShort256VectorTests(IntFunction<short[]> fa,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -5376,18 +5310,14 @@
          }
  
          assertArraysEquals(r, a, mask, Short256VectorTests::NOT);
      }
  
- 
- 
      static short ZOMO(short a) {
          return (short)((a==0?0:-1));
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpProvider")
      static void ZOMOShort256VectorTests(IntFunction<short[]> fa) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());
  

@@ -5399,12 +5329,10 @@
          }
  
          assertArraysEquals(r, a, Short256VectorTests::ZOMO);
      }
  
- 
- 
      @Test(dataProvider = "shortUnaryOpMaskProvider")
      static void ZOMOMaskedShort256VectorTests(IntFunction<short[]> fa,
                                                  IntFunction<boolean[]> fm) {
          short[] a = fa.apply(SPECIES.length());
          short[] r = fr.apply(SPECIES.length());

@@ -5419,13 +5347,194 @@
          }
  
          assertArraysEquals(r, a, mask, Short256VectorTests::ZOMO);
      }
  
+     static short BIT_COUNT(short a) {
+         return (short)(Integer.bitCount((int)a & 0xFFFF));
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpProvider")
+     static void BIT_COUNTShort256VectorTests(IntFunction<short[]> fa) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Short256VectorTests::BIT_COUNT);
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Short256VectorTests::BIT_COUNT);
+     }
+ 
+     static short TRAILING_ZEROS_COUNT(short a) {
+         return (short)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTShort256VectorTests(IntFunction<short[]> fa) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Short256VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Short256VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static short LEADING_ZEROS_COUNT(short a) {
+         return (short)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTShort256VectorTests(IntFunction<short[]> fa) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Short256VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Short256VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static short REVERSE(short a) {
+         return (short)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpProvider")
+     static void REVERSEShort256VectorTests(IntFunction<short[]> fa) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Short256VectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void REVERSEMaskedShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Short256VectorTests::REVERSE);
+     }
+ 
+     static short REVERSE_BYTES(short a) {
+         return (short)(Short.reverseBytes(a));
+     }
  
+     @Test(dataProvider = "shortUnaryOpProvider")
+     static void REVERSE_BYTESShort256VectorTests(IntFunction<short[]> fa) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
  
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES).intoArray(r, i);
+             }
+         }
  
+         assertArraysEquals(r, a, Short256VectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "shortUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedShort256VectorTests(IntFunction<short[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         short[] a = fa.apply(SPECIES.length());
+         short[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Short> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ShortVector av = ShortVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Short256VectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "shortCompareOpProvider")
      static void ltShort256VectorTestsBroadcastSmokeTest(IntFunction<short[]> fa, IntFunction<short[]> fb) {
          short[] a = fa.apply(SPECIES.length());
          short[] b = fb.apply(SPECIES.length());

@@ -5824,10 +5933,27 @@
          }
  
          assertMaskReductionArraysEquals(r, a, Short256VectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressShort256VectorTestsSmokeTest(IntFunction<boolean[]> fa) {
+         int trueCount = 0;
+         boolean[] a = fa.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT * INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 var vmask = SPECIES.loadMask(a, i);
+                 trueCount = vmask.trueCount();
+                 var rmask = vmask.compress();
+                 for (int j = 0; j < SPECIES.length(); j++)  {
+                     Assert.assertEquals(rmask.laneIsSet(j), j < trueCount);
+                 }
+             }
+         }
+     }
+ 
      @DataProvider
      public static Object[][] longMaskProvider() {
          return new Object[][]{
                  {0xFFFFFFFFFFFFFFFFL},
                  {0x0000000000000000L},

@@ -5866,10 +5992,24 @@
                  Assert.assertEquals(actualMask.laneIsSet(j), index >= 0 && index < limit);
              }
          }
      }
  
+     @Test(dataProvider = "offsetProvider")
+     static void indexInRangeLongShort256VectorTestsSmokeTest(int offset) {
+         long limit = SPECIES.length() * BUFFER_REPS;
+         for (long i = 0; i < limit; i += SPECIES.length()) {
+             var actualMask = SPECIES.indexInRange(i + offset, limit);
+             var expectedMask = SPECIES.maskAll(true).indexInRange(i + offset, limit);
+             assert(actualMask.equals(expectedMask));
+             for (int j = 0; j < SPECIES.length(); j++)  {
+                 long index = i + j + offset;
+                 Assert.assertEquals(actualMask.laneIsSet(j), index >= 0 && index < limit);
+             }
+         }
+     }
+ 
      @DataProvider
      public static Object[][] lengthProvider() {
          return new Object[][]{
                  {0},
                  {1},

@@ -5886,10 +6026,18 @@
          int actualLoopBound = SPECIES.loopBound(length);
          int expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
          Assert.assertEquals(actualLoopBound, expectedLoopBound);
      }
  
+     @Test(dataProvider = "lengthProvider")
+     static void loopBoundLongShort256VectorTestsSmokeTest(int _length) {
+         long length = _length;
+         long actualLoopBound = SPECIES.loopBound(length);
+         long expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
+         Assert.assertEquals(actualLoopBound, expectedLoopBound);
+     }
+ 
      @Test
      static void ElementSizeShort256VectorTestsSmokeTest() {
          ShortVector av = ShortVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Short.SIZE);

@@ -5948,6 +6096,5 @@
          for (int ic = 0; ic < INVOC_COUNT; ic++) {
            Assert.assertEquals(SPECIES.maskAll(true).toLong(), -1L >>> (64 - SPECIES.length()));
          }
      }
  }
- 
< prev index next >