aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-08-25 23:04:34 +0000
committerJohn McCall <rjmccall@apple.com>2011-08-25 23:04:34 +0000
commit410ffb2bc5f072d58a73c14560345bcf77dec1cc (patch)
tree162e003b95c3b8460288bdb6f6ee347e3ac61a77 /test/CodeGenCXX
parent8c7e67d7644c3ab298bd6be724c9480da0979af6 (diff)
Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us to properly mark indirect return slots as noalias, at the cost of requiring an extra memcpy when assigning an aggregate call result into a l-value. It also brings us into compliance with the x86-64 ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r--test/CodeGenCXX/temporaries.cpp6
-rw-r--r--test/CodeGenCXX/x86_32-arguments.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp
index 8aeca653da..98e5ae3e6e 100644
--- a/test/CodeGenCXX/temporaries.cpp
+++ b/test/CodeGenCXX/temporaries.cpp
@@ -395,7 +395,7 @@ namespace Elision {
// CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* [[I]])
}
- // CHECK: define void @_ZN7Elision5test2Ev([[A]]* sret
+ // CHECK: define void @_ZN7Elision5test2Ev([[A]]* noalias sret
A test2() {
// CHECK: call void @_ZN7Elision3fooEv()
// CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]])
@@ -403,7 +403,7 @@ namespace Elision {
return (foo(), A());
}
- // CHECK: define void @_ZN7Elision5test3EiNS_1AE([[A]]* sret
+ // CHECK: define void @_ZN7Elision5test3EiNS_1AE([[A]]* noalias sret
A test3(int v, A x) {
if (v < 5)
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]])
@@ -444,7 +444,7 @@ namespace Elision {
}
// rdar://problem/8433352
- // CHECK: define void @_ZN7Elision5test5Ev([[A]]* sret
+ // CHECK: define void @_ZN7Elision5test5Ev([[A]]* noalias sret
struct B { A a; B(); };
A test5() {
// CHECK: [[AT0:%.*]] = alloca [[A]], align 8
diff --git a/test/CodeGenCXX/x86_32-arguments.cpp b/test/CodeGenCXX/x86_32-arguments.cpp
index 4d4339381d..1cbeb71b22 100644
--- a/test/CodeGenCXX/x86_32-arguments.cpp
+++ b/test/CodeGenCXX/x86_32-arguments.cpp
@@ -6,7 +6,7 @@ struct S {
short s;
};
-// CHECK: define void @_Z1fv(%struct.S* sret %
+// CHECK: define void @_Z1fv(%struct.S* noalias sret %
S f() { return S(); }
// CHECK: define void @_Z1f1S(%struct.S*)
void f(S) { }
@@ -18,7 +18,7 @@ public:
double c;
};
-// CHECK: define void @_Z1gv(%class.C* sret %
+// CHECK: define void @_Z1gv(%class.C* noalias sret %
C g() { return C(); }
// CHECK: define void @_Z1f1C(%class.C*)
@@ -103,13 +103,13 @@ struct s7_1 { double x; };
struct s7 : s7_0, s7_1 { };
s7 f7() { return s7(); }
-// CHECK: define void @_Z2f8v(%struct.s8* sret %agg.result)
+// CHECK: define void @_Z2f8v(%struct.s8* noalias sret %agg.result)
struct s8_0 { };
struct s8_1 { double x; };
struct s8 { s8_0 a; s8_1 b; };
s8 f8() { return s8(); }
-// CHECK: define void @_Z2f9v(%struct.s9* sret %agg.result)
+// CHECK: define void @_Z2f9v(%struct.s9* noalias sret %agg.result)
struct s9_0 { unsigned : 0; };
struct s9_1 { double x; };
struct s9 { s9_0 a; s9_1 b; };