< prev index next >

test/jdk/jdk/incubator/vector/Long64VectorTests.java

Print this page
@@ -216,10 +216,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++) {

@@ -872,11 +921,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(

@@ -974,11 +1022,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);

@@ -1050,11 +1097,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);
              }),

@@ -1162,11 +1208,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;
              }

@@ -1187,10 +1232,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) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1915,10 +1966,91 @@
          }
  
          assertArraysEquals(r, a, b, mask, Long64VectorTests::XOR);
      }
  
+     static long COMPRESS_BITS(long a, long b) {
+         return (long)(Long.compress(a, b));
+     }
+ 
+     @Test(dataProvider = "longBinaryOpProvider")
+     static void COMPRESS_BITSLong64VectorTests(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, Long64VectorTests::COMPRESS_BITS);
+     }
+ 
+     @Test(dataProvider = "longBinaryOpMaskProvider")
+     static void COMPRESS_BITSLong64VectorTestsMasked(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, Long64VectorTests::COMPRESS_BITS);
+     }
+ 
+     static long EXPAND_BITS(long a, long b) {
+         return (long)(Long.expand(a, b));
+     }
+ 
+     @Test(dataProvider = "longBinaryOpProvider")
+     static void EXPAND_BITSLong64VectorTests(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, Long64VectorTests::EXPAND_BITS);
+     }
+ 
+     @Test(dataProvider = "longBinaryOpMaskProvider")
+     static void EXPAND_BITSLong64VectorTestsMasked(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, Long64VectorTests::EXPAND_BITS);
+     }
  
      @Test(dataProvider = "longBinaryOpProvider")
      static void addLong64VectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -3053,11 +3092,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::ANDReduce, Long64VectorTests::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];

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

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

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

@@ -3146,11 +3181,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::ORReduce, Long64VectorTests::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];

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

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

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

@@ -3239,11 +3270,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::XORReduce, Long64VectorTests::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];

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

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

@@ -3328,10 +3358,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::ADDReduce, Long64VectorTests::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];

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

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

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

@@ -3413,10 +3447,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::MULReduce, Long64VectorTests::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];

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

@@ -3457,10 +3493,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Long64VectorTests::MULReduceMasked, Long64VectorTests::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]);
          }

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

@@ -3498,10 +3536,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::MINReduce, Long64VectorTests::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]);

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

@@ -3542,10 +3582,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Long64VectorTests::MINReduceMasked, Long64VectorTests::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]);
          }

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

@@ -3583,10 +3625,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::MAXReduce, Long64VectorTests::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]);

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

@@ -3627,10 +3671,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Long64VectorTests::MAXReduceMasked, Long64VectorTests::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]);
          }

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

@@ -3668,10 +3714,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Long64VectorTests::FIRST_NONZEROReduce, Long64VectorTests::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]);

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

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

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

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

@@ -3782,10 +3826,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")

@@ -3822,10 +3867,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")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -4486,10 +4499,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void compressLong64VectorTests(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 expandLong64VectorTests(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 getLong64VectorTests(IntFunction<long[]> fa) {
          long[] a = fa.apply(SPECIES.length());
          long[] r = fr.apply(SPECIES.length());
  

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

@@ -4674,13 +4720,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];

@@ -4702,10 +4745,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Long64VectorTests::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];

@@ -4731,10 +4775,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, Long64VectorTests::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;

@@ -4764,10 +4809,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, mask, Long64VectorTests::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;

@@ -4791,10 +4837,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Long64VectorTests::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)

@@ -4830,10 +4877,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, part, Long64VectorTests::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];

@@ -4887,40 +4935,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Long64VectorTests::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_BLENDLong64VectorTests(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());

@@ -4935,10 +4961,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, Long64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLong64VectorTests(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());

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

@@ -4975,13 +5001,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, Long64VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "longTernaryOpProvider")
      static void BITWISE_BLENDLong64VectorTestsBroadcastSmokeTest(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());

@@ -5007,10 +5030,11 @@
              LongVector cv = LongVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Long64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLong64VectorTestsBroadcastSmokeTest(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());

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

@@ -5076,13 +5099,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, Long64VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "longTernaryOpProvider")
      static void BITWISE_BLENDLong64VectorTestsDoubleBroadcastSmokeTest(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());

@@ -5093,10 +5113,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Long64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "longTernaryOpProvider")
      static void bitwiseBlendLong64VectorTestsDoubleBroadcastSmokeTest(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());

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

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

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

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

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

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

@@ -5344,13 +5352,194 @@
          }
  
          assertArraysEquals(r, a, mask, Long64VectorTests::ZOMO);
      }
  
+     static long BIT_COUNT(long a) {
+         return (long)(Long.bitCount(a));
+     }
  
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void BIT_COUNTLong64VectorTests(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, Long64VectorTests::BIT_COUNT);
+     }
  
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedLong64VectorTests(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, Long64VectorTests::BIT_COUNT);
+     }
+ 
+     static long TRAILING_ZEROS_COUNT(long a) {
+         return (long)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTLong64VectorTests(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, Long64VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedLong64VectorTests(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, Long64VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static long LEADING_ZEROS_COUNT(long a) {
+         return (long)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTLong64VectorTests(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, Long64VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedLong64VectorTests(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, Long64VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static long REVERSE(long a) {
+         return (long)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void REVERSELong64VectorTests(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, Long64VectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void REVERSEMaskedLong64VectorTests(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, Long64VectorTests::REVERSE);
+     }
+ 
+     static long REVERSE_BYTES(long a) {
+         return (long)(Long.reverseBytes(a));
+     }
+ 
+     @Test(dataProvider = "longUnaryOpProvider")
+     static void REVERSE_BYTESLong64VectorTests(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, Long64VectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "longUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedLong64VectorTests(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, Long64VectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "longCompareOpProvider")
      static void ltLong64VectorTestsBroadcastSmokeTest(IntFunction<long[]> fa, IntFunction<long[]> fb) {
          long[] a = fa.apply(SPECIES.length());
          long[] b = fb.apply(SPECIES.length());

@@ -5683,10 +5872,27 @@
          }
  
          assertMaskReductionArraysEquals(r, a, Long64VectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressLong64VectorTestsSmokeTest(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},

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

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

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