< prev index next >

test/jdk/jdk/incubator/vector/Byte128VectorTests.java

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

@@ -892,11 +941,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(

@@ -987,12 +1035,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);

@@ -1064,11 +1110,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);
              }),

@@ -1205,10 +1250,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) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -3066,11 +3026,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Byte128VectorTests::ANDReduce, Byte128VectorTests::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];

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

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

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

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

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

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

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

@@ -3252,11 +3204,10 @@
  
          assertReductionArraysEquals(r, ra, a,
                  Byte128VectorTests::XORReduce, Byte128VectorTests::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];

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

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

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

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

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

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

@@ -3426,10 +3381,11 @@
          }
  
          assertReductionArraysEquals(r, ra, a,
                  Byte128VectorTests::MULReduce, Byte128VectorTests::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];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -3795,10 +3760,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")

@@ -3835,10 +3801,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")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -4571,10 +4503,47 @@
              av.rearrange(VectorShuffle.fromArray(SPECIES, order, i), vmask).intoArray(r, i);
          }
  
          assertRearrangeArraysEquals(r, a, order, mask, SPECIES.length());
      }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void compressByte128VectorTests(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 expandByte128VectorTests(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 getByte128VectorTests(IntFunction<byte[]> fa) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] r = fr.apply(SPECIES.length());
  

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

@@ -4759,13 +4724,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];

@@ -4787,10 +4749,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Byte128VectorTests::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];

@@ -4816,10 +4779,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, Byte128VectorTests::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;

@@ -4849,10 +4813,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, origin, mask, Byte128VectorTests::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;

@@ -4876,10 +4841,11 @@
              }
          }
  
          assertArraysEquals(r, a, origin, Byte128VectorTests::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)

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

@@ -4972,40 +4939,18 @@
          }
  
          assertArraysEquals(r, a, b, origin, part, mask, Byte128VectorTests::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_BLENDByte128VectorTests(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());

@@ -5020,10 +4965,11 @@
              }
          }
  
          assertArraysEquals(r, a, b, c, Byte128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByte128VectorTests(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());

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

@@ -5060,13 +5005,10 @@
          }
  
          assertArraysEquals(r, a, b, c, mask, Byte128VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void BITWISE_BLENDByte128VectorTestsBroadcastSmokeTest(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());

@@ -5092,10 +5034,11 @@
              ByteVector cv = ByteVector.fromArray(SPECIES, c, i);
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], cv).intoArray(r, i);
          }
          assertAltBroadcastArraysEquals(r, a, b, c, Byte128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByte128VectorTestsBroadcastSmokeTest(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());

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

@@ -5161,13 +5103,10 @@
          }
  
          assertAltBroadcastArraysEquals(r, a, b, c, mask, Byte128VectorTests::BITWISE_BLEND);
      }
  
- 
- 
- 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void BITWISE_BLENDByte128VectorTestsDoubleBroadcastSmokeTest(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());

@@ -5178,10 +5117,11 @@
              av.lanewise(VectorOperators.BITWISE_BLEND, b[i], c[i]).intoArray(r, i);
          }
  
          assertDoubleBroadcastArraysEquals(r, a, b, c, Byte128VectorTests::BITWISE_BLEND);
      }
+ 
      @Test(dataProvider = "byteTernaryOpProvider")
      static void bitwiseBlendByte128VectorTestsDoubleBroadcastSmokeTest(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());

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

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

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

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

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

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

@@ -5429,13 +5356,194 @@
          }
  
          assertArraysEquals(r, a, mask, Byte128VectorTests::ZOMO);
      }
  
+     static byte BIT_COUNT(byte a) {
+         return (byte)(Integer.bitCount((int)a & 0xFF));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void BIT_COUNTByte128VectorTests(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, Byte128VectorTests::BIT_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void BIT_COUNTMaskedByte128VectorTests(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, Byte128VectorTests::BIT_COUNT);
+     }
+ 
+     static byte TRAILING_ZEROS_COUNT(byte a) {
+         return (byte)(TRAILING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void TRAILING_ZEROS_COUNTByte128VectorTests(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, Byte128VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void TRAILING_ZEROS_COUNTMaskedByte128VectorTests(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, Byte128VectorTests::TRAILING_ZEROS_COUNT);
+     }
+ 
+     static byte LEADING_ZEROS_COUNT(byte a) {
+         return (byte)(LEADING_ZEROS_COUNT_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void LEADING_ZEROS_COUNTByte128VectorTests(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, Byte128VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void LEADING_ZEROS_COUNTMaskedByte128VectorTests(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, Byte128VectorTests::LEADING_ZEROS_COUNT);
+     }
+ 
+     static byte REVERSE(byte a) {
+         return (byte)(REVERSE_scalar(a));
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void REVERSEByte128VectorTests(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, Byte128VectorTests::REVERSE);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void REVERSEMaskedByte128VectorTests(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, Byte128VectorTests::REVERSE);
+     }
+ 
+     static byte REVERSE_BYTES(byte a) {
+         return (byte)(a);
+     }
  
+     @Test(dataProvider = "byteUnaryOpProvider")
+     static void REVERSE_BYTESByte128VectorTests(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, Byte128VectorTests::REVERSE_BYTES);
+     }
+ 
+     @Test(dataProvider = "byteUnaryOpMaskProvider")
+     static void REVERSE_BYTESMaskedByte128VectorTests(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, Byte128VectorTests::REVERSE_BYTES);
+     }
  
      @Test(dataProvider = "byteCompareOpProvider")
      static void ltByte128VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
          byte[] a = fa.apply(SPECIES.length());
          byte[] b = fb.apply(SPECIES.length());

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

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

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

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