This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, testsuite] Run vectorizer tests with -funroll-loops for SPU under -O3.
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Ira Rosen" <IRAR at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Jun 2008 09:05:13 -0400
- Subject: Re: [patch, testsuite] Run vectorizer tests with -funroll-loops for SPU under -O3.
- References: <OFCDAED193.CD7BBA92-ONC225746D.002A8A91-C225746D.002BBE0C@il.ibm.com>
On Thu, Jun 19, 2008 at 3:57 AM, Ira Rosen <IRAR@il.ibm.com> wrote:
>
> Hi,
>
> For SPU the default value of PARAM_MAX_COMPLETELY_PEEL_TIMES is overridden
> in config/spu/spu.c:spu_override_options() with 1 in case -funroll-loops
> and -fpeel-loops are not set. Therefore, the early loop unrolling pass
> fails to unroll the inner loop in gcc.dg/vect/O3-vect-pr34223.c, preventing
> the vectorization of the outer loop (and causing this testcase to fail).
> This patch turns on -funroll-loops for SPU in case of -O3.
>
> Tested on Cell SPU. O.K. for mainline?
Ok.
Thanks,
Richard.
> Thanks,
> Ira
>
> ChangeLog:
>
> * gcc.dg/vect/vect.exp: Run tests with -funroll-loops for SPU in case
> of -O3.
>
>
> Index: testsuite/gcc.dg/vect/vect.exp
> ===================================================================
> --- testsuite/gcc.dg/vect/vect.exp (revision 136861)
> +++ testsuite/gcc.dg/vect/vect.exp (working copy)
> @@ -245,6 +245,9 @@ dg-runtest [lsort [glob -nocomplain $src
> # With -O3
> set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
> lappend DEFAULT_VECTCFLAGS "-O3"
> +if [istarget "spu-*-*"] {
> + lappend DEFAULT_VECTCFLAGS "-funroll-loops"
> +}
> dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-*.\[cS\]]] \
> "" $DEFAULT_VECTCFLAGS
>
>