diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-06-22 22:37:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-06-22 22:37:54 +0200 |
commit | 4fb489e7968448aaa9321d863660530a81d06f4c (patch) | |
tree | d8a4ec106c6e34e75ec1f781325970c2764efed7 | |
parent | 7d059f1894e61304a172cfcb37ee6d92a0227ba9 (diff) | |
download | gcc-4fb489e7968448aaa9321d863660530a81d06f4c.zip gcc-4fb489e7968448aaa9321d863660530a81d06f4c.tar.gz gcc-4fb489e7968448aaa9321d863660530a81d06f4c.tar.bz2 |
re PR debug/49496 (-fcompare-debug failure (length) with -O -ftree-vectorize)
PR debug/49496
* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Ignore debug
uses.
* gcc.dg/pr49496.c: New test.
From-SVN: r175314
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr49496.c | 20 | ||||
-rw-r--r-- | gcc/tree-vect-patterns.c | 5 |
4 files changed, 35 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfb27d6..5b5964d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-22 Jakub Jelinek <jakub@redhat.com> + + PR debug/49496 + * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Ignore debug + uses. + 2011-06-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/49493 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 691f088..61ccb06 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-06-22 Jakub Jelinek <jakub@redhat.com> + + PR debug/49496 + * gcc.dg/pr49496.c: New test. + 2011-06-22 Janis Johnson <janisjo@codesourcery.com> * gcc.target/arm/scd42-3.c: Allow -march-xscale; skip if -mcpu diff --git a/gcc/testsuite/gcc.dg/pr49496.c b/gcc/testsuite/gcc.dg/pr49496.c new file mode 100644 index 0000000..06563f3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr49496.c @@ -0,0 +1,20 @@ +/* PR debug/49496 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -fcompare-debug" } */ + +unsigned short u[8], s1[8], s2[8]; + +void bar (unsigned short *); + +void +foo (void) +{ + unsigned short e[8]; + int i; + for (i = 0; i < 8; i++) + { + int tmp = s1[i] * s2[i]; + e[i] = (tmp & 0xffff0000) >> 16; + } + bar (e); +} diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index ce94142..429dd87 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -1,5 +1,6 @@ /* Analysis Utilities for Loop Vectorization. - Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. Contributed by Dorit Nuzman <dorit@il.ibm.com> This file is part of GCC. @@ -557,6 +558,8 @@ vect_recog_widen_mult_pattern (VEC (gimple, heap) **stmts, FOR_EACH_IMM_USE_FAST (use_p, imm_iter, lhs) { + if (is_gimple_debug (USE_STMT (use_p))) + continue; use_stmt = USE_STMT (use_p); nuses++; } |