[llvm-branch-commits] [cfe-branch] r156673 - in /cfe/branches/release_31: ./ test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp test/CodeGenCXX/x86_64-arguments.cpp test/SemaCXX/warn-unreachable.cpp
Bill Wendling
isanbard at gmail.com
Fri May 11 17:21:45 PDT 2012
Author: void
Date: Fri May 11 19:21:44 2012
New Revision: 156673
URL: http://llvm.org/viewvc/llvm-project?rev=156673&view=rev
Log:
Merging r156047:
------------------------------------------------------------------------
r156047 | rjmccall | 2012-05-02 18:34:46 -0700 (Wed, 02 May 2012) | 4 lines
Merge x86-64-abi-sret-vs-2word-struct-param.cpp into the generic
x86_64-arguments.cpp test file and be sure to test the coerced
case as well. Thanks to Wei-Ren Chen for bringing this test
to my attention.
------------------------------------------------------------------------
Removed:
cfe/branches/release_31/test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp
Modified:
cfe/branches/release_31/ (props changed)
cfe/branches/release_31/test/CodeGenCXX/x86_64-arguments.cpp
cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp (props changed)
Propchange: cfe/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:21:44 2012
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975,156322
+/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975,156047,156322
/cfe/trunk/test/SemaTemplate:126920
Removed: cfe/branches/release_31/test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp?rev=156672&view=auto
==============================================================================
--- cfe/branches/release_31/test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp (original)
+++ cfe/branches/release_31/test/CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp (removed)
@@ -1,29 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
-// XTARGET: x86
-// PR4242
-// (PR 4242 bug is on 64-bit only, test passes on x86-32 as well)
-
-struct S {
- void* data[3];
-};
-
-struct T {
- void* data[2];
-};
-
-// CHECK: %struct.T* byval
-extern "C" S fail(int, int, int, int, T t, void* p) {
- S s;
- s.data[0] = t.data[0];
- s.data[1] = t.data[1];
- s.data[2] = p;
- return s;
-}
-
-// CHECK: %struct.T* byval
-extern "C" S* succeed(S* sret, int, int, int, int, T t, void* p) {
- sret->data[0] = t.data[0];
- sret->data[1] = t.data[1];
- sret->data[2] = p;
- return sret;
-}
Modified: cfe/branches/release_31/test/CodeGenCXX/x86_64-arguments.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/CodeGenCXX/x86_64-arguments.cpp?rev=156673&r1=156672&r2=156673&view=diff
==============================================================================
--- cfe/branches/release_31/test/CodeGenCXX/x86_64-arguments.cpp (original)
+++ cfe/branches/release_31/test/CodeGenCXX/x86_64-arguments.cpp Fri May 11 19:21:44 2012
@@ -56,6 +56,7 @@
// CHECK: define <2 x float> @_ZN6PR77423fooEPNS_2c2E(%"struct.PR7742::c2"* %P)
c2 foo(c2 *P) {
+ return c2();
}
}
@@ -149,3 +150,34 @@
foo(b);
}
}
+
+// PR4242
+namespace test9 {
+ // Large enough to be passed indirectly.
+ struct S { void *data[3]; };
+
+ struct T { void *data[2]; };
+
+ // CHECK: define void @_ZN5test93fooEPNS_1SEPNS_1TE([[S:%.*]]*, [[T:%.*]]*)
+ void foo(S*, T*) {}
+
+ // CHECK: define void @_ZN5test91aEiiiiNS_1TEPv([[S]]* noalias sret {{%.*}}, i32, i32, i32, i32, [[T]]* byval align 8, i8*)
+ S a(int, int, int, int, T, void*) {
+ return S();
+ }
+
+ // CHECK: define [[S]]* @_ZN5test91bEPNS_1SEiiiiNS_1TEPv([[S]]* {{%.*}}, i32, i32, i32, i32, [[T:%.*]]* byval align 8, i8*)
+ S* b(S* sret, int, int, int, int, T, void*) {
+ return sret;
+ }
+
+ // CHECK: define void @_ZN5test91cEiiiNS_1TEPv([[S]]* noalias sret {{%.*}}, i32, i32, i32, i8* {{%.*}}, i8* {{%.*}}, i8*)
+ S c(int, int, int, T, void*) {
+ return S();
+ }
+
+ // CHECK: define [[S]]* @_ZN5test91dEPNS_1SEiiiNS_1TEPv([[S]]* {{%.*}}, i32, i32, i32, i8* {{%.*}}, i8* {{%.*}}, i8*)
+ S* d(S* sret, int, int, int, T, void*) {
+ return sret;
+ }
+}
Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:21:44 2012
@@ -1,2 +1,2 @@
/cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975,156047
More information about the llvm-branch-commits
mailing list