Commit beea2755 by Jie Zhang Committed by Jie Zhang

re PR rtl-optimization/42631 ("-fcompare-debug failure" with "-O1 -funroll-loops")

	PR debug/42631
	* web.c (entry_register): Don't clobber the number of the
	first uninitialized reference in used[].

	testsuite/
	PR debug/42631
	* gcc.dg/pr42631.c: Update test.
	* gcc.dg/pr42631-2.c: New test.

From-SVN: r169851
parent 991fcb7a
2011-02-05 Jie Zhang <jie@codesourcery.com>
PR debug/42631
* web.c (entry_register): Don't clobber the number of the
first uninitialized reference in used[].
2011-02-04 Sebastian Pop <sebastian.pop@amd.com> 2011-02-04 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46194 PR tree-optimization/46194
......
2011-02-05 Jie Zhang <jie@codesourcery.com>
PR debug/42631
* gcc.dg/pr42631.c: Update test.
* gcc.dg/pr42631-2.c: New test.
2001-02-05 Thomas Koenig <tkoenig@gcc.gnu.org> 2001-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47574 PR fortran/47574
......
/* { dg-do compile } */
/* { dg-options "-O2 -funroll-loops -fdump-rtl-web" } */
foo()
{
}
/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */
/* { dg-final { cleanup-rtl-dump "web" } } */
...@@ -14,10 +14,13 @@ ...@@ -14,10 +14,13 @@
combine uninitialized uses into a single web. */ combine uninitialized uses into a single web. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */ /* { dg-options "-g -O1 -funroll-loops -fcompare-debug -fdump-rtl-web" } */
void foo() void foo()
{ {
unsigned k; unsigned k;
while (--k > 0); while (--k > 0);
} }
/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */
/* { dg-final { cleanup-rtl-dump "web" } } */
...@@ -260,7 +260,11 @@ entry_register (struct web_entry *entry, df_ref ref, unsigned int *used) ...@@ -260,7 +260,11 @@ entry_register (struct web_entry *entry, df_ref ref, unsigned int *used)
and there won't be any use for the other values when we get to and there won't be any use for the other values when we get to
this point. */ this point. */
if (used[REGNO (reg)] != 1) if (used[REGNO (reg)] != 1)
newreg = reg, used[REGNO (reg)] = 1; {
newreg = reg;
if (!used[REGNO (reg)])
used[REGNO (reg)] = 1;
}
else else
{ {
newreg = gen_reg_rtx (GET_MODE (reg)); newreg = gen_reg_rtx (GET_MODE (reg));
......
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