re PR target/85860 (ICE: in lra_split_hard_reg_for, at lra-assigns.c:1810: unable...
authorVladimir Makarov <vmakarov@redhat.com>
Wed, 13 Mar 2019 20:35:18 +0000 (20:35 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Wed, 13 Mar 2019 20:35:18 +0000 (20:35 +0000)
2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>

PR target/85860
* lra-constraints.c (inherit_in_ebb): Update
potential_reload_hard_regs along with live_hard_regs.

2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>

PR target/85860
* gcc.target/i386/pr85860.c: New.

From-SVN: r269662

gcc/ChangeLog
gcc/lra-constraints.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr85860.c [new file with mode: 0644]

index 7c5bda1d2885eaa6e5869217a86b6c5de7706c0e..baed65f898b42c20d28828d0ff380005885c1988 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/85860
+       * lra-constraints.c (inherit_in_ebb): Update
+       potential_reload_hard_regs along with live_hard_regs.
+
 2019-03-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/89498
index afbd5d004ba1970c437f087b24db72196e0fc8cc..d7d69c6ba50c4f738e0196e3adafeb094e649543 100644 (file)
@@ -6365,6 +6365,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
                        add_to_hard_reg_set (&s, PSEUDO_REGNO_MODE (dst_regno),
                                             reg_renumber[dst_regno]);
                      AND_COMPL_HARD_REG_SET (live_hard_regs, s);
+                     AND_COMPL_HARD_REG_SET (potential_reload_hard_regs, s);
                    }
                  /* We should invalidate potential inheritance or
                     splitting for the current insn usages to the next
index 5f72cc2304ba2c244e91bbd879c04b06f8fdca88..f4d25f1e567513356217d61e232f8c6954411762 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-13  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/85860
+       * gcc.target/i386/pr85860.c: New.
+
 2019-03-13  Marek Polacek  <polacek@redhat.com>
 
        PR c++/89686 - mixing init-capture and simple-capture in lambda.
diff --git a/gcc/testsuite/gcc.target/i386/pr85860.c b/gcc/testsuite/gcc.target/i386/pr85860.c
new file mode 100644 (file)
index 0000000..aef78a4
--- /dev/null
@@ -0,0 +1,23 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2" } */
+
+int a, b, c, d, e;
+
+extern int bar(void);
+
+__int128
+foo (unsigned g, int h, long i, __int128 j, short k, __int128 l)
+{
+  unsigned __int128 m = j;
+  do
+    {
+      j %= 5;
+      c = c >> (m & 31);
+      e = __builtin_sub_overflow (b, 0, &m);
+      d = bar ();
+      l *= __builtin_mul_overflow_p ((unsigned) d, ~(unsigned __int128) 1,
+                                    (unsigned __int128) 0);
+    }
+  while (a);
+  return m + j + k + l;
+}