< prev index next >

test/jdk/jdk/incubator/vector/ByteMaxVectorTests.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(byte[] r, byte[] 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], (byte)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], (byte)0, "at index #" + idx);
+             }
+         }
+     }
+ 
+     static void assertexpandArraysEquals(byte[] r, byte[] 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], (byte)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], (byte)0, "at index #" + idx);
+             }
+         }
+     }
+ 
      static void assertSelectFromArraysEquals(byte[] r, byte[] a, byte[] order, int vector_len) {
          int i = 0, j = 0;
          try {
              for (; i < a.length; i += vector_len) {
                  for (j = 0; j < vector_len; j++) {

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

@@ -992,12 +1040,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);

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

@@ -1210,10 +1255,25 @@
  
      static byte ROR_scalar(byte a, byte b) {
          return (byte)(((((byte)a) & 0xFF) >>> (b & 7)) | ((((byte)a) & 0xFF) << (8 - (b & 7))));
      }
  
+     static byte TRAILING_ZEROS_COUNT_scalar(byte a) {
+         return (byte) (a != 0 ? Integer.numberOfTrailingZeros(a) : 8);
+     }
+ 
+     static byte LEADING_ZEROS_COUNT_scalar(byte a) {
+         return (byte) (a >= 0 ? Integer.numberOfLeadingZeros(a) - 24 : 0);
+     }
+ 
+     static byte REVERSE_scalar(byte a) {
+         byte b = (byte) ROL_scalar(a, (byte) 4);
+         b = (byte) (((b & 0x55) << 1) | ((b & 0xAA) >>> 1));
+         b = (byte) (((b & 0x33) << 2) | ((b & 0xCC) >>> 2));
+         return b;
+     }
+ 
      static boolean eq(byte a, byte b) {
          return a == b;
      }
  
      static boolean neq(byte a, byte b) {

@@ -1359,10 +1419,11 @@
              a.div(b, m);
              Assert.fail();
          } catch (ArithmeticException e) {
          }
      }
+ 
      static byte ADD(byte a, byte b) {
          return (byte)(a + b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1379,10 +1440,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::ADD);
      }
+ 
      static byte add(byte a, byte b) {
          return (byte)(a + b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1435,10 +1497,11 @@
              av.add(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::add);
      }
+ 
      static byte SUB(byte a, byte b) {
          return (byte)(a - b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1455,10 +1518,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::SUB);
      }
+ 
      static byte sub(byte a, byte b) {
          return (byte)(a - b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1511,10 +1575,11 @@
              av.sub(bv, vmask).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::sub);
      }
+ 
      static byte MUL(byte a, byte b) {
          return (byte)(a * b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1531,10 +1596,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::MUL);
      }
+ 
      static byte mul(byte a, byte b) {
          return (byte)(a * b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1588,12 +1654,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::mul);
      }
  
- 
- 
      static byte DIV(byte a, byte b) {
          return (byte)(a / b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1612,10 +1676,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::DIV);
      }
+ 
      static byte div(byte a, byte b) {
          return (byte)(a / b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1635,12 +1700,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void DIVByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -1742,10 +1805,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::AND);
      }
+ 
      static byte and(byte a, byte b) {
          return (byte)(a & b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1761,12 +1825,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ANDByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -1783,11 +1845,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::AND);
      }
  
- 
      static byte AND_NOT(byte a, byte b) {
          return (byte)(a & ~b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1805,12 +1866,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::AND_NOT);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void AND_NOTByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -1827,11 +1886,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::AND_NOT);
      }
  
- 
      static byte OR(byte a, byte b) {
          return (byte)(a | b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1848,10 +1906,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::OR);
      }
+ 
      static byte or(byte a, byte b) {
          return (byte)(a | b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1867,12 +1926,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ORByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -1889,11 +1946,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::OR);
      }
  
- 
      static byte XOR(byte a, byte b) {
          return (byte)(a ^ b);
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -1911,12 +1967,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::XOR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void XORByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -1933,11 +1987,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::XOR);
      }
  
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void addByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2027,13 +2080,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, ByteMaxVectorTests::mul);
      }
  
- 
- 
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void divByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2046,12 +2096,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, ByteMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void divByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2067,12 +2115,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, ByteMaxVectorTests::div);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void ORByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2097,12 +2143,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, ByteMaxVectorTests::or);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ORByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2116,12 +2160,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, ByteMaxVectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void ANDByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2146,12 +2188,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, ByteMaxVectorTests::and);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ANDByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2165,12 +2205,10 @@
          }
  
          assertBroadcastArraysEquals(r, a, b, mask, ByteMaxVectorTests::AND);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void ORByteMaxVectorTestsBroadcastLongSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2181,12 +2219,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, ByteMaxVectorTests::OR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ORByteMaxVectorTestsBroadcastMaskedLongSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2200,11 +2236,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, ByteMaxVectorTests::OR);
      }
  
- 
      @Test(dataProvider = "byteBinaryOpProvider")
      static void ADDByteMaxVectorTestsBroadcastLongSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2232,12 +2267,10 @@
          }
  
          assertBroadcastLongArraysEquals(r, a, b, mask, ByteMaxVectorTests::ADD);
      }
  
- 
- 
      static byte LSHL(byte a, byte b) {
          return (byte)((a << (b & 0x7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2255,12 +2288,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::LSHL);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void LSHLByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2277,15 +2308,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::LSHL);
      }
  
- 
- 
- 
- 
- 
      static byte ASHR(byte a, byte b) {
          return (byte)((a >> (b & 0x7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2303,12 +2329,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::ASHR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ASHRByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2325,15 +2349,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::ASHR);
      }
  
- 
- 
- 
- 
- 
      static byte LSHR(byte a, byte b) {
          return (byte)(((a & 0xFF) >>> (b & 0x7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2351,12 +2370,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::LSHR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void LSHRByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2373,15 +2390,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::LSHR);
      }
  
- 
- 
- 
- 
- 
      static byte LSHL_unary(byte a, byte b) {
          return (byte)((a << (b & 7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2398,12 +2410,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, ByteMaxVectorTests::LSHL_unary);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void LSHLByteMaxVectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2419,15 +2429,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, ByteMaxVectorTests::LSHL_unary);
      }
  
- 
- 
- 
- 
- 
      static byte LSHR_unary(byte a, byte b) {
          return (byte)(((a & 0xFF) >>> (b & 7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2444,12 +2449,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, ByteMaxVectorTests::LSHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void LSHRByteMaxVectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2465,15 +2468,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, ByteMaxVectorTests::LSHR_unary);
      }
  
- 
- 
- 
- 
- 
      static byte ASHR_unary(byte a, byte b) {
          return (byte)((a >> (b & 7)));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2490,12 +2488,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, ByteMaxVectorTests::ASHR_unary);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ASHRByteMaxVectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2511,13 +2507,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, ByteMaxVectorTests::ASHR_unary);
      }
  
- 
- 
- 
      static byte ROR(byte a, byte b) {
          return (byte)(ROR_scalar(a,b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2535,12 +2528,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::ROR);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void RORByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2557,11 +2548,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::ROR);
      }
  
- 
      static byte ROL(byte a, byte b) {
          return (byte)(ROL_scalar(a,b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2579,12 +2569,10 @@
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::ROL);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ROLByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2601,11 +2589,10 @@
          }
  
          assertArraysEquals(r, a, b, mask, ByteMaxVectorTests::ROL);
      }
  
- 
      static byte ROR_unary(byte a, byte b) {
          return (byte)(ROR_scalar(a, b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2622,12 +2609,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, ByteMaxVectorTests::ROR_unary);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void RORByteMaxVectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2643,11 +2628,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, mask, ByteMaxVectorTests::ROR_unary);
      }
  
- 
      static byte ROL_unary(byte a, byte b) {
          return (byte)(ROL_scalar(a, b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2664,12 +2648,10 @@
          }
  
          assertShiftArraysEquals(r, a, b, ByteMaxVectorTests::ROL_unary);
      }
  
- 
- 
      @Test(dataProvider = "byteBinaryOpMaskProvider")
      static void ROLByteMaxVectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -2684,14 +2666,10 @@
              }
          }
  
          assertShiftArraysEquals(r, a, b, mask, ByteMaxVectorTests::ROL_unary);
      }
- 
- 
- 
- 
      static byte LSHR_binary_const(byte a) {
          return (byte)(((a & 0xFF) >>> CONST_SHIFT));
      }
  
      @Test(dataProvider = "byteUnaryOpProvider")

@@ -2707,12 +2685,10 @@
          }
  
          assertShiftConstEquals(r, a, ByteMaxVectorTests::LSHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void LSHRByteMaxVectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2727,14 +2703,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, ByteMaxVectorTests::LSHR_binary_const);
      }
  
- 
- 
- 
- 
      static byte LSHL_binary_const(byte a) {
          return (byte)((a << CONST_SHIFT));
      }
  
      @Test(dataProvider = "byteUnaryOpProvider")

@@ -2750,12 +2722,10 @@
          }
  
          assertShiftConstEquals(r, a, ByteMaxVectorTests::LSHL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void LSHLByteMaxVectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2770,12 +2740,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, ByteMaxVectorTests::LSHL_binary_const);
      }
  
- 
- 
      static byte ASHR_binary_const(byte a) {
          return (byte)((a >> CONST_SHIFT));
      }
  
      @Test(dataProvider = "byteUnaryOpProvider")

@@ -2791,12 +2759,10 @@
          }
  
          assertShiftConstEquals(r, a, ByteMaxVectorTests::ASHR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ASHRByteMaxVectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2811,12 +2777,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, ByteMaxVectorTests::ASHR_binary_const);
      }
  
- 
- 
      static byte ROR_binary_const(byte a) {
          return (byte)(ROR_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "byteUnaryOpProvider")

@@ -2832,12 +2796,10 @@
          }
  
          assertShiftConstEquals(r, a, ByteMaxVectorTests::ROR_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void RORByteMaxVectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2852,12 +2814,10 @@
          }
  
          assertShiftConstEquals(r, a, mask, ByteMaxVectorTests::ROR_binary_const);
      }
  
- 
- 
      static byte ROL_binary_const(byte a) {
          return (byte)(ROL_scalar(a, CONST_SHIFT));
      }
  
      @Test(dataProvider = "byteUnaryOpProvider")

@@ -2873,12 +2833,10 @@
          }
  
          assertShiftConstEquals(r, a, ByteMaxVectorTests::ROL_binary_const);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ROLByteMaxVectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
                                            IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -2914,10 +2872,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::MIN);
      }
+ 
      static byte min(byte a, byte b) {
          return (byte)(Math.min(a, b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2932,10 +2891,11 @@
              av.min(bv).intoArray(r, i);
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::min);
      }
+ 
      static byte MAX(byte a, byte b) {
          return (byte)(Math.max(a, b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

@@ -2952,10 +2912,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, ByteMaxVectorTests::MAX);
      }
+ 
      static byte max(byte a, byte b) {
          return (byte)(Math.max(a, b));
      }
  
      @Test(dataProvider = "byteBinaryOpProvider")

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

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

@@ -3091,11 +3050,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ANDReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3138,11 +3095,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void ORReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = 0;

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

@@ -3184,11 +3139,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ORReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3231,11 +3184,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void XORReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = 0;

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

@@ -3277,11 +3228,10 @@
          }
  
          return res;
      }
  
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void XORReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

@@ -3322,10 +3272,11 @@
              res += ADDReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void ADDReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = 0;

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

@@ -3364,10 +3316,11 @@
              res += ADDReduceMasked(a, i, mask);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ADDReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3407,10 +3361,11 @@
              res *= MULReduce(a, i);
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void MULReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = 1;

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

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

@@ -3475,10 +3432,11 @@
          }
  
          assertReductionArraysEqualsMasked(r, ra, a, mask,
                  ByteMaxVectorTests::MULReduceMasked, ByteMaxVectorTests::MULReduceAllMasked);
      }
+ 
      static byte MINReduce(byte[] a, int idx) {
          byte res = Byte.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              res = (byte) Math.min(res, a[i]);
          }

@@ -3492,10 +3450,11 @@
              res = (byte) Math.min(res, MINReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void MINReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = Byte.MAX_VALUE;

@@ -3516,10 +3475,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  ByteMaxVectorTests::MINReduce, ByteMaxVectorTests::MINReduceAll);
      }
+ 
      static byte MINReduceMasked(byte[] a, int idx, boolean[] mask) {
          byte res = Byte.MAX_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (byte) Math.min(res, a[i]);

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

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

@@ -3577,10 +3539,11 @@
              res = (byte) Math.max(res, MAXReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void MAXReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = Byte.MIN_VALUE;

@@ -3601,10 +3564,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  ByteMaxVectorTests::MAXReduce, ByteMaxVectorTests::MAXReduceAll);
      }
+ 
      static byte MAXReduceMasked(byte[] a, int idx, boolean[] mask) {
          byte res = Byte.MIN_VALUE;
          for (int i = idx; i < (idx + SPECIES.length()); i++) {
              if (mask[i % SPECIES.length()])
                  res = (byte) Math.max(res, a[i]);

@@ -3619,10 +3583,11 @@
              res = (byte) Math.max(res, MAXReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void MAXReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

@@ -3662,10 +3628,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduce(a, i));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void FIRST_NONZEROReduceByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          byte ra = (byte) 0;

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

@@ -3704,10 +3672,11 @@
              res = firstNonZero(res, FIRST_NONZEROReduceMasked(a, i, mask));
          }
  
          return res;
      }
+ 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void FIRST_NONZEROReduceByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
          boolean[] mask = fm.apply(SPECIES.length());

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

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

@@ -3782,11 +3748,10 @@
          }
  
          assertReductionBoolArraysEquals(r, mask, ByteMaxVectorTests::allTrue);
      }
  
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void withByteMaxVectorTests(IntFunction<byte []> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
  

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

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

@@ -3881,13 +3848,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void LTByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -3903,11 +3867,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void ltByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -3946,11 +3909,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void GTByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -3989,11 +3951,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void EQByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4009,11 +3970,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void eqByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4052,11 +4012,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void NEByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4095,11 +4054,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void LEByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4138,11 +4096,10 @@
                  }
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void GEByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4181,12 +4138,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void UNSIGNED_LTByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4202,12 +4157,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "byteCompareOpMaskProvider")
      static void UNSIGNED_LTByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                                  IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -4227,13 +4180,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void UNSIGNED_GTByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4249,12 +4199,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "byteCompareOpMaskProvider")
      static void UNSIGNED_GTByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                                  IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -4274,13 +4222,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void UNSIGNED_LEByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4296,12 +4241,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "byteCompareOpMaskProvider")
      static void UNSIGNED_LEByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                                  IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -4321,13 +4264,10 @@
                  }
              }
          }
      }
  
- 
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void UNSIGNED_GEByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

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

@@ -4368,12 +4306,10 @@
                  }
              }
          }
      }
  
- 
- 
      @Test(dataProvider = "byteCompareOpProvider")
      static void LTByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
  

@@ -4386,11 +4322,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] < b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpMaskProvider")
      static void LTByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa,
                                  IntFunction<byte[]> fb, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

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

@@ -4460,11 +4394,10 @@
                  Assert.assertEquals(mv.laneIsSet(j), a[i + j] == b[i]);
              }
          }
      }
  
- 
      @Test(dataProvider = "byteCompareOpMaskProvider")
      static void EQByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa,
                                  IntFunction<byte[]> fb, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

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

@@ -4576,10 +4508,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void compressByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.compress(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertcompressArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void expandByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.expand(vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertexpandArraysEquals(r, a, mask, SPECIES.length());
+     }
+ 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void getByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
  

@@ -4746,14 +4715,10 @@
          }
  
          assertBroadcastArraysEquals(r, a);
      }
  
- 
- 
- 
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void ZeroByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = new byte[a.length];
  

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

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

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

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

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

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

@@ -4977,40 +4944,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, ByteMaxVectorTests::unslice);
      }
  
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
      static byte BITWISE_BLEND(byte a, byte b, byte c) {
          return (byte)((a&~(c))|(b&c));
      }
+ 
      static byte bitwiseBlend(byte a, byte b, byte c) {
          return (byte)((a&~(c))|(b&c));
      }
  
- 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void BITWISE_BLENDByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5025,10 +4970,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, ByteMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByteMaxVectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5042,11 +4988,10 @@
          }
  
          assertArraysEquals(r, a, b, c, ByteMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "byteTernaryOpMaskProvider")
      static void BITWISE_BLENDByteMaxVectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<byte[]> fc, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -5065,13 +5010,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, ByteMaxVectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void BITWISE_BLENDByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5097,10 +5039,11 @@
              ByteVector cv = ByteVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, ByteMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5127,11 +5070,10 @@
              av.bitwiseBlend(b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, ByteMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "byteTernaryOpMaskProvider")
      static void BITWISE_BLENDByteMaxVectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<byte[]> fc, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -5166,13 +5108,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, ByteMaxVectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void BITWISE_BLENDByteMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5183,10 +5122,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, ByteMaxVectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByteMaxVectorTestsDoubleBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb, IntFunction<byte[]> fc) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());
          byte[] c = fc.apply(SPECIES.length());

@@ -5198,11 +5138,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, ByteMaxVectorTests::bitwiseBlend);
      }
  
- 
      @Test(dataProvider = "byteTernaryOpMaskProvider")
      static void BITWISE_BLENDByteMaxVectorTestsDoubleBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
                                            IntFunction<byte[]> fc, IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -5217,11 +5156,10 @@
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, mask, ByteMaxVectorTests::BITWISE_BLEND);
      }
  
- 
      static byte NEG(byte a) {
          return (byte)(-((byte)a));
      }
  
      static byte neg(byte a) {

@@ -5330,21 +5268,18 @@
          }
  
          assertArraysEquals(r, a, mask, ByteMaxVectorTests::ABS);
      }
  
- 
      static byte NOT(byte a) {
          return (byte)(~((byte)a));
      }
  
      static byte not(byte a) {
          return (byte)(~((byte)a));
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void NOTByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
  

@@ -5371,12 +5306,10 @@
          }
  
          assertArraysEquals(r, a, ByteMaxVectorTests::not);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void NOTMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
                                                  IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -5391,18 +5324,14 @@
          }
  
          assertArraysEquals(r, a, mask, ByteMaxVectorTests::NOT);
      }
  
- 
- 
      static byte ZOMO(byte a) {
          return (byte)((a==0?0:-1));
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpProvider")
      static void ZOMOByteMaxVectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
  

@@ -5414,12 +5343,10 @@
          }
  
          assertArraysEquals(r, a, ByteMaxVectorTests::ZOMO);
      }
  
- 
- 
      @Test(dataProvider = "byteUnaryOpMaskProvider")
      static void ZOMOMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
                                                  IntFunction<boolean[]> fm) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());

@@ -5434,13 +5361,194 @@
          }
  
          assertArraysEquals(r, a, mask, ByteMaxVectorTests::ZOMO);
      }
  
+     static byte BIT_COUNT(byte a) {
+         return (byte)(Integer.bitCount((int)a & 0xFF));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void BIT_COUNTByteMaxVectorTests(IntFunction<byte[]> fa) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, ByteMaxVectorTests::BIT_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.BIT_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, ByteMaxVectorTests::BIT_COUNT);
+     }
+ 
+     static byte TRAILING_ZEROS_COUNT(byte a) {
+         return (byte)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTByteMaxVectorTests(IntFunction<byte[]> fa) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, ByteMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.TRAILING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, ByteMaxVectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static byte LEADING_ZEROS_COUNT(byte a) {
+         return (byte)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTByteMaxVectorTests(IntFunction<byte[]> fa) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, ByteMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.LEADING_ZEROS_COUNT, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, ByteMaxVectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static byte REVERSE(byte a) {
+         return (byte)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void REVERSEByteMaxVectorTests(IntFunction<byte[]> fa) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, ByteMaxVectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void REVERSEMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, ByteMaxVectorTests::REVERSE);
+     }
+ 
+     static byte REVERSE_BYTES(byte a) {
+         return (byte)(a);
+     }
  
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void REVERSE_BYTESByteMaxVectorTests(IntFunction<byte[]> fa) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
  
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES).intoArray(r, i);
+             }
+         }
  
+         assertArraysEquals(r, a, ByteMaxVectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedByteMaxVectorTests(IntFunction<byte[]> fa,
+                                                 IntFunction<boolean[]> fm) {
+         byte[] a = fa.apply(SPECIES.length());
+         byte[] r = fr.apply(SPECIES.length());
+         boolean[] mask = fm.apply(SPECIES.length());
+         VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
+ 
+         for (int ic = 0; ic < INVOC_COUNT; ic++) {
+             for (int i = 0; i < a.length; i += SPECIES.length()) {
+                 ByteVector av = ByteVector.fromArray(SPECIES, a, i);
+                 av.lanewise(VectorOperators.REVERSE_BYTES, vmask).intoArray(r, i);
+             }
+         }
+ 
+         assertArraysEquals(r, a, mask, ByteMaxVectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "byteCompareOpProvider")
      static void ltByteMaxVectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

@@ -5850,10 +5958,27 @@
          }
  
          assertMaskReductionArraysEquals(r, a, ByteMaxVectorTests::maskFirstTrue);
      }
  
+     @Test(dataProvider = "maskProvider")
+     static void maskCompressByteMaxVectorTestsSmokeTest(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},

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

@@ -5896,10 +6035,18 @@
          int actualLoopBound = SPECIES.loopBound(length);
          int expectedLoopBound = length - Math.floorMod(length, SPECIES.length());
          Assert.assertEquals(actualLoopBound, expectedLoopBound);
      }
  
+     @Test(dataProvider = "lengthProvider")
+     static void loopBoundLongByteMaxVectorTestsSmokeTest(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 ElementSizeByteMaxVectorTestsSmokeTest() {
          ByteVector av = ByteVector.zero(SPECIES);
          int elsize = av.elementSize();
          Assert.assertEquals(elsize, Byte.SIZE);

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