[llvm-commits] [llvm] r66368 - in /llvm/trunk: lib/Transforms/Scalar/ScalarReplAggregates.cpp test/Transforms/ScalarRepl/vector_memcpy.ll

Duncan Sands baldrick at free.fr
Sun Mar 8 12:55:22 PDT 2009


Hi Chris,

> >>>> teach SROA to handle promoting vector allocas with a memset into
> >>>> them into
> >>>> a vector type instead of into an integer type.
> >>>
> >>> this is only valid if the vector doesn't have holes in it (eg vector
> >>> of
> >>> x86 long double).  Is that checked somewhere?
> >>
> >> Why do you think that?
> >
> > well, I'm not sure what you are doing but it sounds like you want
> > to do a vector copy rather than an integer copy/memset.  Such a
> > copy is only ok if the vector has no holes.  But perhaps the patch
> > does something else?
> 
> This patch effectively turns something like:
> 
> tmp = alloca T
> ...
> memset(&T, cst, sizeof(T))
> ...
> 
> into
> 
> store <appropriate constant> into T.
> 
> This does not trigger if the "holes" in T are used.

thanks for the explanation.

Ciao,

Duncan.



More information about the llvm-commits mailing list