< prev index next >

test/jdk/jdk/incubator/vector/Int64VectorTests.java

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

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

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

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

*** 1165,10 ***
--- 1210,22 ---
  
      static int ROR_scalar(int a, int b) {
          return Integer.rotateRight(a, ((int)b));
      }
  
+     static int TRAILING_ZEROS_COUNT_scalar(int a) {
+         return Integer.numberOfTrailingZeros(a);
+     }
+ 
+     static int LEADING_ZEROS_COUNT_scalar(int a) {
+         return Integer.numberOfLeadingZeros(a);
+     }
+ 
+     static int REVERSE_scalar(int a) {
+         return Integer.reverse(a);
+     }
+ 
      static boolean eq(int a, int b) {
          return a == b;
      }
  
      static boolean neq(int a, int b) {

*** 1319,10 ***
--- 1376,11 ---
              a.div(b, m);
              Assert.fail();
          } catch (ArithmeticException e) {
          }
      }
+ 
      static int ADD(int a, int b) {
          return (int)(a + b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1339,10 ***
--- 1397,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::ADD);
      }
+ 
      static int add(int a, int b) {
          return (int)(a + b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1395,10 ***
--- 1454,11 ---
              av.add(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::add);
      }
+ 
      static int SUB(int a, int b) {
          return (int)(a - b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1415,10 ***
--- 1475,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::SUB);
      }
+ 
      static int sub(int a, int b) {
          return (int)(a - b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1471,10 ***
--- 1532,11 ---
              av.sub(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::sub);
      }
+ 
      static int MUL(int a, int b) {
          return (int)(a * b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1491,10 ***
--- 1553,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::MUL);
      }
+ 
      static int mul(int a, int b) {
          return (int)(a * b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1548,12 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::mul);
      }
  
- 
- 
      static int DIV(int a, int b) {
          return (int)(a / b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 1611,10 ---

*** 1572,10 ***
--- 1633,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::DIV);
      }
+ 
      static int div(int a, int b) {
          return (int)(a / b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1595,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void DIVInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 1657,10 ---

*** 1702,10 ***
--- 1762,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::AND);
      }
+ 
      static int and(int a, int b) {
          return (int)(a & b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1721,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ANDInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 1782,10 ---

*** 1743,11 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::AND);
      }
  
- 
      static int AND_NOT(int a, int b) {
          return (int)(a & ~b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 1802,10 ---

*** 1765,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::AND_NOT);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void AND_NOTInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 1823,10 ---

*** 1787,11 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::AND_NOT);
      }
  
- 
      static int OR(int a, int b) {
          return (int)(a | b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 1843,10 ---

*** 1808,10 ***
--- 1863,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::OR);
      }
+ 
      static int or(int a, int b) {
          return (int)(a | b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 1827,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ORInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 1883,10 ---

*** 1849,11 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::OR);
      }
  
- 
      static int XOR(int a, int b) {
          return (int)(a ^ b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 1903,10 ---

*** 1871,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::XOR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void XORInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 1924,10 ---

*** 1893,10 ***
--- 1944,91 ---
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::XOR);
      }
  
+     static int COMPRESS_BITS(int a, int b) {
+         return (int)(Integer.compress(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void COMPRESS_BITSInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] b = fb.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 IntVector bv = IntVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.COMPRESS_BITS, bv).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, Int64VectorTests::COMPRESS_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void COMPRESS_BITSInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
+                                           IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] b = fb.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 IntVector bv = IntVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.COMPRESS_BITS, bv, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, mask, Int64VectorTests::COMPRESS_BITS);
+     }
+ 
+     static int EXPAND_BITS(int a, int b) {
+         return (int)(Integer.expand(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void EXPAND_BITSInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] b = fb.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 IntVector bv = IntVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.EXPAND_BITS, bv).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, Int64VectorTests::EXPAND_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void EXPAND_BITSInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
+                                           IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] b = fb.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 IntVector bv = IntVector.fromArray(SPECIES, b, i);
+                 av.lanewise(VectorOperators.EXPAND_BITS, bv, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, b, mask, Int64VectorTests::EXPAND_BITS);
+     }
  
      @Test(dataProvider = "intBinaryOpProvider")
      static void addInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

*** 1987,13 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Int64VectorTests::mul);
      }
  
- 
- 
- 
      @Test(dataProvider = "intBinaryOpProvider")
      static void divInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2119,10 ---

*** 2006,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, Int64VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void divInt64VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2135,10 ---

*** 2027,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Int64VectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpProvider")
      static void ORInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2154,10 ---

*** 2057,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, Int64VectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ORInt64VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2182,10 ---

*** 2076,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Int64VectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpProvider")
      static void ANDInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2199,10 ---

*** 2106,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, Int64VectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ANDInt64VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2227,10 ---

*** 2125,12 ***
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, Int64VectorTests::AND);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpProvider")
      static void ORInt64VectorTestsBroadcastLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2244,10 ---

*** 2141,12 ***
          }
  
          assertBroadcastLongArraysEquals(r, a, b, Int64VectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ORInt64VectorTestsBroadcastMaskedLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2258,10 ---

*** 2160,11 ***
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, Int64VectorTests::OR);
      }
  
- 
      @Test(dataProvider = "intBinaryOpProvider")
      static void ADDInt64VectorTestsBroadcastLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2275,10 ---

*** 2213,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::LSHL);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void LSHLInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2327,10 ---

*** 2235,15 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::LSHL);
      }
  
- 
- 
- 
- 
- 
      static int ASHR(int a, int b) {
          return (int)((a >> b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2347,10 ---

*** 2261,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::ASHR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ASHRInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2368,10 ---

*** 2283,15 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::ASHR);
      }
  
- 
- 
- 
- 
- 
      static int LSHR(int a, int b) {
          return (int)((a >>> b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2388,10 ---

*** 2309,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::LSHR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void LSHRInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2409,10 ---

*** 2331,15 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::LSHR);
      }
  
- 
- 
- 
- 
- 
      static int LSHL_unary(int a, int b) {
          return (int)((a << b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2429,10 ---

*** 2356,12 ***
          }
  
          assertShiftArraysEquals(r, a, b, Int64VectorTests::LSHL_unary);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void LSHLInt64VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2449,10 ---

*** 2377,15 ***
          }
  
          assertShiftArraysEquals(r, a, b, mask, Int64VectorTests::LSHL_unary);
      }
  
- 
- 
- 
- 
- 
      static int LSHR_unary(int a, int b) {
          return (int)((a >>> b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2468,10 ---

*** 2402,12 ***
          }
  
          assertShiftArraysEquals(r, a, b, Int64VectorTests::LSHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void LSHRInt64VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2488,10 ---

*** 2423,15 ***
          }
  
          assertShiftArraysEquals(r, a, b, mask, Int64VectorTests::LSHR_unary);
      }
  
- 
- 
- 
- 
- 
      static int ASHR_unary(int a, int b) {
          return (int)((a >> b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2507,10 ---

*** 2448,12 ***
          }
  
          assertShiftArraysEquals(r, a, b, Int64VectorTests::ASHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ASHRInt64VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2527,10 ---

*** 2469,15 ***
          }
  
          assertShiftArraysEquals(r, a, b, mask, Int64VectorTests::ASHR_unary);
      }
  
- 
- 
- 
- 
- 
      static int ROR(int a, int b) {
          return (int)(ROR_scalar(a,b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2546,10 ---

*** 2495,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::ROR);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void RORInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2567,10 ---

*** 2517,11 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::ROR);
      }
  
- 
      static int ROL(int a, int b) {
          return (int)(ROL_scalar(a,b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2587,10 ---

*** 2539,12 ***
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::ROL);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ROLInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2608,10 ---

*** 2561,11 ***
          }
  
          assertArraysEquals(r, a, b, mask, Int64VectorTests::ROL);
      }
  
- 
      static int ROR_unary(int a, int b) {
          return (int)(ROR_scalar(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2628,10 ---

*** 2582,12 ***
          }
  
          assertShiftArraysEquals(r, a, b, Int64VectorTests::ROR_unary);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void RORInt64VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2648,10 ---

*** 2603,11 ***
          }
  
          assertShiftArraysEquals(r, a, b, mask, Int64VectorTests::ROR_unary);
      }
  
- 
      static int ROL_unary(int a, int b) {
          return (int)(ROL_scalar(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")
--- 2667,10 ---

*** 2624,12 ***
          }
  
          assertShiftArraysEquals(r, a, b, Int64VectorTests::ROL_unary);
      }
  
- 
- 
      @Test(dataProvider = "intBinaryOpMaskProvider")
      static void ROLInt64VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 2687,10 ---

*** 2644,12 ***
              }
          }
  
          assertShiftArraysEquals(r, a, b, mask, Int64VectorTests::ROL_unary);
      }
- 
- 
      static int LSHR_binary_const(int a) {
          return (int)((a >>> CONST_SHIFT));
      }
  
      @Test(dataProvider = "intUnaryOpProvider")
--- 2705,10 ---

*** 2665,12 ***
          }
  
          assertShiftConstEquals(r, a, Int64VectorTests::LSHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void LSHRInt64VectorTestsScalarShiftMaskedConst(IntFunction<int[]> fa,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2724,10 ---

*** 2685,16 ***
          }
  
          assertShiftConstEquals(r, a, mask, Int64VectorTests::LSHR_binary_const);
      }
  
- 
- 
- 
- 
- 
- 
      static int LSHL_binary_const(int a) {
          return (int)((a << CONST_SHIFT));
      }
  
      @Test(dataProvider = "intUnaryOpProvider")
--- 2742,10 ---

*** 2710,12 ***
          }
  
          assertShiftConstEquals(r, a, Int64VectorTests::LSHL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void LSHLInt64VectorTestsScalarShiftMaskedConst(IntFunction<int[]> fa,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2761,10 ---

*** 2730,12 ***
          }
  
          assertShiftConstEquals(r, a, mask, Int64VectorTests::LSHL_binary_const);
      }
  
- 
- 
      static int ASHR_binary_const(int a) {
          return (int)((a >> CONST_SHIFT));
      }
  
      @Test(dataProvider = "intUnaryOpProvider")
--- 2779,10 ---

*** 2751,12 ***
          }
  
          assertShiftConstEquals(r, a, Int64VectorTests::ASHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ASHRInt64VectorTestsScalarShiftMaskedConst(IntFunction<int[]> fa,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2798,10 ---

*** 2771,12 ***
          }
  
          assertShiftConstEquals(r, a, mask, Int64VectorTests::ASHR_binary_const);
      }
  
- 
- 
      static int ROR_binary_const(int a) {
          return (int)(ROR_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "intUnaryOpProvider")
--- 2816,10 ---

*** 2792,12 ***
          }
  
          assertShiftConstEquals(r, a, Int64VectorTests::ROR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void RORInt64VectorTestsScalarShiftMaskedConst(IntFunction<int[]> fa,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2835,10 ---

*** 2812,12 ***
          }
  
          assertShiftConstEquals(r, a, mask, Int64VectorTests::ROR_binary_const);
      }
  
- 
- 
      static int ROL_binary_const(int a) {
          return (int)(ROL_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "intUnaryOpProvider")
--- 2853,10 ---

*** 2833,12 ***
          }
  
          assertShiftConstEquals(r, a, Int64VectorTests::ROL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ROLInt64VectorTestsScalarShiftMaskedConst(IntFunction<int[]> fa,
                                            IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 2872,10 ---

*** 2874,10 ***
--- 2911,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::MIN);
      }
+ 
      static int min(int a, int b) {
          return (int)(Math.min(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 2892,10 ***
--- 2930,11 ---
              av.min(bv).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::min);
      }
+ 
      static int MAX(int a, int b) {
          return (int)(Math.max(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 2912,10 ***
--- 2951,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, Int64VectorTests::MAX);
      }
+ 
      static int max(int a, int b) {
          return (int)(Math.max(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

*** 3005,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ANDReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = -1;
--- 3045,10 ---

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

*** 3051,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ANDReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());
--- 3089,10 ---

*** 3079,11 ***
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Int64VectorTests::ANDReduceMasked, Int64VectorTests::ANDReduceAllMasked);
      }
  
- 
      static int ORReduce(int[] a, int idx) {
          int res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res |= a[i];
          }
--- 3116,10 ---

*** 3098,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ORReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = 0;
--- 3134,10 ---

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

*** 3144,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ORReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());
--- 3178,10 ---

*** 3172,11 ***
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Int64VectorTests::ORReduceMasked, Int64VectorTests::ORReduceAllMasked);
      }
  
- 
      static int XORReduce(int[] a, int idx) {
          int res = 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res ^= a[i];
          }
--- 3205,10 ---

*** 3191,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void XORReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = 0;
--- 3223,10 ---

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

*** 3237,11 ***
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void XORReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());
--- 3267,10 ---

*** 3282,10 ***
--- 3311,11 ---
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ADDReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = 0;

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

*** 3324,10 ***
--- 3355,11 ---
              res += ADDReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ADDReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

*** 3367,10 ***
--- 3400,11 ---
              res *= MULReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void MULReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = 1;

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

*** 3409,10 ***
--- 3444,11 ---
              res *= MULReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void MULReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 3435,10 ***
--- 3471,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Int64VectorTests::MULReduceMasked, Int64VectorTests::MULReduceAllMasked);
      }
+ 
      static int MINReduce(int[] a, int idx) {
          int res = Integer.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (int) Math.min(res, a[i]);
          }

*** 3452,10 ***
--- 3489,11 ---
              res = (int) Math.min(res, MINReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void MINReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = Integer.MAX_VALUE;

*** 3476,10 ***
--- 3514,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Int64VectorTests::MINReduce, Int64VectorTests::MINReduceAll);
      }
+ 
      static int MINReduceMasked(int[] a, int idx, boolean[] mask) {
          int res = Integer.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (int) Math.min(res, a[i]);

*** 3494,10 ***
--- 3533,11 ---
              res = (int) Math.min(res, MINReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void MINReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 3520,10 ***
--- 3560,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Int64VectorTests::MINReduceMasked, Int64VectorTests::MINReduceAllMasked);
      }
+ 
      static int MAXReduce(int[] a, int idx) {
          int res = Integer.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (int) Math.max(res, a[i]);
          }

*** 3537,10 ***
--- 3578,11 ---
              res = (int) Math.max(res, MAXReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void MAXReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = Integer.MIN_VALUE;

*** 3561,10 ***
--- 3603,11 ---
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Int64VectorTests::MAXReduce, Int64VectorTests::MAXReduceAll);
      }
+ 
      static int MAXReduceMasked(int[] a, int idx, boolean[] mask) {
          int res = Integer.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (int) Math.max(res, a[i]);

*** 3579,10 ***
--- 3622,11 ---
              res = (int) Math.max(res, MAXReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void MAXReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

*** 3605,10 ***
--- 3649,11 ---
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  Int64VectorTests::MAXReduceMasked, Int64VectorTests::MAXReduceAllMasked);
      }
+ 
      static int FIRST_NONZEROReduce(int[] a, int idx) {
          int res = (int) 0;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = firstNonZero(res, a[i]);
          }

*** 3622,10 ***
--- 3667,11 ---
              res = firstNonZero(res, FIRST_NONZEROReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void FIRST_NONZEROReduceInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          int ra = (int) 0;

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

*** 3664,10 ***
--- 3711,11 ---
              res = firstNonZero(res, FIRST_NONZEROReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void FIRST_NONZEROReduceInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

*** 3716,21 ***
          }
  
          assertReductionBoolArraysEquals(r, mask, Int64VectorTests::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 allTrueInt64VectorTests(IntFunction<boolean[]> fm) {
          boolean[] mask = fm.apply(SPECIES.length());
          boolean[] r = fmr.apply(SPECIES.length());
  
--- 3763,19 ---

*** 3742,11 ***
          }
  
          assertReductionBoolArraysEquals(r, mask, Int64VectorTests::allTrue);
      }
  
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void withInt64VectorTests(IntFunction<int []> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  
--- 3787,10 ---

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

*** 3800,10 ***
--- 3845,11 ---
                      Assert.assertEquals(mv.laneIsSet(j),  vmask.laneIsSet(j) && testIS_DEFAULT(a[i + j]));
                  }
              }
          }
      }
+ 
      static boolean testIS_NEGATIVE(int a) {
          return bits(a)<0;
      }
  
      @Test(dataProvider = "intTestOpProvider")

*** 3841,13 ***
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void LTInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 3887,10 ---

*** 3863,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void ltInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 3906,10 ---

*** 3906,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void GTInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 3948,10 ---

*** 3949,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void EQInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 3990,10 ---

*** 3969,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void eqInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4009,10 ---

*** 4012,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void NEInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4051,10 ---

*** 4055,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void LEInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4093,10 ---

*** 4098,11 ***
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void GEInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4135,10 ---

*** 4141,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void UNSIGNED_LTInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4177,10 ---

*** 4162,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void UNSIGNED_LTInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4196,10 ---

*** 4187,13 ***
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void UNSIGNED_GTInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4219,10 ---

*** 4209,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void UNSIGNED_GTInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4238,10 ---

*** 4234,13 ***
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void UNSIGNED_LEInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4261,10 ---

*** 4256,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void UNSIGNED_LEInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4280,10 ---

*** 4281,13 ***
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void UNSIGNED_GEInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4303,10 ---

*** 4303,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void UNSIGNED_GEInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4322,10 ---

*** 4328,12 ***
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void LTInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  
--- 4345,10 ---

*** 4346,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void LTInt64VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa,
                                  IntFunction<int[]> fb, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4361,10 ---

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

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

*** 4457,11 ***
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == (int)((long)b[i]));
              }
          }
      }
  
- 
      @Test(dataProvider = "intCompareOpMaskProvider")
      static void EQInt64VectorTestsBroadcastLongMaskedSmokeTest(IntFunction<int[]> fa,
                                  IntFunction<int[]> fb, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 4469,10 ---

*** 4536,10 ***
--- 4547,47 ---
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void compressInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.compress(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertcompressArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void expandInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.expand(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertexpandArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void getInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  

*** 4706,14 ***
          }
  
          assertBroadcastArraysEquals(r, a);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ZeroInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = new int[a.length];
  
--- 4754,10 ---

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

*** 4752,10 ***
--- 4793,11 ---
              }
          }
  
          assertArraysEquals(r, a, origin, Int64VectorTests::sliceUnary);
      }
+ 
      static int[] sliceBinary(int[] a, int[] b, int origin, int idx) {
          int[] res = new int[SPECIES.length()];
          for (int i = 0, j = 0; i < SPECIES.length(); i++){
              if(i+origin < SPECIES.length())
                  res[i] = a[idx+i+origin];

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

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

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

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

*** 4937,40 ***
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Int64VectorTests::unslice);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static int BITWISE_BLEND(int a, int b, int c) {
          return (int)((a&~(c))|(b&c));
      }
      static int bitwiseBlend(int a, int b, int c) {
          return (int)((a&~(c))|(b&c));
      }
  
- 
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());
--- 4983,18 ---
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Int64VectorTests::unslice);
      }
  
      static int BITWISE_BLEND(int a, int b, int c) {
          return (int)((a&~(c))|(b&c));
      }
+ 
      static int bitwiseBlend(int a, int b, int c) {
          return (int)((a&~(c))|(b&c));
      }
  
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());

*** 4985,10 ***
--- 5009,11 ---
              }
          }
  
          assertArraysEquals(r, a, b, c, Int64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt64VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());

*** 5002,11 ***
          }
  
          assertArraysEquals(r, a, b, c, Int64VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt64VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 5027,10 ---

*** 5025,13 ***
          }
  
          assertArraysEquals(r, a, b, c, mask, Int64VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());
--- 5049,10 ---

*** 5057,10 ***
--- 5078,11 ---
              IntVector cv = IntVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Int64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());

*** 5087,11 ***
              av.bitwiseBlend(b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Int64VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt64VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 5109,10 ---

*** 5126,13 ***
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, Int64VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt64VectorTestsDoubleBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());
--- 5147,10 ---

*** 5143,10 ***
--- 5161,11 ---
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Int64VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt64VectorTestsDoubleBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb, IntFunction<int[]> fc) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
          int[] c = fc.apply(SPECIES.length());

*** 5158,11 ***
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Int64VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt64VectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
--- 5177,10 ---

*** 5177,11 ***
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, Int64VectorTests::BITWISE_BLEND);
      }
  
- 
      static int NEG(int a) {
          return (int)(-((int)a));
      }
  
      static int neg(int a) {
--- 5195,10 ---

*** 5290,21 ***
          }
  
          assertArraysEquals(r, a, mask, Int64VectorTests::ABS);
      }
  
- 
      static int NOT(int a) {
          return (int)(~((int)a));
      }
  
      static int not(int a) {
          return (int)(~((int)a));
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void NOTInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  
--- 5307,18 ---

*** 5331,12 ***
          }
  
          assertArraysEquals(r, a, Int64VectorTests::not);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void NOTMaskedInt64VectorTests(IntFunction<int[]> fa,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 5345,10 ---

*** 5351,18 ***
          }
  
          assertArraysEquals(r, a, mask, Int64VectorTests::NOT);
      }
  
- 
- 
      static int ZOMO(int a) {
          return (int)((a==0?0:-1));
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ZOMOInt64VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  
--- 5363,14 ---

*** 5374,12 ***
          }
  
          assertArraysEquals(r, a, Int64VectorTests::ZOMO);
      }
  
- 
- 
      @Test(dataProvider = "intUnaryOpMaskProvider")
      static void ZOMOMaskedInt64VectorTests(IntFunction<int[]> fa,
                                                  IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
--- 5382,10 ---

*** 5394,13 ***
--- 5400,194 ---
          }
  
          assertArraysEquals(r, a, mask, Int64VectorTests::ZOMO);
      }
  
+     static int BIT_COUNT(int a) {
+         return (int)(Integer.bitCount(a));
+     }
  
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void BIT_COUNTInt64VectorTests(IntFunction<int[]> fa) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
  
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Int64VectorTests::BIT_COUNT);
+     }
  
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Int64VectorTests::BIT_COUNT);
+     }
+ 
+     static int TRAILING_ZEROS_COUNT(int a) {
+         return (int)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTInt64VectorTests(IntFunction<int[]> fa) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Int64VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Int64VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static int LEADING_ZEROS_COUNT(int a) {
+         return (int)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTInt64VectorTests(IntFunction<int[]> fa) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Int64VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Int64VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static int REVERSE(int a) {
+         return (int)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSEInt64VectorTests(IntFunction<int[]> fa) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Int64VectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSEMaskedInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Int64VectorTests::REVERSE);
+     }
+ 
+     static int REVERSE_BYTES(int a) {
+         return (int)(Integer.reverseBytes(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSE_BYTESInt64VectorTests(IntFunction<int[]> fa) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, Int64VectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedInt64VectorTests(IntFunction<int[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         int[] a = fa.apply(SPECIES.length());
+         int[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 IntVector av = IntVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, Int64VectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "intCompareOpProvider")
      static void ltInt64VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

*** 5799,10 ***
--- 5986,27 ---
          }
  
          assertMaskReductionArraysEquals(r, a, Int64VectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressInt64VectorTestsSmokeTest(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},

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

*** 5861,10 ***
--- 6079,18 ---
          int actualLoopBound = SPECIES.loopBound(length);
          int expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
          Assert.assertEquals(actualLoopBound, expectedLoopBound);
      }
  
+     @Test(dataProvider = "lengthProvider")
+     static void loopBoundLongInt64VectorTestsSmokeTest(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 ElementSizeInt64VectorTestsSmokeTest() {
          IntVector av = IntVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Integer.SIZE);

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