This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] (4.1 project list, stage 1.1) vectorizeralignment improvements
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 16 Mar 2005 09:43:07 +0000
- Subject: Re: [patch] (4.1 project list, stage 1.1) vectorizeralignment improvements
- Organization: GNU
- References: <OFDE56B617.7F7A1C4B-ONC2256FC6.00341405-C2256FC6.00344FF2@il.ibm.com>
On Wed, 2005-03-16 at 09:31, Dorit Naishlos wrote:
>
>
> > It's a static warning from the compiler, not a dynamic execution issue.
> > The compiler sees 'x % UNITS_PER_SIMD_WORD' and knows that's a division
> > by zero so generates a warning which causes the build to croak.
> >
>
> I see.
>
> Steven's fix is ok with me. Shall I commit?
>
I can't think of a simpler fix at the moment.
This isn't a part of the compiler I know much about, so I do wonder,
whether we should even be trying to build this code at all when a
back-end hasn't defined UNITS_PER_SIMD_WORD. I suspect it just bloats
the compiler to no benefit.
Are there sub-passes of this code that will benefit non-simd machines?
R.
>
>
> Richard Earnshaw <rearnsha@gcc.gnu.org> wrote on 16/03/2005 11:19:59:
>
> > On Wed, 2005-03-16 at 09:04, Dorit Naishlos wrote:
> > >
> > >
> > > Ulrich Weigand/Germany/IBM@IBMDE wrote on 16/03/2005 00:06:21:
> > > > Dorit Naishlos wrote:
> > > >
> > > > >! DR_MISALIGNMENT (dr) %= UNITS_PER_SIMD_WORD;
> > > >
> > > > This gives a compile-time "division by zero" bootstrap error
> > > > on platforms where UNITS_PER_SIMD_WORD is undefined (and thus
> > > > defaults to zero).
> > > >
> > >
> > > We shouldn't get here if UNITS_PER_SIMD_WORD is undefined - the very
> first
> > > thing we check when the vectorizer pass starts is
> > >
> > > if (!UNITS_PER_SIMD_WORD)
> > > {
> > > if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
> > > fprintf (vect_dump, "vectorizer: target vector size is not
> > > defined.");
> > > return;
> > > }
> >
> > It's a static warning from the compiler, not a dynamic execution issue.
> > The compiler sees 'x % UNITS_PER_SIMD_WORD' and knows that's a division
> > by zero so generates a warning which causes the build to croak.
> >
> > R.