re PR debug/46771 (-fcompare-debug failure (length) with -O -ftree-vectorize)

PR debug/46771
	* reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode
	on DEBUG_INSNs.

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

From-SVN: r167514
This commit is contained in:
Jakub Jelinek 2010-12-06 20:29:38 +01:00 committed by Jakub Jelinek
parent 150bd82096
commit f4477cf433
4 changed files with 26 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2010-12-06 Jakub Jelinek <jakub@redhat.com>
PR debug/46771
* reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode
on DEBUG_INSNs.
PR rtl-optimization/46777
* cfglayout.c (duplicate_insn_chain): Avoid duplicating
also barrier after tablejump.

View File

@ -1330,7 +1330,7 @@ init_subregs_of_mode (void)
FOR_EACH_BB (bb)
FOR_BB_INSNS (bb, insn)
if (INSN_P (insn))
if (NONDEBUG_INSN_P (insn))
find_subregs_of_mode (PATTERN (insn));
}

View File

@ -1,5 +1,8 @@
2010-12-06 Jakub Jelinek <jakub@redhat.com>
PR debug/46771
* gcc.dg/pr46771.c: New test.
PR rtl-optimization/46777
* gcc.dg/pr46777.c: New test.

View File

@ -0,0 +1,18 @@
/* PR debug/46771 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vectorize -fcompare-debug" } */
unsigned char v[1600];
unsigned char
foo (unsigned char x)
{
int i;
unsigned char a = x;
unsigned char b = x;
for (i = 0; i < 1600; i++)
a = a < v[i] ? v[i] : a;
for (i = 0; i < 1600; i++)
b = b > v[i] ? v[i] : b;
return a - b;
}