| 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 results. */ |
| 9 |
VECT_VAR_DECL (expected, int, 16, 4) [] = { 0x38d3, 0x38d4, 0x38d5, 0x38d6 }; |
| 10 |
VECT_VAR_DECL (expected, int, 32, 2) [] = { 0xfffffff0, 0xfffffff1 }; |
| 11 |
VECT_VAR_DECL (expected, int, 16, 8) [] = { 0xfff0, 0xfff1, 0xfff2, 0xfff3, |
| 12 |
0xfff4, 0xfff5, 0xfff6, 0xfff7 }; |
| 13 |
VECT_VAR_DECL (expected, int, 32, 4) [] = { 0xfffffff0, 0xfffffff1, |
| 14 |
0xfffffff2, 0xfffffff3 }; |
| 15 |
|
| 16 |
/* Expected results when multiplication saturates. */ |
| 17 |
VECT_VAR_DECL (expected_mul, int, 16, 4) [] = { 0x0, 0x0, 0x0, 0x0 }; |
| 18 |
VECT_VAR_DECL (expected_mul, int, 32, 2) [] = { 0x0, 0x0 }; |
| 19 |
VECT_VAR_DECL (expected_mul, int, 16, 8) [] = { 0x0, 0x0, 0x0, 0x0, |
| 20 |
0x0, 0x0, 0x0, 0x0 }; |
| 21 |
VECT_VAR_DECL (expected_mul, int, 32, 4) [] = { 0x0, 0x0, 0x0, 0x0 }; |
| 22 |
|
| 23 |
/* Expected results when rounding should not cause saturation. */ |
| 24 |
VECT_VAR_DECL (expected_round, int, 16, 4) [] = { 0xfffe, 0xfffe, |
| 25 |
0xfffe, 0xfffe }; |
| 26 |
VECT_VAR_DECL (expected_round, int, 32, 2) [] = { 0xfffffffe, 0xfffffffe }; |
| 27 |
VECT_VAR_DECL (expected_round, int, 16, 8) [] = { 0xfffe, 0xfffe, |
| 28 |
0xfffe, 0xfffe, |
| 29 |
0xfffe, 0xfffe, |
| 30 |
0xfffe, 0xfffe }; |
| 31 |
VECT_VAR_DECL (expected_round, int, 32, 4) [] = { 0xfffffffe, 0xfffffffe, |
| 32 |
0xfffffffe, 0xfffffffe }; |
| 33 |
|
| 34 |
#define INSN vqrdmlah |
| 35 |
#define TEST_MSG "VQRDMLAH" |
| 36 |
|
| 37 |
#include "vqrdmlXh.inc" |