< prev index next >

test/jdk/jdk/incubator/vector/IntMaxVectorTests.java

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

@@ -887,11 +936,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(

@@ -982,12 +1030,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);

@@ -1029,11 +1075,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);
              }),

@@ -1170,10 +1215,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) {

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

@@ -1344,10 +1402,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, IntMaxVectorTests::ADD);
      }
+ 
      static int add(int a, int b) {
          return (int)(a + b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

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

@@ -1420,10 +1480,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, IntMaxVectorTests::SUB);
      }
+ 
      static int sub(int a, int b) {
          return (int)(a - b);
      }
  
      @Test(dataProvider = "intBinaryOpProvider")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -1898,10 +1949,91 @@
          }
  
          assertArraysEquals(r, a, b, mask, IntMaxVectorTests::XOR);
      }
  
+     static int COMPRESS_BITS(int a, int b) {
+         return (int)(Integer.compress(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void COMPRESS_BITSIntMaxVectorTests(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, IntMaxVectorTests::COMPRESS_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void COMPRESS_BITSIntMaxVectorTestsMasked(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, IntMaxVectorTests::COMPRESS_BITS);
+     }
+ 
+     static int EXPAND_BITS(int a, int b) {
+         return (int)(Integer.expand(a, b));
+     }
+ 
+     @Test(dataProvider = "intBinaryOpProvider")
+     static void EXPAND_BITSIntMaxVectorTests(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, IntMaxVectorTests::EXPAND_BITS);
+     }
+ 
+     @Test(dataProvider = "intBinaryOpMaskProvider")
+     static void EXPAND_BITSIntMaxVectorTestsMasked(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, IntMaxVectorTests::EXPAND_BITS);
+     }
  
      @Test(dataProvider = "intBinaryOpProvider")
      static void addIntMaxVectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -3036,11 +3075,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  IntMaxVectorTests::ANDReduce, IntMaxVectorTests::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];

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

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

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

@@ -3129,11 +3164,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  IntMaxVectorTests::ORReduce, IntMaxVectorTests::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];

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

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

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

@@ -3222,11 +3253,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  IntMaxVectorTests::XORReduce, IntMaxVectorTests::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];

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

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

@@ -3311,10 +3341,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  IntMaxVectorTests::ADDReduce, IntMaxVectorTests::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];

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

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

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

@@ -3396,10 +3430,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  IntMaxVectorTests::MULReduce, IntMaxVectorTests::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];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -3765,10 +3809,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")

@@ -3805,10 +3850,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")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -4541,10 +4552,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void compressIntMaxVectorTests(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 expandIntMaxVectorTests(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 getIntMaxVectorTests(IntFunction<int[]> fa) {
          int[] a = fa.apply(SPECIES.length());
          int[] r = fr.apply(SPECIES.length());
  

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

@@ -4729,13 +4773,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];

@@ -4757,10 +4798,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, IntMaxVectorTests::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];

@@ -4786,10 +4828,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, IntMaxVectorTests::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;

@@ -4819,10 +4862,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, mask, IntMaxVectorTests::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;

@@ -4846,10 +4890,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, IntMaxVectorTests::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)

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

@@ -4942,40 +4988,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, IntMaxVectorTests::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_BLENDIntMaxVectorTests(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());

@@ -4990,10 +5014,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, IntMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendIntMaxVectorTests(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());

@@ -5007,11 +5032,10 @@
          }
  
          assertArraysEquals(r, a, b, c, IntMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDIntMaxVectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

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

@@ -5062,10 +5083,11 @@
              IntVector cv = IntVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, IntMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendIntMaxVectorTestsBroadcastSmokeTest(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());

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

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

@@ -5148,10 +5166,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, IntMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "intTernaryOpProvider")
      static void bitwiseBlendIntMaxVectorTestsDoubleBroadcastSmokeTest(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());

@@ -5163,11 +5182,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, IntMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "intTernaryOpMaskProvider")
      static void BITWISE_BLENDIntMaxVectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
                                            IntFunction<int[]> fc, IntFunction<boolean[]> fm) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

@@ -5182,11 +5200,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, IntMaxVectorTests::BITWISE_BLEND);
      }
  
- 
      static int NEG(int a) {
          return (int)(-((int)a));
      }
  
      static int neg(int a) {

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

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

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

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

@@ -5399,13 +5405,194 @@
          }
  
          assertArraysEquals(r, a, mask, IntMaxVectorTests::ZOMO);
      }
  
+     static int BIT_COUNT(int a) {
+         return (int)(Integer.bitCount(a));
+     }
  
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void BIT_COUNTIntMaxVectorTests(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, IntMaxVectorTests::BIT_COUNT);
+     }
  
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedIntMaxVectorTests(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, IntMaxVectorTests::BIT_COUNT);
+     }
+ 
+     static int TRAILING_ZEROS_COUNT(int a) {
+         return (int)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTIntMaxVectorTests(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, IntMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedIntMaxVectorTests(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, IntMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static int LEADING_ZEROS_COUNT(int a) {
+         return (int)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTIntMaxVectorTests(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, IntMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedIntMaxVectorTests(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, IntMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static int REVERSE(int a) {
+         return (int)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSEIntMaxVectorTests(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, IntMaxVectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSEMaskedIntMaxVectorTests(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, IntMaxVectorTests::REVERSE);
+     }
+ 
+     static int REVERSE_BYTES(int a) {
+         return (int)(Integer.reverseBytes(a));
+     }
+ 
+     @Test(dataProvider = "intUnaryOpProvider")
+     static void REVERSE_BYTESIntMaxVectorTests(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, IntMaxVectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "intUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedIntMaxVectorTests(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, IntMaxVectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "intCompareOpProvider")
      static void ltIntMaxVectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
          int[] a = fa.apply(SPECIES.length());
          int[] b = fb.apply(SPECIES.length());

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

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

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

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