diff mbox

Fix PR62070

Message ID alpine.LSU.2.11.1408111248310.20733@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 11, 2014, 10:49 a.m. UTC
The following finally removes the SSA checking code from the
gimple_duplicate_loop_to_header_edge CFG hook.  We've tamed
it down previously and now there is predictive commoning that
also doesn't get the chance to complete its work before that
checking runs.

Applied as obvious.

Richard.

2014-08-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62070
	* tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge):
	Remove SSA checking.

	* gcc.dg/pr62070.c: New testcase.
diff mbox

Patch

Index: gcc/tree-ssa-loop-manip.c
===================================================================
--- gcc/tree-ssa-loop-manip.c	(revision 213809)
+++ gcc/tree-ssa-loop-manip.c	(working copy)
@@ -761,17 +766,6 @@  gimple_duplicate_loop_to_header_edge (st
   if (!loops_state_satisfies_p (LOOPS_HAVE_PREHEADERS))
     return false;
 
-#ifdef ENABLE_CHECKING
-  /* ???  This forces needless update_ssa calls after processing each
-     loop instead of just once after processing all loops.  We should
-     instead verify that loop-closed SSA form is up-to-date for LOOP
-     only (and possibly SSA form).  For now just skip verifying if
-     there are to-be renamed variables.  */
-  if (!need_ssa_update_p (cfun)
-      && loops_state_satisfies_p (LOOP_CLOSED_SSA))
-    verify_loop_closed_ssa (true);
-#endif
-
   first_new_block = last_basic_block_for_fn (cfun);
   if (!duplicate_loop_to_header_edge (loop, e, ndupl, wont_exit,
 				      orig, to_remove, flags))
Index: gcc/testsuite/gcc.dg/pr62070.c
===================================================================
--- gcc/testsuite/gcc.dg/pr62070.c	(revision 0)
+++ gcc/testsuite/gcc.dg/pr62070.c	(working copy)
@@ -0,0 +1,19 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-vectorize" } */
+
+int in[8][4];
+int out[4];
+
+void
+foo (void)
+{
+  int sum = 1;
+  int i, j, k;
+  for (k = 0; k < 4; k++)
+    {
+      for (j = 0; j < 4; j++)
+	for (i = 0; i < 4; i++)
+	  sum *= in[i + k][j];
+      out[k] = sum;
+    }
+}