1 /* { dg-require-effective-target arm_v8_1a_neon_hw } */ 2 /* { dg-add-options arm_v8_1a_neon } */ 3 4 #include <arm_neon.h> 5 #include "arm-neon-ref.h" 6 #include "compute-ref-data.h" 7 8 /* Expected values of cumulative_saturation flag. */ 9 int VECT_VAR (expected_cumulative_sat, int, 16, 4) = 0; 10 int VECT_VAR (expected_cumulative_sat, int, 32, 2) = 0; 11 int VECT_VAR (expected_cumulative_sat, int, 16, 8) = 0; 12 int VECT_VAR (expected_cumulative_sat, int, 32, 4) = 0; 13 14 /* Expected results. */ 15 VECT_VAR_DECL (expected, int, 16, 4) [] = { 0x38d3, 0x38d4, 0x38d5, 0x38d6 }; 16 VECT_VAR_DECL (expected, int, 32, 2) [] = { 0xfffffff0, 0xfffffff1 }; 17 VECT_VAR_DECL (expected, int, 16, 8) [] = { 0x006d, 0x006e, 0x006f, 0x0070, 18 0x0071, 0x0072, 0x0073, 0x0074 }; 19 VECT_VAR_DECL (expected, int, 32, 4) [] = { 0xfffffff0, 0xfffffff1, 20 0xfffffff2, 0xfffffff3 }; 21 22 /* Expected values of cumulative_saturation flag when multiplication 23 saturates. */ 24 int VECT_VAR (expected_cumulative_sat_mul, int, 16, 4) = 0; 25 int VECT_VAR (expected_cumulative_sat_mul, int, 32, 2) = 0; 26 int VECT_VAR (expected_cumulative_sat_mul, int, 16, 8) = 0; 27 int VECT_VAR (expected_cumulative_sat_mul, int, 32, 4) = 0; 28 29 /* Expected results when multiplication saturates. */ 30 VECT_VAR_DECL (expected_mul, int, 16, 4) [] = { 0x0, 0x0, 0x0, 0x0 }; 31 VECT_VAR_DECL (expected_mul, int, 32, 2) [] = { 0x0, 0x0 }; 32 VECT_VAR_DECL (expected_mul, int, 16, 8) [] = { 0x0, 0x0, 0x0, 0x0, 33 0x0, 0x0, 0x0, 0x0 }; 34 VECT_VAR_DECL (expected_mul, int, 32, 4) [] = { 0x0, 0x0, 0x0, 0x0 }; 35 36 /* Expected values of cumulative_saturation flag when rounding 37 should not cause saturation. */ 38 int VECT_VAR (expected_cumulative_sat_round, int, 16, 4) = 0; 39 int VECT_VAR (expected_cumulative_sat_round, int, 32, 2) = 0; 40 int VECT_VAR (expected_cumulative_sat_round, int, 16, 8) = 0; 41 int VECT_VAR (expected_cumulative_sat_round, int, 32, 4) = 0; 42 43 /* Expected results when rounding should not cause saturation. */ 44 VECT_VAR_DECL (expected_round, int, 16, 4) [] = { 0xfffe, 0xfffe, 45 0xfffe, 0xfffe }; 46 VECT_VAR_DECL (expected_round, int, 32, 2) [] = { 0xfffffffe, 0xfffffffe }; 47 VECT_VAR_DECL (expected_round,int, 16, 8) [] = { 0xfffe, 0xfffe, 48 0xfffe, 0xfffe, 49 0xfffe, 0xfffe, 50 0xfffe, 0xfffe }; 51 VECT_VAR_DECL (expected_round, int, 32, 4) [] = { 0xfffffffe, 0xfffffffe, 52 0xfffffffe, 0xfffffffe }; 53 54 #define INSN vqrdmlah 55 #define TEST_MSG "VQRDMLAH_LANE" 56 57 #include "vqrdmlXh_lane.inc" 58