[cfe-commits] r168821 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/x86_64-arguments.c

Manman Ren mren at apple.com
Wed Nov 28 14:29:41 PST 2012


Author: mren
Date: Wed Nov 28 16:29:41 2012
New Revision: 168821

URL: http://llvm.org/viewvc/llvm-project?rev=168821&view=rev
Log:
ABI: comments from Eli on r168820.

rdar://12723368

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp
    cfe/trunk/test/CodeGen/x86_64-arguments.c

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=168821&r1=168820&r2=168821&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Nov 28 16:29:41 2012
@@ -695,6 +695,7 @@
   llvm::Type *I8PtrTy = CGF.Builder.getInt8PtrTy();
   llvm::Value *Casted = CGF.Builder.CreateBitCast(Tmp, I8PtrTy);
   llvm::Value *SrcCasted = CGF.Builder.CreateBitCast(SrcPtr, I8PtrTy);
+  // FIXME: Use better alignment.
   CGF.Builder.CreateMemCpy(Casted, SrcCasted,
       llvm::ConstantInt::get(CGF.IntPtrTy, SrcSize),
       1, false);
@@ -782,6 +783,7 @@
     llvm::Type *I8PtrTy = CGF.Builder.getInt8PtrTy();
     llvm::Value *Casted = CGF.Builder.CreateBitCast(Tmp, I8PtrTy);
     llvm::Value *DstCasted = CGF.Builder.CreateBitCast(DstPtr, I8PtrTy);
+    // FIXME: Use better alignment.
     CGF.Builder.CreateMemCpy(DstCasted, Casted,
         llvm::ConstantInt::get(CGF.IntPtrTy, DstSize),
         1, false);

Modified: cfe/trunk/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_64-arguments.c?rev=168821&r1=168820&r2=168821&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/trunk/test/CodeGen/x86_64-arguments.c Wed Nov 28 16:29:41 2012
@@ -370,7 +370,7 @@
 extern T1 T1_retval;
 T1 test48(void) {
 // CHECK: @test48
-// CHECK-NOT: load %struct.T4* %{{.*}}
-// CHECK-NOT: store %struct.T4 %{{.*}}, %struct.T4* %{{.*}}
+// CHECK: memcpy
+// CHECK: memcpy
   return T1_retval;
 }





More information about the cfe-commits mailing list