On Oct 23, 2007, at 5:11 PM, Bill Wendling wrote:

> On 10/23/07, Chris Lattner <[EMAIL PROTECTED]> wrote:
>>> URL: http://llvm.org/viewvc/llvm-project?rev=43270&view=rev
>>> Log:
>>> If there's an unaligned memcpy to/from the stack, don't lower it.
>>> Just call the
>>> memcpy library function instead.
>>
>> Hey Bill,
>>
>> There is nothing specific about the stack here, please just make it
>> depend on whether the alignment of the src/dest pointers are  
>> sufficient.
>>
> Are you certain? When Evan and I looked at it, it seemed like it was
> mostly having problems with the stack pointer and alignment. If it
> wasn't aligned for PPC, then it would barf.

In this testcase yes.

> I'm that's not the case, then this would be the patch, right?
>
>           if (Size % Align != 0)
>             break;

I haven't looked at the code, but the size of the memcpy has nothing  
to do with it.  This is strictly a problem because memcpy lowering is  
making 8-byte stores to a pointer that is not 8-byte aligned.  This  
is independent of the size that is ultimately copied.  Evan, thoughts?

-Chris
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to