aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-05-12 19:44:23 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-05-12 19:44:23 +0200
commitc2b5fc8de6a06b34a60f90bb37c46e27dc67d347 (patch)
treef50e6dc79484fad7c3b75ea106712b82ba60cda9 /gcc
parent13157033d4fc1d109b1dc7c063bfa46638144df5 (diff)
downloadgcc-c2b5fc8de6a06b34a60f90bb37c46e27dc67d347.zip
gcc-c2b5fc8de6a06b34a60f90bb37c46e27dc67d347.tar.gz
gcc-c2b5fc8de6a06b34a60f90bb37c46e27dc67d347.tar.bz2
re PR tree-optimization/48975 (ICE in execute_cse_reciprocals() with -fno-tree-slp-vectorize)
PR tree-optimization/48975 * tree-if-conv.c (combine_blocks): Call free_bb_predicate on all bbs here and free and clear ifc_bbs at the end. * gcc.dg/pr48975.c: New test. From-SVN: r173709
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr48975.c18
-rw-r--r--gcc/tree-if-conv.c6
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bb84bfd..4bb144e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48975
+ * tree-if-conv.c (combine_blocks): Call free_bb_predicate
+ on all bbs here and free and clear ifc_bbs at the end.
+
2011-05-12 Richard Guenther <rguenther@suse.de>
* gimple.c (gtc_visit): Compare TREE_ADDRESSABLE, handle
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d7cb0bd..9c3552a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48975
+ * gcc.dg/pr48975.c: New test.
+
2011-05-12 Tobias Burnus <burnus@net-b.de>
PR fortran/48972
diff --git a/gcc/testsuite/gcc.dg/pr48975.c b/gcc/testsuite/gcc.dg/pr48975.c
new file mode 100644
index 0000000..58658d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48975.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/48975 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fno-tree-slp-vectorize" } */
+
+static int
+foo (int x)
+{
+ return (x > 0) ? 0 : x + 1;
+}
+
+void
+bar (unsigned int x)
+{
+ int l = 1;
+lab:
+ while (x)
+ x = foo (x);
+}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 450ddb2..bf1c8cd 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1,5 +1,5 @@
/* If-conversion for vectorizer.
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Devang Patel <dpatel@apple.com>
@@ -1637,6 +1637,7 @@ combine_blocks (struct loop *loop)
for (i = 0; i < orig_loop_num_nodes; i++)
{
bb = ifc_bbs[i];
+ free_bb_predicate (bb);
if (bb_with_exit_edge_p (loop, bb))
{
exit_bb = bb;
@@ -1712,6 +1713,9 @@ combine_blocks (struct loop *loop)
&& exit_bb != loop->header
&& can_merge_blocks_p (loop->header, exit_bb))
merge_blocks (loop->header, exit_bb);
+
+ free (ifc_bbs);
+ ifc_bbs = NULL;
}
/* If-convert LOOP when it is legal. For the moment this pass has no