[cfe-commits] r127405 - /cfe/trunk/lib/CodeGen/CGCall.cpp

NAKAMURA Takumi geek4civic at gmail.com
Tue Mar 15 15:53:24 PDT 2011


Bill, ping, please pick it up! ...Takumi

On Sat, Mar 12, 2011 at 10:33 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Bill, please pull this patch into the 2.9 branch.
>
>        Thanks!
>        Doug
>
> On Mar 10, 2011, at 6:02 AM, NAKAMURA Takumi wrote:
>
>> Author: chapuni
>> Date: Thu Mar 10 08:02:21 2011
>> New Revision: 127405
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=127405&view=rev
>> Log:
>> lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.
>>
>> Modified:
>>    cfe/trunk/lib/CodeGen/CGCall.cpp
>>
>> Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=127405&r1=127404&r2=127405&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Mar 10 08:02:21 2011
>> @@ -909,8 +909,10 @@
>>           // copy.
>>           const llvm::Type *I8PtrTy = Builder.getInt8PtrTy();
>>           CharUnits Size = getContext().getTypeSizeInChars(Ty);
>> -          Builder.CreateMemCpy(Builder.CreateBitCast(AlignedTemp, I8PtrTy),
>> -                               Builder.CreateBitCast(V, I8PtrTy),
>> +          llvm::Value *Dst = Builder.CreateBitCast(AlignedTemp, I8PtrTy);
>> +          llvm::Value *Src = Builder.CreateBitCast(V, I8PtrTy);
>> +          Builder.CreateMemCpy(Dst,
>> +                               Src,
>>                                llvm::ConstantInt::get(IntPtrTy,
>>                                                       Size.getQuantity()),
>>                                ArgI.getIndirectAlign(),
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>




More information about the cfe-commits mailing list