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: Loop to builtin call pass (builtinizer)


> On 7/3/07, tbily@suse.cz <tbily@suse.cz> wrote:
> >Hi Zdenek,
> >
> >> > +     NEXT_PASS (pass_builtinize);
> >> > +     NEXT_PASS (pass_may_alias);
> >>
> >> The pass_may_alias is not necessary.
> >
> >At least in current implemetation i need may_alias pass. I have small
> >example that without may_alias pass fails. The example is:
> >
> >int main (void)
> >{
> >  int i;
> >  float a[N] __attribute__ ((__aligned__(16)));
> >  float b[N] __attribute__ ((__aligned__(16)));
> >
> >  for (i=0; i<N; i++) b[i] = 2; /* (a) */
> >
> >  for (i = 1; i <= 256; i++) a[i] = b[i-1]; /* (b) */
> >
> >  /* check results:  */
> >  for (i = 1; i <= 256; i++)
> >    {
> >      if (a[i] != i-1)
> >        abort1 (3);
> >    }
> >
> >  return 0;
> >}
> >
> >When i compile this example with "-ftree-vectorize
> >-ftree-loop-builtinize ..." than the check fails because dce_loop pass
> >remove all vecorized stmts in (a) that make vectorizer. Problem is
> >that after builinization of (b) a new stmt with __builtin_memcpy (a +
> >4, b, 256) has not VDEFs.
> 
> Did you call mark_stmt_modified/update_stmt?
> That should force the vdefs/vuses to be there.

Yes, I do.

Greetings

 Tomas


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