< prev index next >

test/jdk/jdk/incubator/vector/LongMaxVectorTests.java

Print this page
@@ -221,10 +221,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(long[] r, long[] 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], (long)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], (long)0, "at index #" + idx);
+             }
+         }
+     }
+ 
+     static void assertexpandArraysEquals(long[] r, long[] 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], (long)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], (long)0, "at index #" + idx);
+             }
+         }
+     }
+ 
      static void assertSelectFromArraysEquals(long[] r, long[] a, long[] order, int vector_len) {
          int i = 0, j = 0;
          try {
              for (; i < a.length; i += vector_len) {
                  for (j = 0; j < vector_len; j++) {

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

@@ -979,11 +1027,10 @@
          return INT_LONG_GENERATORS.stream().
                  map(f -> new Object[]{f}).
                  toArray(Object[][]::new);
      }
  
- 
      @DataProvider
      public Object[][] maskProvider() {
          return BOOLEAN_MASK_GENERATORS.stream().
                  map(f -> new Object[]{f}).
                  toArray(Object[][]::new);

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

@@ -1167,11 +1213,10 @@
      static final IntFunction<boolean[]> fmr = (vl) -> {
          int length = BUFFER_REPS * vl;
          return new boolean[length];
      };
  
- 
      static void replaceZero(long[] a, long v) {
          for (int i = 0; i < a.length; i++) {
              if (a[i] == 0) {
                  a[i] = v;
              }

@@ -1192,10 +1237,22 @@
  
      static long ROR_scalar(long a, long b) {
          return Long.rotateRight(a, ((int)b));
      }
  
+     static long TRAILING_ZEROS_COUNT_scalar(long a) {
+         return Long.numberOfTrailingZeros(a);
+     }
+ 
+     static long LEADING_ZEROS_COUNT_scalar(long a) {
+         return Long.numberOfLeadingZeros(a);
+     }
+ 
+     static long REVERSE_scalar(long a) {
+         return Long.reverse(a);
+     }
+ 
      static boolean eq(long a, long b) {
          return a == b;
      }
  
      static boolean neq(long a, long b) {

@@ -1346,10 +1403,11 @@
              a.div(b, m);
              Assert.fail();
          } catch (ArithmeticException e) {
          }
      }
+ 
      static long ADD(long a, long b) {
          return (long)(a + b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1366,10 +1424,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::ADD);
      }
+ 
      static long add(long a, long b) {
          return (long)(a + b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1422,10 +1481,11 @@
              av.add(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::add);
      }
+ 
      static long SUB(long a, long b) {
          return (long)(a - b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1442,10 +1502,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::SUB);
      }
+ 
      static long sub(long a, long b) {
          return (long)(a - b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1498,10 +1559,11 @@
              av.sub(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::sub);
      }
+ 
      static long MUL(long a, long b) {
          return (long)(a * b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1518,10 +1580,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::MUL);
      }
+ 
      static long mul(long a, long b) {
          return (long)(a * b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1575,12 +1638,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::mul);
      }
  
- 
- 
      static long DIV(long a, long b) {
          return (long)(a / b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1599,10 +1660,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::DIV);
      }
+ 
      static long div(long a, long b) {
          return (long)(a / b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1622,12 +1684,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void DIVLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -1729,10 +1789,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::AND);
      }
+ 
      static long and(long a, long b) {
          return (long)(a & b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1748,12 +1809,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ANDLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -1770,11 +1829,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::AND);
      }
  
- 
      static long AND_NOT(long a, long b) {
          return (long)(a & ~b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1792,12 +1850,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::AND_NOT);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void AND_NOTLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -1814,11 +1870,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::AND_NOT);
      }
  
- 
      static long OR(long a, long b) {
          return (long)(a | b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1835,10 +1890,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::OR);
      }
+ 
      static long or(long a, long b) {
          return (long)(a | b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1854,12 +1910,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ORLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -1876,11 +1930,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::OR);
      }
  
- 
      static long XOR(long a, long b) {
          return (long)(a ^ b);
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -1898,12 +1951,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::XOR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void XORLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -1920,10 +1971,91 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::XOR);
      }
  
+     static long COMPRESS_BITS(long a, long b) {
+         return (long)(Long.compress(a, b));
+     }
+ 
+     @Test(dataProvider = "longBinaryOpProvider")
+     static void COMPRESS_BITSLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] b = fb.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 LongVector bv = LongVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.COMPRESS_BITS, bv).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, LongMaxVectorTests::COMPRESS_BITS);
+     }
+ 
+     @Test(dataProvider = "longBinaryOpMaskProvider")
+     static void COMPRESS_BITSLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
+                                           IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] b = fb.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 LongVector bv = LongVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.COMPRESS_BITS, bv, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, mask, LongMaxVectorTests::COMPRESS_BITS);
+     }
+ 
+     static long EXPAND_BITS(long a, long b) {
+         return (long)(Long.expand(a, b));
+     }
+ 
+     @Test(dataProvider = "longBinaryOpProvider")
+     static void EXPAND_BITSLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] b = fb.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 LongVector bv = LongVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.EXPAND_BITS, bv).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, LongMaxVectorTests::EXPAND_BITS);
+     }
+ 
+     @Test(dataProvider = "longBinaryOpMaskProvider")
+     static void EXPAND_BITSLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
+                                           IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] b = fb.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 LongVector bv = LongVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.EXPAND_BITS, bv, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, mask, LongMaxVectorTests::EXPAND_BITS);
+     }
  
      @Test(dataProvider = "longBinaryOpProvider")
      static void addLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2014,13 +2146,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, LongMaxVectorTests::mul);
      }
  
- 
- 
- 
      @Test(dataProvider = "longBinaryOpProvider")
      static void divLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2033,12 +2162,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, LongMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void divLongMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2054,12 +2181,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, LongMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpProvider")
      static void ORLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2084,12 +2209,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, LongMaxVectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ORLongMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2103,12 +2226,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, LongMaxVectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpProvider")
      static void ANDLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2133,12 +2254,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, LongMaxVectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ANDLongMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2152,12 +2271,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, LongMaxVectorTests::AND);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpProvider")
      static void ORLongMaxVectorTestsBroadcastLongSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2168,12 +2285,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, LongMaxVectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ORLongMaxVectorTestsBroadcastMaskedLongSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2187,11 +2302,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, LongMaxVectorTests::OR);
      }
  
- 
      @Test(dataProvider = "longBinaryOpProvider")
      static void ADDLongMaxVectorTestsBroadcastLongSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2240,12 +2354,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::LSHL);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void LSHLLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2262,15 +2374,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::LSHL);
      }
  
- 
- 
- 
- 
- 
      static long ASHR(long a, long b) {
          return (long)((a >> b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2288,12 +2395,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::ASHR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ASHRLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2310,15 +2415,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::ASHR);
      }
  
- 
- 
- 
- 
- 
      static long LSHR(long a, long b) {
          return (long)((a >>> b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2336,12 +2436,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::LSHR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void LSHRLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2358,15 +2456,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::LSHR);
      }
  
- 
- 
- 
- 
- 
      static long LSHL_unary(long a, long b) {
          return (long)((a << b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2383,12 +2476,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, LongMaxVectorTests::LSHL_unary);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void LSHLLongMaxVectorTestsScalarShiftMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2404,15 +2495,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, LongMaxVectorTests::LSHL_unary);
      }
  
- 
- 
- 
- 
- 
      static long LSHR_unary(long a, long b) {
          return (long)((a >>> b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2429,12 +2515,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, LongMaxVectorTests::LSHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void LSHRLongMaxVectorTestsScalarShiftMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2450,15 +2534,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, LongMaxVectorTests::LSHR_unary);
      }
  
- 
- 
- 
- 
- 
      static long ASHR_unary(long a, long b) {
          return (long)((a >> b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2475,12 +2554,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, LongMaxVectorTests::ASHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ASHRLongMaxVectorTestsScalarShiftMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2496,15 +2573,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, LongMaxVectorTests::ASHR_unary);
      }
  
- 
- 
- 
- 
- 
      static long ROR(long a, long b) {
          return (long)(ROR_scalar(a,b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2522,12 +2594,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::ROR);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void RORLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2544,11 +2614,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::ROR);
      }
  
- 
      static long ROL(long a, long b) {
          return (long)(ROL_scalar(a,b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2566,12 +2635,10 @@
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::ROL);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ROLLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2588,11 +2655,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, LongMaxVectorTests::ROL);
      }
  
- 
      static long ROR_unary(long a, long b) {
          return (long)(ROR_scalar(a, b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2609,12 +2675,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, LongMaxVectorTests::ROR_unary);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void RORLongMaxVectorTestsScalarShiftMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2630,11 +2694,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, LongMaxVectorTests::ROR_unary);
      }
  
- 
      static long ROL_unary(long a, long b) {
          return (long)(ROL_scalar(a, b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2651,12 +2714,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, LongMaxVectorTests::ROL_unary);
      }
  
- 
- 
      @Test(dataProvider = "longBinaryOpMaskProvider")
      static void ROLLongMaxVectorTestsScalarShiftMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -2671,12 +2732,10 @@
              }
          }
  
          assertShiftArraysEquals(r, a, b, mask, LongMaxVectorTests::ROL_unary);
      }
- 
- 
      static long LSHR_binary_const(long a) {
          return (long)((a >>> CONST_SHIFT));
      }
  
      @Test(dataProvider = "longUnaryOpProvider")

@@ -2692,12 +2751,10 @@
          }
  
          assertShiftConstEquals(r, a, LongMaxVectorTests::LSHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void LSHRLongMaxVectorTestsScalarShiftMaskedConst(IntFunction<long[]> fa,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2712,16 +2769,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, LongMaxVectorTests::LSHR_binary_const);
      }
  
- 
- 
- 
- 
- 
- 
      static long LSHL_binary_const(long a) {
          return (long)((a << CONST_SHIFT));
      }
  
      @Test(dataProvider = "longUnaryOpProvider")

@@ -2737,12 +2788,10 @@
          }
  
          assertShiftConstEquals(r, a, LongMaxVectorTests::LSHL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void LSHLLongMaxVectorTestsScalarShiftMaskedConst(IntFunction<long[]> fa,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2757,12 +2806,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, LongMaxVectorTests::LSHL_binary_const);
      }
  
- 
- 
      static long ASHR_binary_const(long a) {
          return (long)((a >> CONST_SHIFT));
      }
  
      @Test(dataProvider = "longUnaryOpProvider")

@@ -2778,12 +2825,10 @@
          }
  
          assertShiftConstEquals(r, a, LongMaxVectorTests::ASHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ASHRLongMaxVectorTestsScalarShiftMaskedConst(IntFunction<long[]> fa,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2798,12 +2843,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, LongMaxVectorTests::ASHR_binary_const);
      }
  
- 
- 
      static long ROR_binary_const(long a) {
          return (long)(ROR_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "longUnaryOpProvider")

@@ -2819,12 +2862,10 @@
          }
  
          assertShiftConstEquals(r, a, LongMaxVectorTests::ROR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void RORLongMaxVectorTestsScalarShiftMaskedConst(IntFunction<long[]> fa,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2839,12 +2880,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, LongMaxVectorTests::ROR_binary_const);
      }
  
- 
- 
      static long ROL_binary_const(long a) {
          return (long)(ROL_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "longUnaryOpProvider")

@@ -2860,12 +2899,10 @@
          }
  
          assertShiftConstEquals(r, a, LongMaxVectorTests::ROL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ROLLongMaxVectorTestsScalarShiftMaskedConst(IntFunction<long[]> fa,
                                            IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -2901,10 +2938,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::MIN);
      }
+ 
      static long min(long a, long b) {
          return (long)(Math.min(a, b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2919,10 +2957,11 @@
              av.min(bv).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::min);
      }
+ 
      static long MAX(long a, long b) {
          return (long)(Math.max(a, b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -2939,10 +2978,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, LongMaxVectorTests::MAX);
      }
+ 
      static long max(long a, long b) {
          return (long)(Math.max(a, b));
      }
  
      @Test(dataProvider = "longBinaryOpProvider")

@@ -3032,11 +3072,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void ANDReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = -1;

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

@@ -3078,11 +3116,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ANDReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3125,11 +3161,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void ORReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = 0;

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

@@ -3171,11 +3205,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ORReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3218,11 +3250,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void XORReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = 0;

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

@@ -3264,11 +3294,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void XORReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3309,10 +3338,11 @@
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void ADDReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = 0;

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

@@ -3351,10 +3382,11 @@
              res += ADDReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ADDReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3394,10 +3427,11 @@
              res *= MULReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void MULReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = 1;

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

@@ -3436,10 +3471,11 @@
              res *= MULReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void MULReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3462,10 +3498,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  LongMaxVectorTests::MULReduceMasked, LongMaxVectorTests::MULReduceAllMasked);
      }
+ 
      static long MINReduce(long[] a, int idx) {
          long res = Long.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (long) Math.min(res, a[i]);
          }

@@ -3479,10 +3516,11 @@
              res = (long) Math.min(res, MINReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void MINReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = Long.MAX_VALUE;

@@ -3503,10 +3541,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  LongMaxVectorTests::MINReduce, LongMaxVectorTests::MINReduceAll);
      }
+ 
      static long MINReduceMasked(long[] a, int idx, boolean[] mask) {
          long res = Long.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (long) Math.min(res, a[i]);

@@ -3521,10 +3560,11 @@
              res = (long) Math.min(res, MINReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void MINReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3547,10 +3587,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  LongMaxVectorTests::MINReduceMasked, LongMaxVectorTests::MINReduceAllMasked);
      }
+ 
      static long MAXReduce(long[] a, int idx) {
          long res = Long.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (long) Math.max(res, a[i]);
          }

@@ -3564,10 +3605,11 @@
              res = (long) Math.max(res, MAXReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void MAXReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = Long.MIN_VALUE;

@@ -3588,10 +3630,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  LongMaxVectorTests::MAXReduce, LongMaxVectorTests::MAXReduceAll);
      }
+ 
      static long MAXReduceMasked(long[] a, int idx, boolean[] mask) {
          long res = Long.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (long) Math.max(res, a[i]);

@@ -3606,10 +3649,11 @@
              res = (long) Math.max(res, MAXReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void MAXReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3649,10 +3694,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void FIRST_NONZEROReduceLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          long ra = (long) 0;

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

@@ -3691,10 +3738,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void FIRST_NONZEROReduceLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3743,21 +3790,19 @@
          }
  
          assertReductionBoolArraysEquals(r, mask, LongMaxVectorTests::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 allTrueLongMaxVectorTests(IntFunction<boolean[]> fm) {
          boolean[] mask = fm.apply(SPECIES.length());
          boolean[] r = fmr.apply(SPECIES.length());
  

@@ -3769,11 +3814,10 @@
          }
  
          assertReductionBoolArraysEquals(r, mask, LongMaxVectorTests::allTrue);
      }
  
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void withLongMaxVectorTests(IntFunction<long []> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
  

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

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

@@ -3868,13 +3914,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void LTLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -3890,11 +3933,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void ltLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -3933,11 +3975,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void GTLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -3976,11 +4017,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void EQLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -3996,11 +4036,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void eqLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4039,11 +4078,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void NELongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4082,11 +4120,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void LELongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4125,11 +4162,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void GELongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4168,12 +4204,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void UNSIGNED_LTLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4189,12 +4223,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpMaskProvider")
      static void UNSIGNED_LTLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -4214,13 +4246,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void UNSIGNED_GTLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4236,12 +4265,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpMaskProvider")
      static void UNSIGNED_GTLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -4261,13 +4288,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void UNSIGNED_LELongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4283,12 +4307,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpMaskProvider")
      static void UNSIGNED_LELongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -4308,13 +4330,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void UNSIGNED_GELongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

@@ -4330,12 +4349,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpMaskProvider")
      static void UNSIGNED_GELongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -4355,12 +4372,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "longCompareOpProvider")
      static void LTLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
  

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

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

@@ -4491,10 +4504,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void compressLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.compress(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertcompressArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void expandLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.expand(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertexpandArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
      @Test(dataProvider = "longUnaryOpProvider")
      static void getLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
  

@@ -4661,14 +4711,10 @@
          }
  
          assertBroadcastArraysEquals(r, a);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void ZeroLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = new long[a.length];
  

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

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

@@ -4736,10 +4780,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, LongMaxVectorTests::sliceBinary);
      }
+ 
      static long[] slice(long[] a, long[] b, int origin, boolean[] mask, int idx) {
          long[] res = new long[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] : (long)0;

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

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

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

@@ -4892,40 +4940,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, LongMaxVectorTests::unslice);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static long BITWISE_BLEND(long a, long b, long c) {
          return (long)((a&~(c))|(b&c));
      }
+ 
      static long bitwiseBlend(long a, long b, long c) {
          return (long)((a&~(c))|(b&c));
      }
  
- 
      @Test(dataProvider = "longTernaryOpProvider")
      static void BITWISE_BLENDLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -4940,10 +4966,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, LongMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLongMaxVectorTests(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -4957,11 +4984,10 @@
          }
  
          assertArraysEquals(r, a, b, c, LongMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "longTernaryOpMaskProvider")
      static void BITWISE_BLENDLongMaxVectorTestsMasked(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<long[]> fc, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -4980,13 +5006,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, LongMaxVectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "longTernaryOpProvider")
      static void BITWISE_BLENDLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -5012,10 +5035,11 @@
              LongVector cv = LongVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, LongMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -5042,11 +5066,10 @@
              av.bitwiseBlend(b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, LongMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "longTernaryOpMaskProvider")
      static void BITWISE_BLENDLongMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<long[]> fc, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -5081,13 +5104,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, LongMaxVectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "longTernaryOpProvider")
      static void BITWISE_BLENDLongMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -5098,10 +5118,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, LongMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLongMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb, IntFunction<long[]> fc) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());
          long[] c = fc.apply(SPECIES.length());

@@ -5113,11 +5134,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, LongMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "longTernaryOpMaskProvider")
      static void BITWISE_BLENDLongMaxVectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb,
                                            IntFunction<long[]> fc, IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -5132,11 +5152,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, LongMaxVectorTests::BITWISE_BLEND);
      }
  
- 
      static long NEG(long a) {
          return (long)(-((long)a));
      }
  
      static long neg(long a) {

@@ -5245,21 +5264,18 @@
          }
  
          assertArraysEquals(r, a, mask, LongMaxVectorTests::ABS);
      }
  
- 
      static long NOT(long a) {
          return (long)(~((long)a));
      }
  
      static long not(long a) {
          return (long)(~((long)a));
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void NOTLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
  

@@ -5286,12 +5302,10 @@
          }
  
          assertArraysEquals(r, a, LongMaxVectorTests::not);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void NOTMaskedLongMaxVectorTests(IntFunction<long[]> fa,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -5306,18 +5320,14 @@
          }
  
          assertArraysEquals(r, a, mask, LongMaxVectorTests::NOT);
      }
  
- 
- 
      static long ZOMO(long a) {
          return (long)((a==0?0:-1));
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpProvider")
      static void ZOMOLongMaxVectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
  

@@ -5329,12 +5339,10 @@
          }
  
          assertArraysEquals(r, a, LongMaxVectorTests::ZOMO);
      }
  
- 
- 
      @Test(dataProvider = "longUnaryOpMaskProvider")
      static void ZOMOMaskedLongMaxVectorTests(IntFunction<long[]> fa,
                                                  IntFunction<boolean[]> fm) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());

@@ -5349,13 +5357,194 @@
          }
  
          assertArraysEquals(r, a, mask, LongMaxVectorTests::ZOMO);
      }
  
+     static long BIT_COUNT(long a) {
+         return (long)(Long.bitCount(a));
+     }
  
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void BIT_COUNTLongMaxVectorTests(IntFunction<long[]> fa) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
  
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, LongMaxVectorTests::BIT_COUNT);
+     }
  
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, LongMaxVectorTests::BIT_COUNT);
+     }
+ 
+     static long TRAILING_ZEROS_COUNT(long a) {
+         return (long)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTLongMaxVectorTests(IntFunction<long[]> fa) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, LongMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, LongMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static long LEADING_ZEROS_COUNT(long a) {
+         return (long)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTLongMaxVectorTests(IntFunction<long[]> fa) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, LongMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, LongMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static long REVERSE(long a) {
+         return (long)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void REVERSELongMaxVectorTests(IntFunction<long[]> fa) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, LongMaxVectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void REVERSEMaskedLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, LongMaxVectorTests::REVERSE);
+     }
+ 
+     static long REVERSE_BYTES(long a) {
+         return (long)(Long.reverseBytes(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void REVERSE_BYTESLongMaxVectorTests(IntFunction<long[]> fa) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, LongMaxVectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedLongMaxVectorTests(IntFunction<long[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         long[] a = fa.apply(SPECIES.length());
+         long[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Long> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 LongVector av = LongVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, LongMaxVectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "longCompareOpProvider")
      static void ltLongMaxVectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -5688,10 +5877,27 @@
          }
  
          assertMaskReductionArraysEquals(r, a, LongMaxVectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressLongMaxVectorTestsSmokeTest(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[][] offsetProvider() {
          return new Object[][]{
                  {0},

@@ -5714,10 +5920,24 @@
                  Assert.assertEquals(actualMask.laneIsSet(j), index >= 0 && index < limit);
              }
          }
      }
  
+     @Test(dataProvider = "offsetProvider")
+     static void indexInRangeLongLongMaxVectorTestsSmokeTest(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},

@@ -5734,10 +5954,18 @@
          int actualLoopBound = SPECIES.loopBound(length);
          int expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
          Assert.assertEquals(actualLoopBound, expectedLoopBound);
      }
  
+     @Test(dataProvider = "lengthProvider")
+     static void loopBoundLongLongMaxVectorTestsSmokeTest(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 ElementSizeLongMaxVectorTestsSmokeTest() {
          LongVector av = LongVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Long.SIZE);

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