re PR target/80819 (Useless store to the stack in _mm_set_epi64x with SSE4 -mno...
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Nov 2017 08:40:13 +0000 (09:40 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 Nov 2017 08:40:13 +0000 (09:40 +0100)
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

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr80819-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr80819-2.c [new file with mode: 0644]

index 35c9ea7a93b03dbf7fa000c3392a21ed2d7ca186..26c3d24ce96bbc393d2b3a2bbec2b15e5913e3b7 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/80819
+       * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
+       alternative.
+
 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
 
        * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
index 2147baa7049f20152ddfd11d94199edd026217b7..73560d897d7f2eb25314849c2c781813de2073ef 100644 (file)
          (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}
index efee461a10729cf5cd9acdfc8f6cde3cf87c0306..b8bd264dd337c4bd37ecbe4d60acb77942d8fa34 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/80819
+       * gcc.target/i386/pr80819-1.c: New test.
+       * gcc.target/i386/pr80819-2.c: New test.
+
 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
 
        * 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 (file)
index 0000000..f06c362
--- /dev/null
@@ -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 (file)
index 0000000..7571e81
--- /dev/null
@@ -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]*\\(" } } */