aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-04-08 10:59:40 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-04-08 10:59:40 +0000
commit9038ae48b816983065d8705f38b35144fdc4ddd7 (patch)
tree050f49c550a12d144ee94f9f227bf4cbc1e88ef5 /gcc
parentd60484ebda4213fbc0de13930c12ab37504408bf (diff)
downloadgcc-9038ae48b816983065d8705f38b35144fdc4ddd7.zip
gcc-9038ae48b816983065d8705f38b35144fdc4ddd7.tar.gz
gcc-9038ae48b816983065d8705f38b35144fdc4ddd7.tar.bz2
re PR tree-optimization/60785 (ICE in gsi_for_stmt w/ -O2 -ftree-loop-linear)
2014-04-08 Richard Biener <rguenther@suse.de> PR tree-optimization/60785 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Treat default defs properly. * gcc.dg/graphite/pr60785.c: New testcase. From-SVN: r209214
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/graphite-sese-to-poly.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60785.c27
4 files changed, 39 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec85f09..0e0267a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Treat
+ default defs properly.
+
2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
* doc/invoke (Wnon-virtual-dtor): Update to match implementation.
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index d4a1bb2..28447e4 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2250,6 +2250,7 @@ rewrite_phi_out_of_ssa (scop_p scop, gimple_stmt_iterator *psi)
/* Avoid the insertion of code in the loop latch to please the
pattern matching of the vectorizer. */
if (TREE_CODE (arg) == SSA_NAME
+ && !SSA_NAME_IS_DEFAULT_DEF (arg)
&& e->src == bb->loop_father->latch)
insert_out_of_ssa_copy (scop, zero_dim_array, arg,
SSA_NAME_DEF_STMT (arg));
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 526686b8..bfc2722 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * gcc.dg/graphite/pr60785.c: New testcase.
+
2014-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/60602
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60785.c b/gcc/testsuite/gcc.dg/graphite/pr60785.c
new file mode 100644
index 0000000..87c1c68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60785.c
@@ -0,0 +1,27 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+static int
+aqc(void)
+{
+ return 1;
+}
+
+void
+gkd(void)
+{
+ int wu0;
+ static int b1y;
+ static int gw2;
+ static int *ydw = &gw2;
+ static int **m3l = &ydw;
+ **m3l = 0;
+ for (b1y = 0; b1y < 1; ++b1y)
+ {
+ int *cpj = &gw2;
+ if (*ydw |= aqc())
+ {
+ *cpj = 0;
+ *ydw = wu0;
+ }
+ }
+}