Fix typo in copy_cond_phi_args
authorTom de Vries <tom@codesourcery.com>
Tue, 12 Apr 2016 10:08:48 +0000 (10:08 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 12 Apr 2016 10:08:48 +0000 (10:08 +0000)
2016-04-12  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/68756
* graphite-isl-ast-to-gimple.c (copy_cond_phi_args): Use new_expr
instead of new_name.

* gcc.dg/graphite/pr68756.c: New test.

From-SVN: r234896

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/pr68756.c [new file with mode: 0644]

index 62c837239b699a4f4431b15c0cd9491682a35d3b..52354c9cb717c5ee7fd9a488f387706a8fe62773 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-12  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/68756
+       * graphite-isl-ast-to-gimple.c (copy_cond_phi_args): Use new_expr
+       instead of new_name.
+
 2016-04-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/70602
index 8dd5dc8bb84362d6fd35c20193b7c5a10ca691c8..88609c08de95736bfa0e47b4847d22165023661c 100644 (file)
@@ -2439,7 +2439,7 @@ copy_cond_phi_args (gphi *phi, gphi *new_phi, vec<tree> iv_map, bool postpone)
                  fprintf (dump_file, "\n");
                }
              gsi_insert_earliest (stmts);
-             new_phi_args [i] = new_name;
+             new_phi_args[i] = new_expr;
              continue;
            }
 
index 7aaee6ed008669d4c1459f2ca92a848c1dca5cb7..93ca0436ab34683d74406a7caa54d4dcb602c641 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-12  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/68756
+       * gcc.dg/graphite/pr68756.c: New test.
+
 2016-04-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/70602
diff --git a/gcc/testsuite/gcc.dg/graphite/pr68756.c b/gcc/testsuite/gcc.dg/graphite/pr68756.c
new file mode 100644 (file)
index 0000000..ddb9789
--- /dev/null
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -floop-nest-optimize" } */
+
+unsigned int z4, pz;
+int nn[2];
+
+static unsigned int
+xq (unsigned int dj)
+{
+  return dj > 1 ? z4 : z4 + dj;
+}
+
+void
+la (void)
+{
+  int hd, dl;
+  unsigned int hn = 0;
+
+  for (hd = 0; hd < 2; ++hd)
+    {
+      for (dl = 0; dl < 2; ++dl)
+       nn[dl] = 0;
+      --hn;
+      pz = xq (hn);
+    }
+}