diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-05 13:29:54 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-05 13:29:54 +0000 |
commit | ecb23e009476b169e5672c382d3d503a49652e69 (patch) | |
tree | 39fa2a0a3918d2d3acc3b9fa85dea4f6b87b5f82 | |
parent | 871164c49702d88e6364a827c66e87190e45a992 (diff) | |
download | gcc-ecb23e009476b169e5672c382d3d503a49652e69.tar.gz |
* config/i386/sse.md (<avx512>_fmadd_<mode>_mask3<round_name>): Use
v constraint instead of x.
* gcc.target/i386/avx512f-vfmadd-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235921 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512f-vfmadd-1.c | 27 |
4 files changed, 36 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba7f398b889..f807a322b1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-05 Jakub Jelinek <jakub@redhat.com> + + * config/i386/sse.md (<avx512>_fmadd_<mode>_mask3<round_name>): Use + v constraint instead of x. + 2016-05-05 Alan Modra <amodra@gmail.com> PR target/68662 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 5fd821bebb3..53de92c2f00 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -3327,10 +3327,10 @@ (set_attr "mode" "<MODE>")]) (define_insn "<avx512>_fmadd_<mode>_mask3<round_name>" - [(set (match_operand:VF_AVX512VL 0 "register_operand" "=x") + [(set (match_operand:VF_AVX512VL 0 "register_operand" "=v") (vec_merge:VF_AVX512VL (fma:VF_AVX512VL - (match_operand:VF_AVX512VL 1 "register_operand" "x") + (match_operand:VF_AVX512VL 1 "register_operand" "v") (match_operand:VF_AVX512VL 2 "nonimmediate_operand" "<round_constraint>") (match_operand:VF_AVX512VL 3 "register_operand" "0")) (match_dup 3) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7eefd9445a3..9800885e581 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2016-05-05 Jakub Jelinek <jakub@redhat.com> + * gcc.target/i386/avx512f-vfmadd-1.c: New test. + * c-c++-common/Wdangling-else-4.c: New test. 2016-05-04 Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmadd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmadd-1.c new file mode 100644 index 00000000000..f317ec66a3a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmadd-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2 -mavx512f" } */ + +#include <x86intrin.h> + +void +f1 (__m512d x, __m512d y, __m512d z, __mmask8 m) +{ + register __m512d a __asm ("xmm16"), b __asm ("xmm17"), c __asm ("xmm18"); + a = x; b = y; c = z; + asm volatile ("" : "+v" (a), "+v" (b), "+v" (c)); + a = _mm512_mask3_fmadd_round_pd (c, b, a, m, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); + asm volatile ("" : "+v" (a)); +} + +void +f2 (__m512 x, __m512 y, __m512 z, __mmask8 m) +{ + register __m512 a __asm ("xmm16"), b __asm ("xmm17"), c __asm ("xmm18"); + a = x; b = y; c = z; + asm volatile ("" : "+v" (a), "+v" (b), "+v" (c)); + a = _mm512_mask3_fmadd_round_ps (c, b, a, m, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); + asm volatile ("" : "+v" (a)); +} + +/* { dg-final { scan-assembler "vfmadd231pd\[^\n\r\]*zmm16" } } */ +/* { dg-final { scan-assembler "vfmadd231ps\[^\n\r\]*zmm16" } } */ |