Commit d6600130 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/42719 ("-fcompare-debug failure" with "-O2 -ftracer")

	PR tree-optimization/42719
	* tree-outof-ssa.c (trivially_conflicts_p): Don't consider debug
	stmt uses.

	* gcc.dg/pr42719.c: New test.

From-SVN: r156038
parent 2178b0f9
2010-01-19 Jakub Jelinek <jakub@redhat.com> 2010-01-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/42719
* tree-outof-ssa.c (trivially_conflicts_p): Don't consider debug
stmt uses.
PR debug/42728 PR debug/42728
* fwprop.c (all_uses_available_at): Return false if def_set dest * fwprop.c (all_uses_available_at): Return false if def_set dest
is a REG that is used in def_insn. is a REG that is used in def_insn.
......
2010-01-19 Jakub Jelinek <jakub@redhat.com> 2010-01-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/42719
* gcc.dg/pr42719.c: New test.
PR debug/42728 PR debug/42728
* gcc.dg/pr42728.c: New test. * gcc.dg/pr42728.c: New test.
......
/* PR tree-optimization/42719 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftracer -fcompare-debug" } */
int *v;
void
foo (int a)
{
int i, j;
for (j = i = a; i != -1; j = i, i = v[i])
;
v[j] = v[a];
}
...@@ -956,6 +956,8 @@ trivially_conflicts_p (basic_block bb, tree result, tree arg) ...@@ -956,6 +956,8 @@ trivially_conflicts_p (basic_block bb, tree result, tree arg)
FOR_EACH_IMM_USE_FAST (use, imm_iter, result) FOR_EACH_IMM_USE_FAST (use, imm_iter, result)
{ {
gimple use_stmt = USE_STMT (use); gimple use_stmt = USE_STMT (use);
if (is_gimple_debug (use_stmt))
continue;
/* Now, if there's a use of RESULT that lies outside this basic block, /* Now, if there's a use of RESULT that lies outside this basic block,
then there surely is a conflict with ARG. */ then there surely is a conflict with ARG. */
if (gimple_bb (use_stmt) != bb) if (gimple_bb (use_stmt) != bb)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment