[llvm-commits] [llvm-gcc-4.2] r43399 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Bill Wendling isanbard at gmail.com
Fri Oct 26 14:15:04 PDT 2007


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



More information about the llvm-commits mailing list