< prev index next >

test/jdk/jdk/incubator/vector/Int128VectorTests.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 +931,10 @@
          } 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(

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

@@ -1024,11 +1070,10 @@
                          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);
              }),

@@ -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, Int128VectorTests::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, Int128VectorTests::add);
      }
+ 
      static int SUB(int a, int b) {
          return (int)(a - b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

@@ -1415,10 +1475,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Int128VectorTests::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, Int128VectorTests::sub);
      }
+ 
      static int MUL(int a, int b) {
          return (int)(a * b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1893,10 +1944,91 @@
          }
  
          assertArraysEquals(r, a, b, mask, Int128VectorTests::XOR);
      }
  
+     static int COMPRESS_BITS(int a, int b) {
+         return (int)(Integer.compress(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void COMPRESS_BITSInt128VectorTests(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, Int128VectorTests::COMPRESS_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void COMPRESS_BITSInt128VectorTestsMasked(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, Int128VectorTests::COMPRESS_BITS);
+     }
+ 
+     static int EXPAND_BITS(int a, int b) {
+         return (int)(Integer.expand(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void EXPAND_BITSInt128VectorTests(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, Int128VectorTests::EXPAND_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void EXPAND_BITSInt128VectorTestsMasked(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, Int128VectorTests::EXPAND_BITS);
+     }
  
      @Test(dataProvider = "intBinaryOpProvider")
      static void addInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -2874,10 +2911,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, Int128VectorTests::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, Int128VectorTests::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, Int128VectorTests::MAX);
      }
+ 
      static int max(int a, int b) {
          return (int)(Math.max(a, b));
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

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

@@ -3031,11 +3070,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Int128VectorTests::ANDReduce, Int128VectorTests::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];

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

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

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

@@ -3124,11 +3159,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Int128VectorTests::ORReduce, Int128VectorTests::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];

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

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

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

@@ -3217,11 +3248,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Int128VectorTests::XORReduce, Int128VectorTests::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];

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

@@ -3282,10 +3311,11 @@
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "intUnaryOpProvider")
      static void ADDReduceInt128VectorTests(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,
                  Int128VectorTests::ADDReduce, Int128VectorTests::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 ADDReduceInt128VectorTestsMasked(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,
                  Int128VectorTests::ADDReduceMasked, Int128VectorTests::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 MULReduceInt128VectorTests(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,
                  Int128VectorTests::MULReduce, Int128VectorTests::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 MULReduceInt128VectorTestsMasked(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,
                  Int128VectorTests::MULReduceMasked, Int128VectorTests::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 MINReduceInt128VectorTests(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,
                  Int128VectorTests::MINReduce, Int128VectorTests::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 MINReduceInt128VectorTestsMasked(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,
                  Int128VectorTests::MINReduceMasked, Int128VectorTests::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 MAXReduceInt128VectorTests(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,
                  Int128VectorTests::MAXReduce, Int128VectorTests::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 MAXReduceInt128VectorTestsMasked(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,
                  Int128VectorTests::MAXReduceMasked, Int128VectorTests::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_NONZEROReduceInt128VectorTests(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,
                  Int128VectorTests::FIRST_NONZEROReduce, Int128VectorTests::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_NONZEROReduceInt128VectorTestsMasked(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 +3748,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "boolUnaryOpProvider")
      static void anyTrueInt128VectorTests(IntFunction<boolean[]> fm) {
          boolean[] mask = fm.apply(SPECIES.length());
          boolean[] r = fmr.apply(SPECIES.length());
  

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

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

@@ -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 +3887,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "intCompareOpProvider")
      static void LTInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());
  

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -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 compressInt128VectorTests(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 expandInt128VectorTests(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 getInt128VectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  

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

@@ -4724,13 +4768,10 @@
          }
  
          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];

@@ -4752,10 +4793,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Int128VectorTests::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, Int128VectorTests::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, Int128VectorTests::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, Int128VectorTests::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, Int128VectorTests::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 +4983,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Int128VectorTests::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_BLENDInt128VectorTests(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, Int128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt128VectorTests(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 +5027,10 @@
          }
  
          assertArraysEquals(r, a, b, c, Int128VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

@@ -5025,13 +5049,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, Int128VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt128VectorTestsBroadcastSmokeTest(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());

@@ -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, Int128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt128VectorTestsBroadcastSmokeTest(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 +5109,10 @@
              av.bitwiseBlend(b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Int128VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

@@ -5126,13 +5147,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, Int128VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "intTernaryOpProvider")
      static void BITWISE_BLENDInt128VectorTestsDoubleBroadcastSmokeTest(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());

@@ -5143,10 +5161,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Int128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendInt128VectorTestsDoubleBroadcastSmokeTest(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 +5177,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Int128VectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDInt128VectorTestsDoubleBroadcastMaskedSmokeTest(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,11 +5195,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, Int128VectorTests::BITWISE_BLEND);
      }
  
- 
      static int NEG(int a) {
          return (int)(-((int)a));
      }
  
      static int neg(int a) {

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

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

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

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

@@ -5394,13 +5400,194 @@
          }
  
          assertArraysEquals(r, a, mask, Int128VectorTests::ZOMO);
      }
  
+     static int BIT_COUNT(int a) {
+         return (int)(Integer.bitCount(a));
+     }
  
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void BIT_COUNTInt128VectorTests(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, Int128VectorTests::BIT_COUNT);
+     }
  
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedInt128VectorTests(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, Int128VectorTests::BIT_COUNT);
+     }
+ 
+     static int TRAILING_ZEROS_COUNT(int a) {
+         return (int)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTInt128VectorTests(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, Int128VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedInt128VectorTests(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, Int128VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static int LEADING_ZEROS_COUNT(int a) {
+         return (int)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTInt128VectorTests(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, Int128VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedInt128VectorTests(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, Int128VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static int REVERSE(int a) {
+         return (int)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSEInt128VectorTests(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, Int128VectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSEMaskedInt128VectorTests(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, Int128VectorTests::REVERSE);
+     }
+ 
+     static int REVERSE_BYTES(int a) {
+         return (int)(Integer.reverseBytes(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSE_BYTESInt128VectorTests(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, Int128VectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedInt128VectorTests(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, Int128VectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "intCompareOpProvider")
      static void ltInt128VectorTestsBroadcastSmokeTest(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, Int128VectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressInt128VectorTestsSmokeTest(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 indexInRangeLongInt128VectorTestsSmokeTest(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 loopBoundLongInt128VectorTestsSmokeTest(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 ElementSizeInt128VectorTestsSmokeTest() {
          IntVector av = IntVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Integer.SIZE);

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