aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-10-19 13:05:40 +0000
committerRichard Guenther <rguenther@suse.de>2012-10-19 13:05:40 +0000
commitf7dbe46e8a4ab0f7254559fa824c3fb3cdefcff2 (patch)
treeca25d6649d4946c34570928d328373a6eaf27ce1 /gcc/tree-loop-distribution.c
parente9fa49f333b65a24c8d8946e8f1a677a6cc245a4 (diff)
2012-10-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54981 * tree-loop-distribution.c (ssa_name_has_uses_outside_loop_p): Do not consider debug stmts as uses. * gcc.dg/pr54981.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192612 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r--gcc/tree-loop-distribution.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index d29fe1cd386..1ffc434f4a4 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -125,8 +125,12 @@ ssa_name_has_uses_outside_loop_p (tree def, loop_p loop)
use_operand_p use_p;
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def)
- if (loop != loop_containing_stmt (USE_STMT (use_p)))
- return true;
+ {
+ gimple use_stmt = USE_STMT (use_p);
+ if (!is_gimple_debug (use_stmt)
+ && loop != loop_containing_stmt (use_stmt))
+ return true;
+ }
return false;
}