re PR target/78791 (ACATS cxf2001 failure)
authorJakub Jelinek <jakub@redhat.com>
Wed, 14 Dec 2016 21:39:51 +0000 (22:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 14 Dec 2016 21:39:51 +0000 (22:39 +0100)
PR target/78791
* config/i386/i386.h (enum ix86_stack_slot): Add SLOT_STV_TEMP.
* config/i386/i386.c (dimode_scalar_chain::make_vector_copies,
dimode_scalar_chain::convert_reg): Use SLOT_STV_TEMP instead of
SLOT_TEMP.

* gcc.c-torture/execute/pr78791.c: New test.
* gcc.target/i386/pr78791.c: New test.

From-SVN: r243671

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr78791.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr78791.c [new file with mode: 0644]

index 1fbc8727a52e8ac6ad03a3fe9299e3018bedc6ae..3cc2e5a6550b5e7e5a28653336b9886d3592ff83 100644 (file)
@@ -1,3 +1,11 @@
+2016-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/78791
+       * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_STV_TEMP.
+       * config/i386/i386.c (dimode_scalar_chain::make_vector_copies,
+       dimode_scalar_chain::convert_reg): Use SLOT_STV_TEMP instead of
+       SLOT_TEMP.
+
 2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/59874
index 3d9d485ad19e2b242dba8959350fbd581adf6016..792e8ec232d29366c260efbceab67f65ea31e807 100644 (file)
@@ -3560,7 +3560,7 @@ dimode_scalar_chain::make_vector_copies (unsigned regno)
          }
        else
          {
-           rtx tmp = assign_386_stack_local (DImode, SLOT_TEMP);
+           rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
            emit_move_insn (adjust_address (tmp, SImode, 0),
                            gen_rtx_SUBREG (SImode, reg, 0));
            emit_move_insn (adjust_address (tmp, SImode, 4),
@@ -3637,7 +3637,7 @@ dimode_scalar_chain::convert_reg (unsigned regno)
            }
          else
            {
-             rtx tmp = assign_386_stack_local (DImode, SLOT_TEMP);
+             rtx tmp = assign_386_stack_local (DImode, SLOT_STV_TEMP);
              emit_move_insn (tmp, reg);
              emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 0),
                              adjust_address (tmp, SImode, 0));
index 4d96a4525fb798b18ea47c3caf95cb6aa3873a0a..5f5368da96dc04b8283e39afda76ff9cc8041521 100644 (file)
@@ -2400,6 +2400,7 @@ enum ix86_stack_slot
   SLOT_CW_FLOOR,
   SLOT_CW_CEIL,
   SLOT_CW_MASK_PM,
+  SLOT_STV_TEMP,
   MAX_386_STACK_LOCALS
 };
 
index 5026f07b5dc5116a424a75948f17a9d006d0b205..946ad97188e1963e20ff7f62256056219bd50794 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/78791
+       * gcc.c-torture/execute/pr78791.c: New test.
+       * gcc.target/i386/pr78791.c: New test.
+
 2016-12-14  Marek Polacek  <polacek@redhat.com>
 
        PR c++/72775
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr78791.c b/gcc/testsuite/gcc.c-torture/execute/pr78791.c
new file mode 100644 (file)
index 0000000..987f2f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* PR target/78791 */
+
+__attribute__((used, noinline, noclone)) unsigned long long
+foo (unsigned long long x, unsigned long long y, unsigned long long z)
+{
+  unsigned long long a = x / y;
+  unsigned long long b = x % y;
+  a |= z;
+  b ^= z;
+  return a + b;
+}
+
+int
+main ()
+{
+  if (foo (64, 7, 0) != 10 || foo (28, 3, 2) != 14)
+    __builtin_abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr78791.c b/gcc/testsuite/gcc.target/i386/pr78791.c
new file mode 100644 (file)
index 0000000..297e03f
--- /dev/null
@@ -0,0 +1,5 @@
+/* PR target/78791 */
+/* { dg-do run { target sse2_runtime } } */
+/* { dg-options "-O2 -msse2" } */
+
+#include "../../gcc.c-torture/execute/pr78791.c"