diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-04 14:45:56 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-04 14:45:56 +0000 |
commit | 31b1135939e123d84a548e433892eff6c1818a63 (patch) | |
tree | 79cf44129e61d39274937a65c0b994a817856342 /gcc/testsuite/gcc.target | |
parent | c5b934522b93c0b98bc18c6c35af13fb708fcbee (diff) | |
download | gcc-31b1135939e123d84a548e433892eff6c1818a63.tar.gz |
PR target/70059
* config/i386/sse.md (vec_set_lo_<mode><mask_name>,
<extract_type_2>_vinsert<shuffletype><extract_suf_2>_mask): Formatting
fixes.
(vec_set_hi_<mode><mask_name>): Likewise. Swap VEC_CONCAT operands.
* gcc.target/i386/avx512f-pr70059.c: New test.
* gcc.target/i386/avx512dq-pr70059.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512dq-pr70059.c | 33 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512f-pr70059.c | 33 |
2 files changed, 66 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-pr70059.c b/gcc/testsuite/gcc.target/i386/avx512dq-pr70059.c new file mode 100644 index 00000000000..932ff6a6f6a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512dq-pr70059.c @@ -0,0 +1,33 @@ +/* PR target/70059 */ +/* { dg-do run } */ +/* { dg-require-effective-target avx512dq } */ +/* { dg-options "-O2 -mavx512dq" } */ + +#include "avx512dq-check.h" + +__attribute__((noinline, noclone)) __m512i +foo (__m256i a, __m256i b) +{ + __m512i r = _mm512_undefined_si512 (); + r = _mm512_inserti32x8 (r, a, 0); + r = _mm512_inserti32x8 (r, b, 1); + return r; +} + +static void +avx512dq_test (void) +{ + union256i_q a, b; + union512i_q r; + long long r_ref[8]; + int i; + for (i = 0; i < 4; i++) + { + a.a[i] = 0x0101010101010101ULL * i; + b.a[i] = 0x1010101010101010ULL * i; + r_ref[i] = a.a[i]; + r_ref[i + 4] = b.a[i]; + } + r.x = foo (a.x, b.x); + check_union512i_q (r, r_ref); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr70059.c b/gcc/testsuite/gcc.target/i386/avx512f-pr70059.c new file mode 100644 index 00000000000..95c8915a93b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-pr70059.c @@ -0,0 +1,33 @@ +/* PR target/70059 */ +/* { dg-do run } */ +/* { dg-require-effective-target avx512f } */ +/* { dg-options "-O2 -mavx512f" } */ + +#include "avx512f-check.h" + +__attribute__((noinline, noclone)) __m512i +foo (__m256i a, __m256i b) +{ + __m512i r = _mm512_undefined_si512 (); + r = _mm512_inserti64x4 (r, a, 0); + r = _mm512_inserti64x4 (r, b, 1); + return r; +} + +static void +avx512f_test (void) +{ + union256i_q a, b; + union512i_q r; + long long r_ref[8]; + int i; + for (i = 0; i < 4; i++) + { + a.a[i] = 0x0101010101010101ULL * i; + b.a[i] = 0x1010101010101010ULL * i; + r_ref[i] = a.a[i]; + r_ref[i + 4] = b.a[i]; + } + r.x = foo (a.x, b.x); + check_union512i_q (r, r_ref); +} |