1 /*
  2  * Copyright (c) 2021, Arm Limited. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 package compiler.vectorapi;
 25 
 26 import java.util.Random;
 27 
 28 import jdk.incubator.vector.ByteVector;
 29 import jdk.incubator.vector.DoubleVector;
 30 import jdk.incubator.vector.FloatVector;
 31 import jdk.incubator.vector.IntVector;
 32 import jdk.incubator.vector.LongVector;
 33 import jdk.incubator.vector.ShortVector;
 34 import jdk.incubator.vector.VectorMask;
 35 import jdk.test.lib.Utils;
 36 
 37 import org.testng.Assert;
 38 import org.testng.annotations.Test;
 39 
 40 /**
 41  * @test
 42  * @bug 8273264
 43  * @key randomness
 44  * @library /test/lib
 45  * @summary AArch64: [vector] Add missing rules for VectorMaskCast
 46  * @modules jdk.incubator.vector
 47  *
 48  * @run testng/othervm -XX:-TieredCompilation -XX:CompileThreshold=100 compiler.vectorapi.VectorMaskCastTest
 49  */
 50 
 51 
 52 // Current vector mask cast test cases at test/jdk/jdk/incubator/vector/*ConversionTests.java
 53 // could not be intrinsfied, hence not able to verify compiler codegen, see [1]. As a
 54 // supplement, we add more tests for vector mask cast operations, which could be intrinsified
 55 // by c2 compiler to generate vector/mask instructions on supported targets.
 56 //
 57 // [1] https://bugs.openjdk.java.net/browse/JDK-8259610
 58 
 59 public class VectorMaskCastTest{
 60 
 61     private static final int NUM_ITER = 5000;
 62     private static final Random rd = Utils.getRandomInstance();
 63 
 64     public static boolean[] genMask() {
 65         boolean[] mask = new boolean[64];
 66         for (int i = 0; i < 64; i ++) {
 67             mask[i] = rd.nextBoolean();
 68         }
 69         return mask;
 70     }
 71 
 72     // Byte
 73     private static void testByte64ToShort128(boolean[] mask_arr) {
 74         VectorMask<Byte> mByte64 = VectorMask.fromArray(ByteVector.SPECIES_64, mask_arr, 0);
 75         Assert.assertEquals(mByte64.cast(ShortVector.SPECIES_128).toString(), mByte64.toString());
 76     }
 77 
 78     private static void testByte64ToInt256(boolean[] mask_arr) {
 79         VectorMask<Byte> mByte64 = VectorMask.fromArray(ByteVector.SPECIES_64, mask_arr, 0);
 80         Assert.assertEquals(mByte64.cast(IntVector.SPECIES_256).toString(), mByte64.toString());
 81     }
 82 
 83     private static void testByte64ToFloat256(boolean[] mask_arr) {
 84         VectorMask<Byte> mByte64 = VectorMask.fromArray(ByteVector.SPECIES_64, mask_arr, 0);
 85         Assert.assertEquals(mByte64.cast(FloatVector.SPECIES_256).toString(), mByte64.toString());
 86     }
 87 
 88     private static void testByte64ToLong512(boolean[] mask_arr) {
 89         VectorMask<Byte> mByte64 = VectorMask.fromArray(ByteVector.SPECIES_64, mask_arr, 0);
 90         Assert.assertEquals(mByte64.cast(LongVector.SPECIES_512).toString(), mByte64.toString());
 91     }
 92 
 93     private static void testByte64ToDouble512(boolean[] mask_arr) {
 94         VectorMask<Byte> mByte64 = VectorMask.fromArray(ByteVector.SPECIES_64, mask_arr, 0);
 95         Assert.assertEquals(mByte64.cast(DoubleVector.SPECIES_512).toString(), mByte64.toString());
 96     }
 97 
 98     private static void testByte128ToShort256(boolean[] mask_arr) {
 99         VectorMask<Byte> mByte128 = VectorMask.fromArray(ByteVector.SPECIES_128, mask_arr, 0);
100         Assert.assertEquals(mByte128.cast(ShortVector.SPECIES_256).toString(), mByte128.toString());
101     }
102 
103     private static void testByte128ToInt512(boolean[] mask_arr) {
104         VectorMask<Byte> mByte128 = VectorMask.fromArray(ByteVector.SPECIES_128, mask_arr, 0);
105         Assert.assertEquals(mByte128.cast(IntVector.SPECIES_512).toString(), mByte128.toString());
106     }
107 
108     private static void testByte128ToFloat512(boolean[] mask_arr) {
109         VectorMask<Byte> mByte128 = VectorMask.fromArray(ByteVector.SPECIES_128, mask_arr, 0);
110         Assert.assertEquals(mByte128.cast(FloatVector.SPECIES_512).toString(), mByte128.toString());
111     }
112 
113     private static void testByte256ToShort512(boolean[] mask_arr) {
114         VectorMask<Byte> mByte256 = VectorMask.fromArray(ByteVector.SPECIES_256, mask_arr, 0);
115         Assert.assertEquals(mByte256.cast(ShortVector.SPECIES_512).toString(), mByte256.toString());
116     }
117 
118     // Short
119     private static void testShort64ToInt128(boolean[] mask_arr) {
120         VectorMask<Short> mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mask_arr, 0);
121         Assert.assertEquals(mShort64.cast(IntVector.SPECIES_128).toString(), mShort64.toString());
122     }
123 
124     private static void testShort64ToFloat128(boolean[] mask_arr) {
125         VectorMask<Short> mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mask_arr, 0);
126         Assert.assertEquals(mShort64.cast(FloatVector.SPECIES_128).toString(), mShort64.toString());
127     }
128 
129     private static void testShort64ToLong256(boolean[] mask_arr) {
130         VectorMask<Short> mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mask_arr, 0);
131         Assert.assertEquals(mShort64.cast(LongVector.SPECIES_256).toString(), mShort64.toString());
132     }
133 
134     private static void testShort64ToDouble256(boolean[] mask_arr) {
135         VectorMask<Short> mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mask_arr, 0);
136         Assert.assertEquals(mShort64.cast(DoubleVector.SPECIES_256).toString(), mShort64.toString());
137     }
138 
139     private static void testShort128ToByte64(boolean[] mask_arr) {
140         VectorMask<Short> mShort128 = VectorMask.fromArray(ShortVector.SPECIES_128, mask_arr, 0);
141         Assert.assertEquals(mShort128.cast(ByteVector.SPECIES_64).toString(), mShort128.toString());
142     }
143 
144     private static void testShort128ToInt256(boolean[] mask_arr) {
145         VectorMask<Short> mShort128 = VectorMask.fromArray(ShortVector.SPECIES_128, mask_arr, 0);
146         Assert.assertEquals(mShort128.cast(IntVector.SPECIES_256).toString(), mShort128.toString());
147     }
148 
149     private static void testShort128ToFloat256(boolean[] mask_arr) {
150         VectorMask<Short> mShort128 = VectorMask.fromArray(ShortVector.SPECIES_128, mask_arr, 0);
151         Assert.assertEquals(mShort128.cast(FloatVector.SPECIES_256).toString(), mShort128.toString());
152     }
153 
154     private static void testShort128ToLong512(boolean[] mask_arr) {
155         VectorMask<Short> mShort128 = VectorMask.fromArray(ShortVector.SPECIES_128, mask_arr, 0);
156         Assert.assertEquals(mShort128.cast(LongVector.SPECIES_512).toString(), mShort128.toString());
157     }
158 
159     private static void testShort128ToDouble512(boolean[] mask_arr) {
160         VectorMask<Short> mShort128 = VectorMask.fromArray(ShortVector.SPECIES_128, mask_arr, 0);
161         Assert.assertEquals(mShort128.cast(DoubleVector.SPECIES_512).toString(), mShort128.toString());
162     }
163 
164     private static void testShort256ToByte128(boolean[] mask_arr) {
165         VectorMask<Short> mShort256 = VectorMask.fromArray(ShortVector.SPECIES_256, mask_arr, 0);
166         Assert.assertEquals(mShort256.cast(ByteVector.SPECIES_128).toString(), mShort256.toString());
167     }
168 
169     private static void testShort256ToInt512(boolean[] mask_arr) {
170         VectorMask<Short> mShort256 = VectorMask.fromArray(ShortVector.SPECIES_256, mask_arr, 0);
171         Assert.assertEquals(mShort256.cast(IntVector.SPECIES_512).toString(), mShort256.toString());
172     }
173 
174     private static void testShort256ToFloat512(boolean[] mask_arr) {
175         VectorMask<Short> mShort256 = VectorMask.fromArray(ShortVector.SPECIES_256, mask_arr, 0);
176         Assert.assertEquals(mShort256.cast(FloatVector.SPECIES_512).toString(), mShort256.toString());
177     }
178 
179     private static void testShort512ToByte256(boolean[] mask_arr) {
180         VectorMask<Short> mShort512 = VectorMask.fromArray(ShortVector.SPECIES_512, mask_arr, 0);
181         Assert.assertEquals(mShort512.cast(ByteVector.SPECIES_256).toString(), mShort512.toString());
182     }
183 
184     // Int
185     private static void testInt64ToLong128(boolean[] mask_arr) {
186         VectorMask<Integer> mInt64 = VectorMask.fromArray(IntVector.SPECIES_64, mask_arr, 0);
187         Assert.assertEquals(mInt64.cast(LongVector.SPECIES_128).toString(), mInt64.toString());
188     }
189 
190     private static void testInt64ToDouble128(boolean[] mask_arr) {
191         VectorMask<Integer> mInt64 = VectorMask.fromArray(IntVector.SPECIES_64, mask_arr, 0);
192         Assert.assertEquals(mInt64.cast(DoubleVector.SPECIES_128).toString(), mInt64.toString());
193     }
194 
195     private static void testInt128ToShort64(boolean[] mask_arr) {
196         VectorMask<Integer> mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mask_arr, 0);
197         Assert.assertEquals(mInt128.cast(ShortVector.SPECIES_64).toString(), mInt128.toString());
198     }
199 
200     private static void testInt128ToLong256(boolean[] mask_arr) {
201         VectorMask<Integer> mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mask_arr, 0);
202         Assert.assertEquals(mInt128.cast(LongVector.SPECIES_256).toString(), mInt128.toString());
203     }
204 
205     private static void testInt128ToDouble256(boolean[] mask_arr) {
206         VectorMask<Integer> mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mask_arr, 0);
207         Assert.assertEquals(mInt128.cast(DoubleVector.SPECIES_256).toString(), mInt128.toString());
208     }
209 
210     private static void testInt256ToShort128(boolean[] mask_arr) {
211         VectorMask<Integer> mInt256 = VectorMask.fromArray(IntVector.SPECIES_256, mask_arr, 0);
212         Assert.assertEquals(mInt256.cast(ShortVector.SPECIES_128).toString(), mInt256.toString());
213     }
214 
215     private static void testInt256ToByte64(boolean[] mask_arr) {
216         VectorMask<Integer> mInt256 = VectorMask.fromArray(IntVector.SPECIES_256, mask_arr, 0);
217         Assert.assertEquals(mInt256.cast(ByteVector.SPECIES_64).toString(), mInt256.toString());
218     }
219 
220     private static void testInt256ToLong512(boolean[] mask_arr) {
221         VectorMask<Integer> mInt256 = VectorMask.fromArray(IntVector.SPECIES_256, mask_arr, 0);
222         Assert.assertEquals(mInt256.cast(LongVector.SPECIES_512).toString(), mInt256.toString());
223     }
224 
225     private static void testInt256ToDouble512(boolean[] mask_arr) {
226         VectorMask<Integer> mInt256 = VectorMask.fromArray(IntVector.SPECIES_256, mask_arr, 0);
227         Assert.assertEquals(mInt256.cast(DoubleVector.SPECIES_512).toString(), mInt256.toString());
228     }
229 
230     private static void testInt512ToShort256(boolean[] mask_arr) {
231         VectorMask<Integer> mInt512 = VectorMask.fromArray(IntVector.SPECIES_512, mask_arr, 0);
232         Assert.assertEquals(mInt512.cast(ShortVector.SPECIES_256).toString(), mInt512.toString());
233     }
234 
235     private static void testInt512ToByte128(boolean[] mask_arr) {
236         VectorMask<Integer> mInt512 = VectorMask.fromArray(IntVector.SPECIES_512, mask_arr, 0);
237         Assert.assertEquals(mInt512.cast(ByteVector.SPECIES_128).toString(), mInt512.toString());
238     }
239 
240     // Float
241     private static void testFloat64ToLong128(boolean[] mask_arr) {
242         VectorMask<Float> mFloat64 = VectorMask.fromArray(FloatVector.SPECIES_64, mask_arr, 0);
243         Assert.assertEquals(mFloat64.cast(LongVector.SPECIES_128).toString(), mFloat64.toString());
244     }
245 
246     private static void testFloat64ToDouble128(boolean[] mask_arr) {
247         VectorMask<Float> mFloat64 = VectorMask.fromArray(FloatVector.SPECIES_64, mask_arr, 0);
248         Assert.assertEquals(mFloat64.cast(DoubleVector.SPECIES_128).toString(), mFloat64.toString());
249     }
250 
251     private static void testFloat128ToShort64(boolean[] mask_arr) {
252         VectorMask<Float> mFloat128 = VectorMask.fromArray(FloatVector.SPECIES_128, mask_arr, 0);
253         Assert.assertEquals(mFloat128.cast(ShortVector.SPECIES_64).toString(), mFloat128.toString());
254     }
255 
256     private static void testFloat128ToLong256(boolean[] mask_arr) {
257         VectorMask<Float> mFloat128 = VectorMask.fromArray(FloatVector.SPECIES_128, mask_arr, 0);
258         Assert.assertEquals(mFloat128.cast(LongVector.SPECIES_256).toString(), mFloat128.toString());
259     }
260 
261     private static void testFloat128ToDouble256(boolean[] mask_arr) {
262         VectorMask<Float> mFloat128 = VectorMask.fromArray(FloatVector.SPECIES_128, mask_arr, 0);
263         Assert.assertEquals(mFloat128.cast(DoubleVector.SPECIES_256).toString(), mFloat128.toString());
264     }
265 
266     private static void testFloat256ToShort128(boolean[] mask_arr) {
267         VectorMask<Float> mFloat256 = VectorMask.fromArray(FloatVector.SPECIES_256, mask_arr, 0);
268         Assert.assertEquals(mFloat256.cast(ShortVector.SPECIES_128).toString(), mFloat256.toString());
269     }
270 
271     private static void testFloat256ToByte64(boolean[] mask_arr) {
272         VectorMask<Float> mFloat256 = VectorMask.fromArray(FloatVector.SPECIES_256, mask_arr, 0);
273         Assert.assertEquals(mFloat256.cast(ByteVector.SPECIES_64).toString(), mFloat256.toString());
274     }
275 
276     private static void testFloat256ToLong512(boolean[] mask_arr) {
277         VectorMask<Float> mFloat256 = VectorMask.fromArray(FloatVector.SPECIES_256, mask_arr, 0);
278         Assert.assertEquals(mFloat256.cast(LongVector.SPECIES_512).toString(), mFloat256.toString());
279     }
280 
281     private static void testFloat256ToDouble512(boolean[] mask_arr) {
282         VectorMask<Float> mFloat256 = VectorMask.fromArray(FloatVector.SPECIES_256, mask_arr, 0);
283         Assert.assertEquals(mFloat256.cast(DoubleVector.SPECIES_512).toString(), mFloat256.toString());
284     }
285 
286     private static void testFloat512ToShort256(boolean[] mask_arr) {
287         VectorMask<Float> mFloat512 = VectorMask.fromArray(FloatVector.SPECIES_512, mask_arr, 0);
288         Assert.assertEquals(mFloat512.cast(ShortVector.SPECIES_256).toString(), mFloat512.toString());
289     }
290 
291     private static void testFloat512ToByte128(boolean[] mask_arr) {
292         VectorMask<Float> mFloat512 = VectorMask.fromArray(FloatVector.SPECIES_512, mask_arr, 0);
293         Assert.assertEquals(mFloat512.cast(ByteVector.SPECIES_128).toString(), mFloat512.toString());
294     }
295 
296     // Long
297     private static void testLong128ToInt64(boolean[] mask_arr) {
298         VectorMask<Long> mLong128 = VectorMask.fromArray(LongVector.SPECIES_128, mask_arr, 0);
299         Assert.assertEquals(mLong128.cast(IntVector.SPECIES_64).toString(), mLong128.toString());
300     }
301 
302     private static void testLong128ToFloat64(boolean[] mask_arr) {
303         VectorMask<Long> mLong128 = VectorMask.fromArray(LongVector.SPECIES_128, mask_arr, 0);
304         Assert.assertEquals(mLong128.cast(FloatVector.SPECIES_64).toString(), mLong128.toString());
305     }
306 
307     private static void testLong256ToInt128(boolean[] mask_arr) {
308         VectorMask<Long> mLong256 = VectorMask.fromArray(LongVector.SPECIES_256, mask_arr, 0);
309         Assert.assertEquals(mLong256.cast(IntVector.SPECIES_128).toString(), mLong256.toString());
310     }
311 
312     private static void testLong256ToFloat128(boolean[] mask_arr) {
313         VectorMask<Long> mLong256 = VectorMask.fromArray(LongVector.SPECIES_256, mask_arr, 0);
314         Assert.assertEquals(mLong256.cast(FloatVector.SPECIES_128).toString(), mLong256.toString());
315     }
316 
317     private static void testLong256ToShort64(boolean[] mask_arr) {
318         VectorMask<Long> mLong256 = VectorMask.fromArray(LongVector.SPECIES_256, mask_arr, 0);
319         Assert.assertEquals(mLong256.cast(ShortVector.SPECIES_64).toString(), mLong256.toString());
320     }
321 
322     private static void testLong512ToInt256(boolean[] mask_arr) {
323         VectorMask<Long> mLong512 = VectorMask.fromArray(LongVector.SPECIES_512, mask_arr, 0);
324         Assert.assertEquals(mLong512.cast(IntVector.SPECIES_256).toString(), mLong512.toString());
325     }
326 
327     private static void testLong512ToFloat256(boolean[] mask_arr) {
328         VectorMask<Long> mLong512 = VectorMask.fromArray(LongVector.SPECIES_512, mask_arr, 0);
329         Assert.assertEquals(mLong512.cast(FloatVector.SPECIES_256).toString(), mLong512.toString());
330     }
331 
332     private static void testLong512ToShort128(boolean[] mask_arr) {
333         VectorMask<Long> mLong512 = VectorMask.fromArray(LongVector.SPECIES_512, mask_arr, 0);
334         Assert.assertEquals(mLong512.cast(ShortVector.SPECIES_128).toString(), mLong512.toString());
335     }
336 
337     private static void testLong512ToByte64(boolean[] mask_arr) {
338         VectorMask<Long> mLong512 = VectorMask.fromArray(LongVector.SPECIES_512, mask_arr, 0);
339         Assert.assertEquals(mLong512.cast(ByteVector.SPECIES_64).toString(), mLong512.toString());
340     }
341 
342     // Double
343     private static void testDouble128ToInt64(boolean[] mask_arr) {
344         VectorMask<Double> mDouble128 = VectorMask.fromArray(DoubleVector.SPECIES_128, mask_arr, 0);
345         Assert.assertEquals(mDouble128.cast(IntVector.SPECIES_64).toString(), mDouble128.toString());
346     }
347 
348     private static void testDouble128ToFloat64(boolean[] mask_arr) {
349         VectorMask<Double> mDouble128 = VectorMask.fromArray(DoubleVector.SPECIES_128, mask_arr, 0);
350         Assert.assertEquals(mDouble128.cast(FloatVector.SPECIES_64).toString(), mDouble128.toString());
351     }
352 
353     private static void testDouble256ToInt128(boolean[] mask_arr) {
354         VectorMask<Double> mDouble256 = VectorMask.fromArray(DoubleVector.SPECIES_256, mask_arr, 0);
355         Assert.assertEquals(mDouble256.cast(IntVector.SPECIES_128).toString(), mDouble256.toString());
356     }
357 
358     private static void testDouble256ToFloat128(boolean[] mask_arr) {
359         VectorMask<Double> mDouble256 = VectorMask.fromArray(DoubleVector.SPECIES_256, mask_arr, 0);
360         Assert.assertEquals(mDouble256.cast(FloatVector.SPECIES_128).toString(), mDouble256.toString());
361     }
362 
363     private static void testDouble256ToShort64(boolean[] mask_arr) {
364         VectorMask<Double> mDouble256 = VectorMask.fromArray(DoubleVector.SPECIES_256, mask_arr, 0);
365         Assert.assertEquals(mDouble256.cast(ShortVector.SPECIES_64).toString(), mDouble256.toString());
366     };
367 
368     private static void testDouble512ToInt256(boolean[] mask_arr) {
369         VectorMask<Double> mDouble512 = VectorMask.fromArray(DoubleVector.SPECIES_512, mask_arr, 0);
370         Assert.assertEquals(mDouble512.cast(IntVector.SPECIES_256).toString(), mDouble512.toString());
371     }
372 
373     private static void testDouble512ToFloat256(boolean[] mask_arr) {
374         VectorMask<Double> mDouble512 = VectorMask.fromArray(DoubleVector.SPECIES_512, mask_arr, 0);
375         Assert.assertEquals(mDouble512.cast(FloatVector.SPECIES_256).toString(), mDouble512.toString());
376     }
377 
378     private static void testDouble512ToShort128(boolean[] mask_arr) {
379         VectorMask<Double> mDouble512 = VectorMask.fromArray(DoubleVector.SPECIES_512, mask_arr, 0);
380         Assert.assertEquals(mDouble512.cast(ShortVector.SPECIES_128).toString(), mDouble512.toString());
381     }
382 
383     private static void testDouble512ToByte64(boolean[] mask_arr) {
384         VectorMask<Double> mDouble512 = VectorMask.fromArray(DoubleVector.SPECIES_512, mask_arr, 0);
385         Assert.assertEquals(mDouble512.cast(ByteVector.SPECIES_64).toString(), mDouble512.toString());
386     }
387 
388 
389     @Test
390     public static void testMaskCast() {
391         for (int i = 0; i < NUM_ITER; i++) {
392             boolean[] mask = genMask();
393             // Byte
394             testByte64ToShort128(mask);
395             testByte64ToInt256(mask);
396             testByte64ToFloat256(mask);
397             testByte64ToLong512(mask);
398             testByte64ToDouble512(mask);
399             testByte128ToShort256(mask);
400             testByte128ToInt512(mask);
401             testByte128ToFloat512(mask);
402             testByte256ToShort512(mask);
403 
404             // Short
405             testShort64ToInt128(mask);
406             testShort64ToFloat128(mask);
407             testShort64ToLong256(mask);
408             testShort64ToDouble256(mask);
409             testShort128ToByte64(mask);
410             testShort128ToInt256(mask);
411             testShort128ToFloat256(mask);
412             testShort128ToLong512(mask);
413             testShort128ToDouble512(mask);
414             testShort256ToByte128(mask);
415             testShort256ToInt512(mask);
416             testShort256ToFloat512(mask);
417             testShort512ToByte256(mask);
418 
419             // Int
420             testInt64ToLong128(mask);
421             testInt64ToDouble128(mask);
422             testInt128ToShort64(mask);
423             testInt128ToLong256(mask);
424             testInt128ToDouble256(mask);
425             testInt256ToShort128(mask);
426             testInt256ToByte64(mask);
427             testInt256ToLong512(mask);
428             testInt256ToDouble512(mask);
429             testInt512ToShort256(mask);
430             testInt512ToByte128(mask);
431 
432             // Float
433             testFloat64ToLong128(mask);
434             testFloat64ToDouble128(mask);
435             testFloat128ToShort64(mask);
436             testFloat128ToLong256(mask);
437             testFloat128ToDouble256(mask);
438             testFloat256ToShort128(mask);
439             testFloat256ToByte64(mask);
440             testFloat256ToLong512(mask);
441             testFloat256ToDouble512(mask);
442             testFloat512ToShort256(mask);
443             testFloat512ToByte128(mask);
444 
445             // Long
446             testLong128ToInt64(mask);
447             testLong128ToFloat64(mask);
448             testLong256ToInt128(mask);
449             testLong256ToFloat128(mask);
450             testLong256ToShort64(mask);
451             testLong512ToInt256(mask);
452             testLong512ToFloat256(mask);
453             testLong512ToShort128(mask);
454             testLong512ToByte64(mask);
455 
456             // Double
457             testDouble128ToInt64(mask);
458             testDouble128ToFloat64(mask);
459             testDouble256ToInt128(mask);
460             testDouble256ToFloat128(mask);
461             testDouble256ToShort64(mask);
462             testDouble512ToInt256(mask);
463             testDouble512ToFloat256(mask);
464             testDouble512ToShort128(mask);
465             testDouble512ToByte64(mask);
466         }
467     }
468 }