re PR target/83986 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 Jan 2018 20:03:04 +0000 (21:03 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Jan 2018 20:03:04 +0000 (21:03 +0100)
PR rtl-optimization/83986
* sched-deps.c (sched_analyze_insn): For frame related insns, add anti
dependence against last_pending_memory_flush in addition to
pending_jump_insns.

* gcc.dg/pr83986.c: New test.

From-SVN: r257203

gcc/ChangeLog
gcc/sched-deps.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr83986.c [new file with mode: 0644]

index c9068360d01a2ba4459f3ed9181aab594b2c530b..e4c68ffd9f70acae459d1e5f68bdffee05dac28b 100644 (file)
@@ -1,3 +1,10 @@
+2018-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/83986
+       * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
+       dependence against last_pending_memory_flush in addition to
+       pending_jump_insns.
+
 2018-01-30  Alexandre Oliva <aoliva@redhat.com>
 
        PR tree-optimization/81611
index 2d0199d5837740bcc4ac84c65e973cd0972accf3..9a5cbebea4064f6af033cff430eada9710856485 100644 (file)
@@ -2922,6 +2922,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn)
        = alloc_INSN_LIST (insn, deps->sched_before_next_jump);
 
       /* Make sure epilogue insn is scheduled after preceding jumps.  */
+      add_dependence_list (insn, deps->last_pending_memory_flush, 1,
+                          REG_DEP_ANTI, true);
       add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI,
                           true);
     }
index 0eac07330431d7b10871c0b0fca313307400bd34..8a8b71664e3391fba908502f75b82224ce9eb4a9 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/83986
+       * gcc.dg/pr83986.c: New test.
+
 2018-01-30  Bill Seurer  <seurer@linux.vnet.ibm.com>
 
        PR 58684
diff --git a/gcc/testsuite/gcc.dg/pr83986.c b/gcc/testsuite/gcc.dg/pr83986.c
new file mode 100644 (file)
index 0000000..31a53d9
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/83986 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2 -fsched2-use-superblocks -funwind-tables --param max-pending-list-length=1" } */
+
+int v;
+
+int
+foo (int x)
+{
+  v &= !!v && !!x;
+  if (v != 0)
+    foo (0);
+  return 0;
+}