PR tree-optimization/51070
* tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
Properly handle calls.
* gcc.dg/torture/pr51070-2.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182839
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-01-03 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/51070
+ * tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
+ Properly handle calls.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/51692
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not remove
the LHS of allocation stmts.
2012-01-03 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/51070
+ * gcc.dg/torture/pr51070-2.c: New testcase.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/51692
* gcc.dg/torture/pr51692.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fno-inline" } */
+
+int
+func_4 (int si1, int si2)
+{
+ return si1;
+}
+
+int
+func_14 (int left, int right)
+{
+ return 1;
+}
+
+int
+func_37 (int left, int right)
+{
+ return left;
+}
+
+int g_92[1024];
+int g_95[1024];
+int g_224;
+int g_352[1024];
+int
+func_9 ()
+{
+ for (; g_224; g_224 += 1)
+ {
+ g_95[0] = func_4 (func_37 (g_92[g_224], 0), 0);
+ g_92[g_224] = 0, g_352[g_224] = func_14 (0, 0);
+ }
+ return 0;
+}
switch (gimple_code (stmt))
{
+ case GIMPLE_CALL:
case GIMPLE_ASSIGN:
- name = gimple_assign_lhs (stmt);
+ name = gimple_get_lhs (stmt);
break;
case GIMPLE_PHI:
return false;
}
- return TREE_CODE (name) == SSA_NAME
- && ssa_name_has_uses_outside_loop_p (name, loop_containing_stmt (stmt));
+ return (name
+ && TREE_CODE (name) == SSA_NAME
+ && ssa_name_has_uses_outside_loop_p (name,
+ loop_containing_stmt (stmt)));
}
/* Update the PHI nodes of NEW_LOOP. NEW_LOOP is a duplicate of