[Bug tree-optimization/49352] [4.7 Regression] -fcompare-debug failure with -O2 -ftree-vectorize
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 10 10:29:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49352
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |irar at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-10 10:28:28 UTC ---
The following fixes the -fcompare-debug failure:
--- gcc/tree-vect-loop.c.jj 2011-05-31 08:03:10.000000000 +0200
+++ gcc/tree-vect-loop.c 2011-06-10 12:04:28.000000000 +0200
@@ -1719,10 +1719,11 @@ vect_is_slp_reduction (loop_vec_info loo
nuses = 0;
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++;
- if (is_gimple_debug (use_stmt))
- continue;
/* Check if we got back to the reduction phi. */
if (gimple_code (use_stmt) == GIMPLE_PHI
but the code still looks questionable to me. It is using use_stmt after the
loop, but what does use_stmt contain? The last use, which can be outside of
the loop, rather than the single loop use. So, if nuses > 1, which use_stmt
you actually want?
More information about the Gcc-bugs
mailing list