From: Jakub Jelinek Date: Wed, 29 Nov 2017 08:40:13 +0000 (+0100) Subject: re PR target/80819 (Useless store to the stack in _mm_set_epi64x with SSE4 -mno... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c42d640b2087d86da862a6c38a2687dfa4e3efc;p=gcc.git re PR target/80819 (Useless store to the stack in _mm_set_epi64x with SSE4 -mno-avx) PR target/80819 * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm) alternative. * gcc.target/i386/pr80819-1.c: New test. * gcc.target/i386/pr80819-2.c: New test. From-SVN: r255226 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 35c9ea7a93b..26c3d24ce96 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-11-29 Jakub Jelinek + + PR target/80819 + * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm) + alternative. + 2017-11-28 David Malcolm * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 2147baa7049..73560d897d7 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -13919,7 +13919,7 @@ (match_operand:DI 1 "nonimmediate_operand" " 0, 0,x ,Yv,r ,vm,?!*Yn,0,Yv,0,0,v") (match_operand:DI 2 "vector_move_operand" - "*rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))] + " rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))] "TARGET_SSE" "@ pinsrq\t{$1, %2, %0|%0, %2, 1} diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index efee461a107..b8bd264dd33 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-11-29 Jakub Jelinek + + PR target/80819 + * gcc.target/i386/pr80819-1.c: New test. + * gcc.target/i386/pr80819-2.c: New test. + 2017-11-28 David Malcolm * gcc.dg/plugin/diagnostic-test-show-locus-bw.c diff --git a/gcc/testsuite/gcc.target/i386/pr80819-1.c b/gcc/testsuite/gcc.target/i386/pr80819-1.c new file mode 100644 index 00000000000..f06c3628e02 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr80819-1.c @@ -0,0 +1,13 @@ +/* PR target/80819 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2 -msse4 -mno-avx -mtune=haswell -masm=att" } */ + +typedef unsigned long long V __attribute__((vector_size (16))); + +V +foo (unsigned long long x, unsigned long long y) +{ + return (V) { x, y }; +} + +/* { dg-final { scan-assembler-not "movq\[ \t]*%rsi, \[-0-9]*\\(" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr80819-2.c b/gcc/testsuite/gcc.target/i386/pr80819-2.c new file mode 100644 index 00000000000..7571e8160cb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr80819-2.c @@ -0,0 +1,13 @@ +/* PR target/80819 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2 -msse4 -mno-avx -mtune=generic -masm=att" } */ + +typedef unsigned long long V __attribute__((vector_size (16))); + +V +foo (unsigned long long x, unsigned long long y) +{ + return (V) { x, y }; +} + +/* { dg-final { scan-assembler-not "movq\[ \t]*%rsi, \[-0-9]*\\(" } } */