diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 047bcef4ba2..7412c201f7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2010-12-06 Jakub Jelinek + 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. diff --git a/gcc/reginfo.c b/gcc/reginfo.c index aaf062ed135..7c1209fe4b4 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -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)); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3c5c43e1696..f64afd42572 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2010-12-06 Jakub Jelinek + PR debug/46771 + * gcc.dg/pr46771.c: New test. + PR rtl-optimization/46777 * gcc.dg/pr46777.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr46771.c b/gcc/testsuite/gcc.dg/pr46771.c new file mode 100644 index 00000000000..b44dfd466ab --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr46771.c @@ -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; +}