aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2018-01-09 23:15:40 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2018-01-09 15:15:40 -0800
commit8080b14f01acf7d3cd3d126ef6a09ccf8a97a6f1 (patch)
tree2bedf1e9852adead97e7634c2681332aa29664f6
parent8273aa77d4e122fd036b1555b1a6f2496887e481 (diff)
downloadgcc-8080b14f01acf7d3cd3d126ef6a09ccf8a97a6f1.zip
gcc-8080b14f01acf7d3cd3d126ef6a09ccf8a97a6f1.tar.gz
gcc-8080b14f01acf7d3cd3d126ef6a09ccf8a97a6f1.tar.bz2
i386: Add a test for PR target/78585
PR target/78585 has been fixed for GCC 7 by commit 7ed04d053eead43d87dff40fb4e2904219afc4d5 Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed Nov 30 13:02:07 2016 +0000 * config/i386/i386.c (dimode_scalar_chain::convert_op): Avoid sharing the SUBREG rtx between move and following insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243018 138bc75d-0d04-0410-961f-82ee72b054a4 PR target/78585: * gcc.target/i386/pr78585.c: New test. From-SVN: r256402
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr78585.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7d14817..5009b92 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/78585:
+ * gcc.target/i386/pr78585.c: New test.
+
2018-01-09 Jakub Jelinek <jakub@redhat.com>
PR c++/83734
diff --git a/gcc/testsuite/gcc.target/i386/pr78585.c b/gcc/testsuite/gcc.target/i386/pr78585.c
new file mode 100644
index 0000000..f6aae1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr78585.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-Os -fno-ipa-cp -fschedule-insns -mavx" } */
+
+#include "avx-check.h"
+
+typedef unsigned int u32;
+typedef unsigned long long u64;
+
+u32 x0, x1, x2, x3, x4;
+u64 x5, x6;
+
+static u64 __attribute__ ((noinline, noclone))
+foo (u64 x7)
+{
+ x6 = x2;
+ x6 *= 5;
+ x6--;
+ return x0 + x5 + x1 + x7 + 1 + x3 + x4;
+}
+
+static void
+__attribute__ ((noinline))
+avx_test ()
+{
+ u64 x = foo (0);
+ __builtin_printf ("%016llx", (unsigned long long) (x >> 0));
+ __builtin_printf ("\n");
+}