This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Useless vectorization of small loops
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, <gcc at gcc dot gnu dot org>
- Date: Mon, 21 Mar 2005 14:59:46 +0100 (CET)
- Subject: Re: Useless vectorization of small loops
On Mon, 21 Mar 2005, Dorit Naishlos wrote:
>
>
>
>
> > On Mon, 21 Mar 2005 13:45:19 +0100 (CET), Richard Guenther
> > <rguenth@tat.physik.uni-tuebingen.de> wrote:
> > ...
> >
> > Uh, and with -funroll-loops we seem to be lost completely, as we
> > produce peeling/loops for a eight times four rolling loop! Where is
> > the information about the loop counter gone??
> >
>
> the thing is you don't know at compile time what is the alignment of the
> access you're peeling for, so the peel-loop has unknown number of
> iterations, and consequently the "main" (vectorized) loop has unknown
> number of iterations.
Ah, ok, I see. I guess there is no way to propagate information
on the upper bound for the loop count (which is <= 4 in any case here).
Without -funroll-loops we are currently not able
to remove the loop exit test, i.e. we keep zeroing the IV at the
beginning, adding four and then comparing with four and conditionally
branching back... Unrolling removes this, but has bad effects on
eventually peeled loops. Of course this is yet another artifact
of tree-complete-peeling not enabled by default / not enablable(?)
without generic rtl loop unrolling.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/