aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-26 01:25:32 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-26 01:25:32 +0000
commita7db6a200a434dfa5142a0568dbf66debbbc65e0 (patch)
treea21e42a00c03115c4b4693125f8844fe28fbad96
parent713b7c011869f177dc76e6df4f7f44b1bd073bb0 (diff)
Fix up the test.
for // rdar://11861085 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGenCXX/no-opt-volatile-memcpy.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/test/CodeGenCXX/no-opt-volatile-memcpy.cpp b/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
index a0008a7704..e542e4a934 100644
--- a/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
+++ b/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O -triple=x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -O0 -triple=x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
// rdar://11861085
struct s {
@@ -14,9 +14,15 @@ void foo (void) {
gs = gs;
ls = gs;
}
-// CHECK: call void @llvm.memcpy
-// CHECK: call void @llvm.memcpy
-// CHECK: call void @llvm.memcpy
+// CHECK: define void @_Z3foov()
+// CHECK: %[[LS:.*]] = alloca %struct.s, align 4
+// CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8*
+// CHECK-NEXT: %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8*
+// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* %[[ZERO]], i8* %[[ONE]], i64 132, i32 4, i1 true)
+// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
+// CHECK-NEXT: %[[TWO:.*]] = bitcast %struct.s* %[[LS]] to i8*
+// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* %[[TWO]], i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
+
struct s1 {
struct s y;
@@ -28,9 +34,9 @@ void fee (void) {
s = s;
s.y = gs;
}
-// CHECK: call void @llvm.memcpy
-// CHECK: call void @llvm.memcpy
-
+// CHECK: define void @_Z3feev()
+// CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
+// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
struct d : s1 {
};
@@ -40,5 +46,5 @@ d gd;
void gorf(void) {
gd = gd;
}
-// CHECK: call void @llvm.memcpy
-
+// CHECK: define void @_Z4gorfv()
+// CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)