diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-02-08 16:47:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-02-08 16:47:01 +0100 |
commit | 8d9eca14aede1725962fa0933e87b28f8a7d03b2 (patch) | |
tree | 260f315063bb5a136b899e90bf693be6452469b9 /gcc/tree-loop-linear.c | |
parent | d35455249691b358fa92ecc17ea6ea9bed82164c (diff) | |
download | gcc-8d9eca14aede1725962fa0933e87b28f8a7d03b2.zip gcc-8d9eca14aede1725962fa0933e87b28f8a7d03b2.tar.gz gcc-8d9eca14aede1725962fa0933e87b28f8a7d03b2.tar.bz2 |
re PR tree-optimization/42931 (-ftree-loop-linear - valgrind warns about using uninitialized variable)
PR tree-optimization/42931
* tree-loop-linear.c (try_interchange_loops): Don't call
double_int_mul if estimated_loop_iterations failed.
From-SVN: r156602
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r-- | gcc/tree-loop-linear.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c index 5461975..04731c7 100644 --- a/gcc/tree-loop-linear.c +++ b/gcc/tree-loop-linear.c @@ -1,5 +1,5 @@ /* Linear Loop transforms - Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 + Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Daniel Berlin <dberlin@dberlin.org>. @@ -246,9 +246,10 @@ try_interchange_loops (lambda_trans_matrix trans, res = cmp < 0 ? estimated_loop_iterations (loop_j, false, &nb_iter): estimated_loop_iterations (loop_i, false, &nb_iter); - large = double_int_mul (large, nb_iter); - if (res && double_int_ucmp (large, l1_cache_size) < 0) + if (res + && double_int_ucmp (double_int_mul (large, nb_iter), + l1_cache_size) < 0) continue; if (dependence_steps_i < dependence_steps_j |