This is the mail archive of the gcc-help@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: gcc4.0 autovect-branch


Thank you for your reply!
I was expecting an output like icc, so I checked the assembler code file ("-S") but didn t see any vector instruction...

It was because I declared my arrays local to the foo function:

foo () {
 float a[256], b[256], c[256];
 int i;
 for (i=0; i<256; i++){
  a[i] = b[i] + c[i];
 }
}

the vect output is :
loop at vecto.c:9: not vectorized: unsupported data-type

vectorized 0 loops in function.
...



On Fri, 17 Dec 2004 13:55:49 -0500
Daniel Berlin <dberlin@dberlin.org> wrote:

> On Fri, 2004-12-17 at 10:16 -0800, Devang Patel wrote:
> > On Dec 17, 2004, at 8:47 AM, Villemin Ryusuke wrote:
> > 
> > > Hi,
> > >
> > > I might be missing something simple and obvious, but I can't find out 
> > > what :
> > > I picked up gcc4.0 in the autovect-branch, compiled it successfully 
> > > but can t make it vectorize anything.
> > >
> > > int a[256], b[256], c[256];
> > >
> > > foo () {
> > >   int i;
> > >   for (i=0; i<256; i++){
> > >     a[i] = b[i] + c[i];
> > >   }
> > > }
> > >
> > > compiled with :
> > > "gcc -O2 -msse2 -ftree-vectorize -fdump-tree-vect-stats vecto.c".
> > 
> > Compiler is able to vectorize this loop on powerpc-darwin.
> > 
> > > I expect to see a "LOOP VECTORIZED." (or at least "not vectorized:"), 
> > > but I have nothing...
> > 
> > Do you see vecto.c.t53.vect ? What does it say?
> > If you do not see vecto.c.t53.vect then somehow vectorizer is not 
> > triggered.
> > 
> > -
> > Devang
> 
> I get the feeling he expected it to print something to stderr/stdout,
> like intel's compiler does if you tell it to vectorize, and that this is
> what he thought the dump option did.
> 
> Villemin, this is not the case.
> -fdump-tree-<passname> will produce a <sourcename>.t<pass
> number>.<passname>  dumpfile that contains dumps from that pass.
> 
> *That* is where the LOOP VECTORIZED text will be printed.
> --Dan


-- 
Ryusuke "Pazoo" VILLEMIN                      mailto:ryu@buf.com
Buf Compagnie                                 http://www.buf.com


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