aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Belevantsev <abel@ispras.ru>2014-05-14 13:46:26 +0400
committerAndrey Belevantsev <abel@gcc.gnu.org>2014-05-14 13:46:26 +0400
commit112903088c98fc1995fbfbcaa1b86234b535b8b4 (patch)
tree1c7c14e625daeda475179d765fb92d0ef4b9bd21
parent2675305b4f6ed4820b9c41cd7672ec2996799578 (diff)
downloadgcc-112903088c98fc1995fbfbcaa1b86234b535b8b4.zip
gcc-112903088c98fc1995fbfbcaa1b86234b535b8b4.tar.gz
gcc-112903088c98fc1995fbfbcaa1b86234b535b8b4.tar.bz2
re PR rtl-optimization/60901 (ICE: SIGSEGV in add_to_deps_list with -fsel-sched-pipelining-outer-loops)
PR rtl-optimization/60901 * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that bb predecessor belongs to the same scheduling region. Adjust comment. * gcc.target/i386/pr60901.c: New test. From-SVN: r210414
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60901.c17
4 files changed, 36 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ce44dbd..c63b0b9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60901
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
+ bb predecessor belongs to the same scheduling region. Adjust comment.
+
2014-05-13 Peter Bergner <bergner@vnet.ibm.com>
* doc/sourcebuild.texi: (dfp_hw): Document.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 99f0657..0274288 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -26254,13 +26254,17 @@ ix86_dependencies_evaluation_hook (rtx head, rtx tail)
{
edge e;
edge_iterator ei;
- /* Assume that region is SCC, i.e. all immediate predecessors
- of non-head block are in the same region. */
+
+ /* Regions are SCCs with the exception of selective
+ scheduling with pipelining of outer blocks enabled.
+ So also check that immediate predecessors of a non-head
+ block are in the same region. */
FOR_EACH_EDGE (e, ei, bb->preds)
{
/* Avoid creating of loop-carried dependencies through
- using topological odering in region. */
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
+ using topological ordering in the region. */
+ if (rgn == CONTAINING_RGN (e->src->index)
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
add_dependee_for_func_arg (first_arg, e->src);
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2e49912..b9847d3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60901
+ * gcc.target/i386/pr60901.c: New test.
+
2014-05-14 Yury Gribov <y.gribov@samsung.com>
PR sanitizer/61100
diff --git a/gcc/testsuite/gcc.target/i386/pr60901.c b/gcc/testsuite/gcc.target/i386/pr60901.c
new file mode 100644
index 0000000..f0f25a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60901.c
@@ -0,0 +1,17 @@
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
+
+extern int n;
+extern void bar (void);
+extern int baz (int);
+
+void
+foo (void)
+{
+ int i, j;
+ for (j = 0; j < n; j++)
+ {
+ for (i = 1; i < j; i++)
+ bar ();
+ baz (0);
+ }
+}