mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/54981 (Different code generated with / without `-g')
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. From-SVN: r192612
This commit is contained in:
parent
dfc2e2acc9
commit
e665269ada
|
|
@ -1,3 +1,9 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2012-10-19 Richard Biener <rguenther@suse.de>
|
2012-10-19 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/54976
|
PR tree-optimization/54976
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-10-19 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/54981
|
||||||
|
* gcc.dg/pr54981.c: New testcase.
|
||||||
|
|
||||||
2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
|
2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
|
||||||
|
|
||||||
PR target/54892
|
PR target/54892
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O -ftree-loop-distribute-patterns -fcompare-debug" } */
|
||||||
|
|
||||||
|
extern void bar(unsigned *, char *);
|
||||||
|
|
||||||
|
void foo(char *s)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
char t[2];
|
||||||
|
|
||||||
|
bar(&i, t);
|
||||||
|
|
||||||
|
for (i = 0; i < 2; i++)
|
||||||
|
s[i] = t[i];
|
||||||
|
}
|
||||||
|
|
@ -125,8 +125,12 @@ ssa_name_has_uses_outside_loop_p (tree def, loop_p loop)
|
||||||
use_operand_p use_p;
|
use_operand_p use_p;
|
||||||
|
|
||||||
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue