diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-05-28 18:42:15 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-05-28 18:42:15 +0000 |
commit | 0a74c7586cbf24b875c05507e6861070e74ffb69 (patch) | |
tree | fd9dab29f46e485b9afc38a2e968d2b4f9bb77eb /gcc/testsuite/gcc.dg | |
parent | e7cb8957bf8709677b85ba17fa3f9231633aaede (diff) | |
download | gcc-0a74c7586cbf24b875c05507e6861070e74ffb69.tar.gz |
When niter may be zero, return a COND_EXPR with the may_be_zero condition.
2010-05-28 Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c (set_nb_iterations_in_loop): Inlined in the
only place it was called from.
(number_of_latch_executions): Do not return chrec_dont_know when the
may_be_zero is a runtime condition: instead, return a COND_EXPR
including the may_be_zero condition.
* cfgloop.h (struct loop): Add a note on COND_EXPRs to the comment
of nb_iterations.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Handle
COND_EXPRs.
* gcc.dg/vect/vect-outer-fir-lb.c: Un-XFAIL-ed.
From-SVN: r159992
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c index bdc07f9af76..3c1a362c003 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c @@ -10,10 +10,7 @@ float coeff[M]; float out[N]; float fir_out[N]; -/* Should be vectorized. Fixed misaligment in the inner-loop. */ -/* Currently not vectorized because the loop-count for the inner-loop - has a maybe_zero component. Will be fixed when we incorporate the - "cond_expr in rhs" patch. */ +/* Vectorized. Fixed misaligment in the inner-loop. */ __attribute__ ((noinline)) void foo (){ int i,j,k; @@ -30,7 +27,7 @@ void foo (){ do { diff += in[j+i]*coeff[j]; - j+=4; + j+=4; } while (j < M); out[i] += diff; @@ -39,7 +36,7 @@ void foo (){ } -/* Vectorized. Changing misalignment in the inner-loop. */ +/* Vectorized. Changing misalignment in the inner-loop. */ __attribute__ ((noinline)) void fir (){ int i,j,k; @@ -68,7 +65,7 @@ int main (void) foo (); fir (); - + for (i = 0; i < N; i++) { if (out[i] != fir_out[i]) abort (); @@ -77,6 +74,5 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */ +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ |