4 public class SimdTests {
7 public static int vector16b_cmpeq () {
8 Vector16b a = new Vector16b (1,0,9,0,0,0,0,0,0,0,0,0,0,0,0,1);
9 Vector16b b = new Vector16b (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
10 Vector16b c = Vector16b.CompareEqual (a, b);
48 public static int vector16b_sum_abs_diff () {
49 Vector16b a = new Vector16b (100,20,20,20,0,0,0,0,0,0,0,0,0,0, 0, 0);
50 Vector16b b = new Vector16b (0, 10,10,10,0,0,0,0,0,0,0,0,0,0,10,10);
51 Vector8us c = Vector16b.SumOfAbsoluteDifferences (a, b);
73 public static int test_0_vector16b_extract_mask () {
74 Vector16b a = new Vector16b (0xF0,0,0xF0,0,0,0,0xF0,0xAA,0x0F,0,0xFF,0,0,0,0,0);
75 int c = Vector16b.ExtractByteMask (a);
82 public static int test_0_vector16b_min () {
83 Vector16b a = new Vector16b (0,12,20,12,4,5,6,7,8,9,10,11,12,13,14,15);
84 Vector16b b = new Vector16b (9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
85 Vector16b c = Vector16b.Min (a, b);
122 public static int test_0_vector16b_max () {
123 Vector16b a = new Vector16b (0,12,20,12,4,5,6,7,8,9,10,11,12,13,14,15);
124 Vector16b b = new Vector16b (9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
125 Vector16b c = Vector16b.Max (a, b);
161 public static int test_0_vector16b_avg () {
162 Vector16b a = new Vector16b (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
163 Vector16b b = new Vector16b (9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
164 Vector16b c = Vector16b.Average (a, b);
202 static unsafe Vector8us bad_method_regression_2 (Vector16b va, Vector16b vb) {
203 Vector8us res = new Vector8us ();
204 byte *a = (byte*)&va;
205 byte *b = (byte*)&vb;
208 for (int i = 0; i < 8; ++i)
209 tmp += System.Math.Abs ((int)*a++ - (int)*b++);
210 res.V0 = (ushort)tmp;
213 for (int i = 0; i < 8; ++i)
214 tmp += System.Math.Abs ((int)*a++ - (int)*b++);
215 res.V4 = (ushort)tmp;
219 /*This bug was caused the simplifier not taking notice of LDADDR on the remaining blocks.*/
220 public static int test_2_local_simplifier_regression_other_blocks () {
221 Vector16b a = new Vector16b (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1);
222 Vector16b b = new Vector16b (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
223 Vector8us res = bad_method_regression_2 (a,b);
224 return (int)res.V0 + res.V4;
227 static unsafe Vector8us bad_method_regression (Vector16b va, Vector16b vb) {
228 Vector8us res = new Vector8us ();
229 byte *a = (byte*)&va;
230 byte *b = (byte*)&vb;
231 *((ushort*)&res) = 10;
242 /*This bug was caused the simplifier not taking notice of LDADDR on the first block.*/
243 public static int test_10_local_simplifier_regression_first_block () {
244 Vector16b a = new Vector16b ();
245 Vector16b b = new Vector16b ();
246 Vector8us res = bad_method_regression (a,b);
251 public static int test_0_vecto8us_extract_mask () {
252 Vector8us a = new Vector8us (0xF0F0, 0x700F, 0xAABB, 0x0000, 0x00F0, 0xF0F0, 0, 0);
253 int c = Vector8us.ExtractByteMask (a);
260 public static int test_0_vecto8us_shuffle_low () {
261 Vector8us a = new Vector8us (1, 2, 3, 4, 5, 6, 7, 8);
262 Vector8us c = Vector8us.ShuffleLow (a, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
283 public static int test_0_vecto8us_shuffle_high () {
284 Vector8us a = new Vector8us (1, 2, 3, 4, 5, 6, 7, 8);
285 Vector8us c = Vector8us.ShuffleHigh (a, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
307 public static int test_0_vecto8us_max () {
308 Vector8us a = new Vector8us (1, 2, 3, 4, 5, 6, 7, 8);
309 Vector8us b = new Vector8us (9, 1, 1, 2, 9, 6, 5, 1000);
310 Vector8us c = Vector8us.Max (a, b);
332 public static int test_0_vecto8us_min () {
333 Vector8us a = new Vector8us (1, 2, 3, 0, 5, 6, 5, 4);
334 Vector8us b = new Vector8us (9, 1, 1, 2, 3, 4, 5, 6);
335 Vector8us c = Vector8us.Min (a, b);
356 public static int test_0_vecto8us_avg () {
357 Vector8us a = new Vector8us (1, 2, 3, 4, 5, 6, 7, 8);
358 Vector8us b = new Vector8us (9, 1, 1, 2, 3, 4, 5, 6);
359 Vector8us c = Vector8us.Average (a, b);
380 static void store_helper (ref Vector4f x) {
382 k = new Vector4f(9,9,9,9);
386 public static int test_0_vector4f_byref_store ()
389 k = new Vector4f(1,2,3,4);
390 store_helper (ref k);
396 public static int test_0_vector4f_init_array_element ()
398 Vector4f[] v = new Vector4f[1];
399 v[0] = new Vector4f(9,9,9,9);
405 public static int test_0_vector4f_dup_high () {
406 Vector4f a = new Vector4f (1, 2, 3, 4);
407 Vector4f c = Vector4f.DuplicateHigh(a);
420 public static int test_0_vector4f_dup_low () {
421 Vector4f a = new Vector4f (1, 2, 3, 4);
422 Vector4f c = Vector4f.DuplicateLow (a);
436 public static int test_0_vector4f_interleave_high () {
437 Vector4f a = new Vector4f (1, 2, 3, 4);
438 Vector4f b = new Vector4f (5, 6, 7, 8);
439 Vector4f c = Vector4f.InterleaveHigh (a, b);
452 public static int test_0_vector4f_interleave_low () {
453 Vector4f a = new Vector4f (1, 2, 3, 4);
454 Vector4f b = new Vector4f (5, 6, 7, 8);
455 Vector4f c = Vector4f.InterleaveLow (a, b);
468 public static int test_0_vector4f_rcp () {
469 Vector4f a = new Vector4f (1, 2, 4, 8);
470 Vector4f c = Vector4f.Reciprocal (a);
472 //Test with ranges due to the terrible precision.
473 if (c.X < (1 - 0.01f) || c.X > (1 + 0.01f))
475 if (c.Y < (0.5 - 0.01f) || c.Y > (0.5 + 0.01f))
477 if (c.Z < (0.25 - 0.01f) || c.Z > (0.25 + 0.01f))
479 if (c.W < (0.125 - 0.01f) || c.W > (0.125 + 0.01f))
484 public static int test_0_vector4f_xor () {
485 Vector4f a = new Vector4f (1, 2, 3, 4);
486 Vector4f b = new Vector4f (1, 3, 3, 8);
489 if (((Vector4ui)c).X != 0)
491 if (((Vector4ui)c).Y != 0x400000)
493 if (((Vector4ui)c).Z != 0)
495 if (((Vector4ui)c).W != 0x1800000)
500 public static int test_0_vector4f_or () {
501 Vector4f a = new Vector4f (1, 2, 3, 4);
502 Vector4f b = new Vector4f (1, 3, 3, 8);
505 if (((Vector4ui)c).X != 0x3F800000)
507 if (((Vector4ui)c).Y != 0x40400000)
509 if (((Vector4ui)c).Z != 0x40400000)
511 if (((Vector4ui)c).W != 0x41800000)
515 public static int test_0_vector4f_andn () {
516 Vector4f a = new Vector4f (1, 2, 3, 4);
517 Vector4f b = new Vector4f (1, 3, 3, 8);
518 Vector4f c = Vector4f.AndNot (a ,b);
520 if (((Vector4ui)c).X != 0)
522 if (((Vector4ui)c).Y != 0x400000)
524 if (((Vector4ui)c).Z != 0)
526 if (((Vector4ui)c).W != 0x1000000)
531 public static int test_0_vector4f_and () {
532 Vector4f a = new Vector4f (1, 2, 3, 4);
533 Vector4f b = new Vector4f (1, 3, 3, 8);
536 if (((Vector4ui)c).X != 0x3F800000)
538 if (((Vector4ui)c).Y != 0x40000000)
540 if (((Vector4ui)c).Z != 0x40400000)
542 if (((Vector4ui)c).W != 0x40000000)
547 public static int test_0_vector4f_cmpord () {
548 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
549 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
550 Vector4f c = Vector4f.CompareOrdered (a, b);
552 if (((Vector4ui)c).X != 0)
554 if (((Vector4ui)c).Y != 0)
556 if (((Vector4ui)c).Z != 0xFFFFFFFF)
558 if (((Vector4ui)c).W != 0xFFFFFFFF)
563 public static int test_0_vector4f_cmpnle () {
564 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
565 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
566 Vector4f c = Vector4f.CompareNotLessEqual (a, b);
568 if (((Vector4ui)c).X != 0xFFFFFFFF)
570 if (((Vector4ui)c).Y != 0xFFFFFFFF)
572 if (((Vector4ui)c).Z != 0)
574 if (((Vector4ui)c).W != 0)
579 public static int test_0_vector4f_cmpnlt () {
580 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
581 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
582 Vector4f c = Vector4f.CompareNotLessThan (a, b);
584 if (((Vector4ui)c).X != 0xFFFFFFFF)
586 if (((Vector4ui)c).Y != 0xFFFFFFFF)
588 if (((Vector4ui)c).Z != 0xFFFFFFFF)
590 if (((Vector4ui)c).W != 0)
595 public static int test_0_vector4f_cmpneq () {
596 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
597 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
598 Vector4f c = Vector4f.CompareNotEqual (a, b);
600 if (((Vector4ui)c).X != 0xFFFFFFFF)
602 if (((Vector4ui)c).Y != 0xFFFFFFFF)
604 if (((Vector4ui)c).Z != 0)
606 if (((Vector4ui)c).W != 0xFFFFFFFF)
611 public static int test_0_vector4f_cmpunord () {
612 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
613 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
614 Vector4f c = Vector4f.CompareUnordered (a, b);
616 if (((Vector4ui)c).X != 0xFFFFFFFF)
618 if (((Vector4ui)c).Y != 0xFFFFFFFF)
620 if (((Vector4ui)c).Z != 0)
622 if (((Vector4ui)c).W != 0)
627 public static int test_0_vector4f_cmple () {
628 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
629 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
630 Vector4f c = Vector4f.CompareLessEqual (a, b);
632 if (((Vector4ui)c).X != 0)
634 if (((Vector4ui)c).Y != 0)
636 if (((Vector4ui)c).Z != 0xFFFFFFFF)
638 if (((Vector4ui)c).W != 0xFFFFFFFF)
643 public static int test_0_vector4f_cmplt () {
644 Vector4f a = new Vector4f (float.NaN, 2, 3, 4);
645 Vector4f b = new Vector4f (1, float.NaN, 3, 6);
646 Vector4f c = Vector4f.CompareLessThan (a, b);
648 if (((Vector4ui)c).X != 0)
650 if (((Vector4ui)c).Y != 0)
652 if (((Vector4ui)c).Z != 0)
654 if (((Vector4ui)c).W != 0xFFFFFFFF)
659 public static int test_0_vector4f_cmpeq () {
660 Vector4f a = new Vector4f (float.NaN, 2, 3, 6);
661 Vector4f b = new Vector4f (1, float.NaN, 3, 4);
662 Vector4f c = Vector4f.CompareEquals (a, b);
664 if (((Vector4ui)c).X != 0)
666 if (((Vector4ui)c).Y != 0)
668 if (((Vector4ui)c).Z != 0xFFFFFFFF)
670 if (((Vector4ui)c).W != 0)
675 public static int test_0_vector4ui_sar () {
676 Vector4ui a = new Vector4ui (0xF0000000u,20,3,40);
678 Vector4ui c = Vector4ui.ShiftRightArithmetic (a, 2);
680 if (c.X != 0xFC000000)
691 public static int test_0_vector4ui_unpack_high () {
692 Vector4ui a = new Vector4ui (1,2,3,4);
693 Vector4ui b = new Vector4ui (5,6,7,8);
695 Vector4ui c = Vector4ui.UnpackHigh(a, b);
708 public static int test_0_vector4ui_unpack_low () {
709 Vector4ui a = new Vector4ui (1,2,3,4);
710 Vector4ui b = new Vector4ui (5,6,7,8);
712 Vector4ui c = Vector4ui.UnpackLow (a, b);
725 public static int test_0_vector4ui_xor () {
726 Vector4ui a = new Vector4ui (1,2,3,4);
727 Vector4ui b = new Vector4ui (7,5,3,1);
742 public static int test_0_vector4ui_or () {
743 Vector4ui a = new Vector4ui (1,2,3,4);
744 Vector4ui b = new Vector4ui (7,5,3,1);
758 public static int test_0_vector4ui_and () {
759 Vector4ui a = new Vector4ui (1,2,3,4);
760 Vector4ui b = new Vector4ui (7,5,3,1);
775 public static int test_0_vector4ui_shr () {
776 Vector4ui a = new Vector4ui (0xF0000000u,20,3,40);
778 Vector4ui c = a >> 2;
780 if (c.X != 0x3C000000)
791 public static int test_0_vector4ui_shl () {
792 Vector4ui a = new Vector4ui (10,20,3,40);
794 Vector4ui c = a << 2;
807 public static int test_0_vector4ui_mul () {
808 Vector4ui a = new Vector4ui (0x8888,20,3,40);
809 Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
813 if (c.X != 0xffff7800)
823 public static int test_0_vector4ui_sub () {
824 Vector4ui a = new Vector4ui (1,20,3,40);
825 Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
840 public static int test_0_vector4ui_add () {
841 Vector4ui a = new Vector4ui (0xFF00FF00u,2,3,4);
842 Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
846 if (c.X != 0xfe01fe00)
858 static int test_0_vector4ui_accessors () {
859 Vector4ui a = new Vector4ui (1,2,3,4);
885 static int test_0_vector8us_sub_sat () {
886 Vector8us a = new Vector8us (0xF000,1,20,3,4,5,6,7);
887 Vector8us b = new Vector8us (0xFF00,4,5,6,7,8,9,10);
888 Vector8us c = Vector8us.SubWithSaturation (a, b);
909 static int test_0_vector8us_add_sat () {
910 Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
911 Vector8us b = new Vector8us (0xFF00,4,5,6,7,8,9,10);
912 Vector8us c = Vector8us.AddWithSaturation (a, b);
933 static int test_0_vector8us_unpack_low () {
934 Vector8us a = new Vector8us (0,1,2,3,4,5,6,7);
935 Vector8us b = new Vector8us (3,4,5,6,7,8,9,10);
936 Vector8us c = Vector8us.UnpackLow (a, b);
958 static int test_0_vector8us_shift_left () {
959 Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
961 Vector8us c = a << amt;
972 static int test_0_vector8us_shift_right_arithmetic () {
973 Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
975 Vector8us c = Vector8us.ShiftRightArithmetic (a, amt);
986 static int test_0_vector8us_shift_variable_offset () {
988 Vector8us a = new Vector8us (0xF000,1,2,3,4,5,6,7);
990 Vector8us c = b >> off;
1007 static int test_0_vector8us_shift_operand_is_live_after_op () {
1008 Vector8us a = new Vector8us (0xF000,1,2,3,4,5,6,7);
1010 Vector8us c = b >> 2;
1026 static int test_0_vector8us_shr_constant () {
1027 Vector8us a = new Vector8us (0xF000,1,2,3,4,5,6,7);
1028 Vector8us c = a >> 2;
1039 static int test_0_vector8us_mul () {
1040 Vector8us a = new Vector8us (0x0F00,4,5,6,7,8,9,10);
1041 Vector8us b = new Vector8us (0x0888,1,2,3,4,5,6,8);
1043 Vector8us c = a * b;
1053 static int test_0_vector8us_add () {
1054 Vector8us a = new Vector8us (0xFF00,4,5,6,7,8,9,10);
1055 Vector8us b = new Vector8us (0x8888,1,2,3,4,5,6,8);
1057 Vector8us c = a + b;
1068 static int test_0_vector8us_sub () {
1069 Vector8us a = new Vector8us (3,4,5,6,7,8,9,10);
1070 Vector8us b = new Vector8us (10,1,2,3,4,5,6,8);
1072 Vector8us c = a - b;
1084 static int test_0_vector8us_accessors () {
1085 Vector8us a = new Vector8us (0,1,2,3,4,5,6,7);
1133 static int test_0_vector16b_unpack_high () {
1134 Vector16b a = new Vector16b (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1135 Vector16b b = new Vector16b (9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
1136 Vector16b c = Vector16b.UnpackHigh (a, b);
1157 static int test_0_vector16b_unpack_low () {
1158 Vector16b a = new Vector16b (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1159 Vector16b b = new Vector16b (9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
1160 Vector16b c = Vector16b.UnpackLow (a, b);
1181 static int test_0_vector16b_sar () {
1182 Vector16b a = new Vector16b (0xF0,20,3,40,0,0,0,0,0,0,0,0,0,0,0,0);
1184 Vector16b c = Vector16b.ShiftRightArithmetic (a, 2);
1196 static int test_0_vector16b_sub_sat () {
1197 Vector16b a = new Vector16b (100,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
1198 Vector16b b = new Vector16b (200,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1199 Vector16b c = Vector16b.SubWithSaturation (a, b);
1210 static int test_0_vector16b_add_sat () {
1211 Vector16b a = new Vector16b (200,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1212 Vector16b b = new Vector16b (200,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
1213 Vector16b c = Vector16b.AddWithSaturation (a, b);
1224 static int test_0_vector16b_add_ovf () {
1225 Vector16b a = new Vector16b (200,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1226 Vector16b b = new Vector16b (200,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8);
1227 Vector16b c = a + b;
1238 static int test_0_vector16b_accessors () {
1239 Vector16b a = new Vector16b (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
1326 public static int test_0_accessors () {
1327 Vector4f a = new Vector4f (1, 2, 3, 4);
1339 public static int test_0_packed_add_with_stack_tmp () {
1340 Vector4f a = new Vector4f (1, 2, 3, 4);
1341 Vector4f b = new Vector4f (5, 6, 7, 8);
1342 Vector4f c = new Vector4f (-1, -3, -4, -5);
1343 Vector4f d = a + b + c;
1355 public static int test_0_simple_packed_add () {
1356 Vector4f a = new Vector4f (1, 2, 3, 4);
1357 Vector4f b = new Vector4f (5, 6, 7, 8);
1371 public static int test_0_simple_packed_sub () {
1372 Vector4f a = new Vector4f (1, 2, 3, 4);
1373 Vector4f b = new Vector4f (5, 6, 7, 8);
1386 public static int test_0_simple_packed_mul () {
1387 Vector4f a = new Vector4f (1, 2, 3, 4);
1388 Vector4f b = new Vector4f (5, 6, 7, 8);
1401 public static int test_0_simple_packed_div () {
1402 Vector4f a = new Vector4f (2, 2, 3, 4);
1403 Vector4f b = new Vector4f (20, 10, 33, 12);
1416 public static int test_0_simple_packed_sqrt () {
1417 Vector4f a = new Vector4f (16, 4, 9, 25);
1418 a = Vector4f.Sqrt (a);
1430 public static int test_0_simple_packed_invsqrt () {
1431 Vector4f a = new Vector4f (16, 4, 100, 25);
1432 //this function has VERY low precision
1433 a = Vector4f.InvSqrt (a);
1434 if (a.X < (1/4f - 0.01f) || a.X > (1/4f + 0.01f))
1436 if (a.Y < (1/2f - 0.01f) || a.Y > (1/2f + 0.01f))
1438 if (a.Z < (1/10f - 0.01f) || a.Z > (1/10f + 0.01f))
1440 if (a.W < (1/5f - 0.01f) || a.W > (1/5f + 0.01f))
1445 public static int test_0_simple_packed_min () {
1446 Vector4f a = new Vector4f (16, -4, 9, 25);
1447 Vector4f b = new Vector4f (5, 3, 9, 0);
1448 Vector4f c = Vector4f.Min (a, b);
1460 public static int test_0_simple_packed_max () {
1461 Vector4f a = new Vector4f (16, -4, 9, 25);
1462 Vector4f b = new Vector4f (5, 3, 9, 0);
1463 Vector4f c = Vector4f.Max (a, b);
1475 public static int test_0_simple_packed_hadd () {
1476 Vector4f a = new Vector4f (5, 5, 6, 6);
1477 Vector4f b = new Vector4f (7, 7, 8, 8);
1478 Vector4f c = Vector4f.HorizontalAdd (a, b);
1490 public static int test_0_simple_packed_hsub () {
1491 Vector4f a = new Vector4f (5, 2, 6, 1);
1492 Vector4f b = new Vector4f (7, 0, 8, 3);
1493 Vector4f c = Vector4f.HorizontalSub (a, b);
1505 public static int test_0_simple_packed_addsub () {
1506 Vector4f a = new Vector4f (5, 2, 6, 1);
1507 Vector4f b = new Vector4f (7, 0, 8, 3);
1508 Vector4f c = Vector4f.AddSub (a, b);
1520 public static int test_0_simple_packed_shuffle () {
1521 Vector4f a = new Vector4f (1, 2, 3, 4);
1522 a = Vector4f.Shuffle(a, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1534 public static int test_0_packed_shuffle_with_reg_pressure () {
1535 Vector4f v = new Vector4f (1, 2, 3, 4);
1536 Vector4f m0 = v + v, m1 = v - v, m2 = v * v, m3 = v + v + v;
1537 if (ff) v = v + v -v ;
1539 Vector4f r0 = Vector4f.Shuffle (v, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1540 Vector4f r1 = Vector4f.Shuffle (v, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1541 Vector4f x = Vector4f.Shuffle (v, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1542 Vector4f r2 = Vector4f.Shuffle (v, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1543 Vector4f r3 = Vector4f.Shuffle (v, ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);
1551 Vector4f result = r0 + r1 + r2 + r3;
1561 if (result.Y != result.Y)
1566 public static int test_24_regs_pressure_a () {
1567 Vector4f a = new Vector4f (1, 2, 3, 4);
1575 public static int test_54_regs_pressure_b () {
1576 Vector4f a = new Vector4f (1, 2, 3, 4);
1580 Vector4f e = a + b + c;
1581 Vector4f f = d - b + a - c;
1582 Vector4f g = a - d * f - c + b;
1583 Vector4f h = a * b - c + e;
1584 Vector4f i = h - g - f - e - d - c - b - a;
1585 Vector4f j = a + b + c + d + e + f + g + h + i;
1590 public static int test_3_single_block_var_is_properly_promoted () {
1591 Vector4f a = new Vector4f (4, 5, 6, 7);
1595 Vector4f b = new Vector4f (1, 2, 3, 4);
1606 static float float_val = 45f;
1608 public static int test_0_sse2_opt_and_simd_intrinsic_proper_regalloc () {
1609 Vector4f v = new Vector4f (1, 2, 3, 4);
1610 float f = float_val;
1619 public static int Main () {
1620 return TestDriver.RunTests (typeof (SimdTests));