This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] (4.1 project list, stage 1.1) vectorizeralignment improvements


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]