]> granicus.if.org Git - clang/commitdiff
Fix a very silly mistake in r183590.
authorEli Friedman <eli.friedman@gmail.com>
Tue, 11 Jun 2013 01:59:28 +0000 (01:59 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 11 Jun 2013 01:59:28 +0000 (01:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183720 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp
test/CodeGen/x86_64-arguments.c

index 09aec44d9ca53d948fb663882977f042c6f06712..179fdb3a92de9a43a4248a0db7d6c5e448ed78b3 100644 (file)
@@ -2516,7 +2516,6 @@ llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
     uint64_t TySize = SizeAlign.first.getQuantity();
     unsigned TyAlign = SizeAlign.second.getQuantity();
     if (TyAlign > 8) {
-      RegAddr = CGF.Builder.CreateGEP(RegAddr, gp_offset);
       llvm::Value *Tmp = CGF.CreateMemTemp(Ty);
       CGF.Builder.CreateMemCpy(Tmp, RegAddr, TySize, 8, false);
       RegAddr = Tmp;
index e94ddb9e92fb3c70342050613d3a2b1dcd710c35..7bd534407ca05a419fa95a8b0138fc0ed8c7ce3e 100644 (file)
@@ -399,6 +399,15 @@ void test51(struct test51_s *s, __builtin_va_list argList) {
 }
 
 // CHECK: define void @test51
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 16, i32 8, i1 false)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 16, i32 16, i1 false)
-// CHECK-NEXT: ret void
+// CHECK: [[TMP_ADDR:%.*]] = alloca [[STRUCT_TEST51:%.*]], align 16
+// CHECK: br i1
+// CHECK: [[REG_SAVE_AREA_PTR:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 3
+// CHECK-NEXT: [[REG_SAVE_AREA:%.*]] = load i8** [[REG_SAVE_AREA_PTR]]
+// CHECK-NEXT: [[VALUE_ADDR:%.*]] = getelementptr i8* [[REG_SAVE_AREA]], i32 {{.*}}
+// CHECK-NEXT: [[CASTED_VALUE_ADDR:%.*]] = bitcast i8* [[VALUE_ADDR]] to [[STRUCT_TEST51]]
+// CHECK-NEXT: [[CASTED_TMP_ADDR:%.*]] = bitcast [[STRUCT_TEST51]]* [[TMP_ADDR]] to i8*
+// CHECK-NEXT: [[RECASTED_VALUE_ADDR:%.*]] = bitcast [[STRUCT_TEST51]]* [[CASTED_VALUE_ADDR]] to i8*
+// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[CASTED_TMP_ADDR]], i8* [[RECASTED_VALUE_ADDR]], i64 16, i32 8, i1 false)
+// CHECK-NEXT: add i32 {{.*}}, 16
+// CHECK-NEXT: store i32 {{.*}}, i32* {{.*}}
+// CHECK-NEXT: br label