Patchwork [64/65] Fix gamess: the only constant phi nodes with one argument are is_gimple_min_invariant and SSA_NAME_IS_DEFAULT_DEF.

login
register
mail settings
Submitter Sebastian Pop
Date Aug. 2, 2010, 8:20 p.m.
Message ID <1280780438-17543-65-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60663/
State New
Headers show

Comments

Sebastian Pop - Aug. 2, 2010, 8:20 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
	constant phi nodes with one argument are is_gimple_min_invariant
	and SSA_NAME_IS_DEFAULT_DEF.

	* gfortran.dg/graphite/id-22.f: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@162662 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                              |    6 ++++++
 gcc/ChangeLog.graphite                     |    8 ++++++++
 gcc/graphite-sese-to-poly.c                |    5 ++---
 gcc/testsuite/ChangeLog                    |    4 ++++
 gcc/testsuite/gfortran.dg/graphite/id-22.f |   10 ++++++++++
 5 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/graphite/id-22.f

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bdc5f26..3e01871 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@ 
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
+	constant phi nodes with one argument are is_gimple_min_invariant
+	and SSA_NAME_IS_DEFAULT_DEF.
+
 2010-08-02  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
 	* graphite-cloog-util.c (oppose_constraint):
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index fe58ec0..1d3e64d 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,11 @@ 
+2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
+	constant phi nodes with one argument are is_gimple_min_invariant
+	and SSA_NAME_IS_DEFAULT_DEF.
+
+	* gfortran.dg/graphite/id-22.f: New.
+
 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
 	* graphite.c (graphite_initialize): Do not initialize
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 44c6588..38e408c 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2240,10 +2240,9 @@  rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi, sese region)
   gcc_assert (gimple_phi_num_args (phi) == 1);
 
   /* The phi node can be a non close phi node, when its argument is
-     invariant, or when it is defined in the same loop as the phi node.  */
+     invariant, or a default definition.  */
   if (is_gimple_min_invariant (arg)
-      || SSA_NAME_IS_DEFAULT_DEF (arg)
-      || gimple_bb (SSA_NAME_DEF_STMT (arg))->loop_father == bb->loop_father)
+      || SSA_NAME_IS_DEFAULT_DEF (arg))
     {
       propagate_expr_outside_region (res, arg, region);
       gsi_next (psi);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c5d01bf..a388e00 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@ 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* gfortran.dg/graphite/id-22.f: New.
+
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* gcc.dg/graphite/id-26.c: New.
 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-22.f b/gcc/testsuite/gfortran.dg/graphite/id-22.f
new file mode 100644
index 0000000..4b943f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/id-22.f
@@ -0,0 +1,10 @@ 
+! { dg-options "-O3 -ffast-math" }
+
+      COMMON /NONEQ / UNZOR
+      DO ITS = 1, NTS
+        DO JATOM = 1, NAT
+          IF(IEF.EQ.5.OR.IEF.EQ.8)
+     *       UNZOR = UNZOR + 8
+        ENDDO
+      ENDDO
+      END