Hi Duncan,

> Hi Bill, I must say that I don't like this patch at all.  Is there
> no better way?

I'm open to suggestions. :-) What part do you object to? I reasoned
that we needed to make the memcpy intrinsic have the correct
alignment. It is getting its alignment information from the source
pointer's alignment, but this could conflict with the destination's
alignment.

> I started to work on something better myself, but
> unfortunately on my machine (x86-32) the testcase doesn't lead to
> a memcpy with llvm-gcc-4.2 at all, only a memset.  Can you please
> suggest a testcase that shows the problem with x86-32 linux.
>
I've only seen this problem on PPC64. In particular, it's writing this
information into the "redzone" because this is a leaf function, and
thus the destination may be unaligned.

> PS: Don't the other two branches of the "if" statement need the same
> treatment?
>
Possibly...I'll see if I can come up with a testcase for them that fails.

-bw
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to