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

Chris Lattner clattner at apple.com
Sun Mar 8 12:45:51 PDT 2009

On Mar 8, 2009, at 12:41 PM, Duncan Sands wrote:

> 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))


store <appropriate constant> into T.

This does not trigger if the "holes" in T are used.


More information about the llvm-commits mailing list