[llvm-branch-commits] [cfe-branch] r101919 - in /cfe/branches/Apple/williamson: ./ lib/CodeGen/CGCall.cpp test/CodeGen/arm-arguments.c test/CodeGen/blocks.c test/CodeGen/struct-passing.c test/CodeGen/x86_32-arguments.c test/CodeGen/x86_64-arguments.c test/CodeGenCXX/x86_32-arguments.cpp test/CodeGenObjC/x86_64-struct-return-gc.m
Daniel Dunbar
daniel at zuster.org
Tue Apr 20 10:57:02 PDT 2010
Author: ddunbar
Date: Tue Apr 20 12:57:02 2010
New Revision: 101919
URL: http://llvm.org/viewvc/llvm-project?rev=101919&view=rev
Log:
Merge fix for PR6525.
<rdar://problem/7883991> miscompile of struct return functions
--- Merging r101877 into '.':
U test/CodeGenCXX/x86_32-arguments.cpp
U test/CodeGenObjC/x86_64-struct-return-gc.m
U test/CodeGen/x86_64-arguments.c
U test/CodeGen/x86_32-arguments.c
U test/CodeGen/blocks.c
U test/CodeGen/struct-passing.c
U test/CodeGen/arm-arguments.c
U lib/CodeGen/CGCall.cpp
Modified:
cfe/branches/Apple/williamson/ (props changed)
cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp
cfe/branches/Apple/williamson/test/CodeGen/arm-arguments.c
cfe/branches/Apple/williamson/test/CodeGen/blocks.c
cfe/branches/Apple/williamson/test/CodeGen/struct-passing.c
cfe/branches/Apple/williamson/test/CodeGen/x86_32-arguments.c
cfe/branches/Apple/williamson/test/CodeGen/x86_64-arguments.c
cfe/branches/Apple/williamson/test/CodeGenCXX/x86_32-arguments.cpp
cfe/branches/Apple/williamson/test/CodeGenObjC/x86_64-struct-return-gc.m
Propchange: cfe/branches/Apple/williamson/
------------------------------------------------------------------------------
svn:mergeinfo = /cfe/trunk:101792,101810,101877
Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp Tue Apr 20 12:57:02 2010
@@ -586,8 +586,7 @@
case ABIArgInfo::Indirect:
PAL.push_back(llvm::AttributeWithIndex::get(Index,
- llvm::Attribute::StructRet |
- llvm::Attribute::NoAlias));
+ llvm::Attribute::StructRet));
++Index;
// sret disables readnone and readonly
FuncAttrs &= ~(llvm::Attribute::ReadOnly |
Modified: cfe/branches/Apple/williamson/test/CodeGen/arm-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/arm-arguments.c?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/arm-arguments.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/arm-arguments.c Tue Apr 20 12:57:02 2010
@@ -28,13 +28,13 @@
struct s4 f4(void) {}
// APCS-GNU: define arm_apcscc void @f5(
-// APCS-GNU: struct.s5* noalias sret
+// APCS-GNU: struct.s5* sret
// AAPCS: define arm_aapcscc i32 @f5()
struct s5 { struct { } f0; int f1; };
struct s5 f5(void) {}
// APCS-GNU: define arm_apcscc void @f6(
-// APCS-GNU: struct.s6* noalias sret
+// APCS-GNU: struct.s6* sret
// AAPCS: define arm_aapcscc i32 @f6()
struct s6 { int f0[1]; };
struct s6 f6(void) {}
@@ -45,7 +45,7 @@
struct s7 f7(void) {}
// APCS-GNU: define arm_apcscc void @f8(
-// APCS-GNU: struct.s8* noalias sret
+// APCS-GNU: struct.s8* sret
// AAPCS: define arm_aapcscc void @f8()
struct s8 { struct { int : 0; } f0[1]; };
struct s8 f8(void) {}
@@ -61,7 +61,7 @@
struct s10 f10(void) {}
// APCS-GNU: define arm_apcscc void @f11(
-// APCS-GNU: struct.s10* noalias sret
+// APCS-GNU: struct.s10* sret
// AAPCS: define arm_aapcscc i32 @f11()
struct s11 { int : 0; int f0; };
struct s11 f11(void) {}
@@ -72,7 +72,7 @@
union u12 f12(void) {}
// APCS-GNU: define arm_apcscc void @f13(
-// APCS-GNU: struct.s13* noalias sret
+// APCS-GNU: struct.s13* sret
// FIXME: This should return a float.
// AAPCS-FIXME: define arm_aapcscc float @f13()
@@ -80,7 +80,7 @@
struct s13 f13(void) {}
// APCS-GNU: define arm_apcscc void @f14(
-// APCS-GNU: struct.s13* noalias sret
+// APCS-GNU: struct.s13* sret
// AAPCS: define arm_aapcscc i32 @f14()
union u14 { float f0; };
union u14 f14(void) {}
@@ -104,13 +104,13 @@
struct s18 f18(void) {}
// APCS-GNU: define arm_apcscc void @f19(
-// APCS-GNU: struct.s19* noalias sret
+// APCS-GNU: struct.s19* sret
// AAPCS: define arm_aapcscc i32 @f19()
struct s19 { int f0; struct s8 f1; };
struct s19 f19(void) {}
// APCS-GNU: define arm_apcscc void @f20(
-// APCS-GNU: struct.s20* noalias sret
+// APCS-GNU: struct.s20* sret
// AAPCS: define arm_aapcscc i32 @f20()
struct s20 { struct s8 f1; int f0; };
struct s20 f20(void) {}
@@ -128,10 +128,10 @@
// APCS-GNU: define arm_apcscc i128 @f27()
// AAPCS: define arm_aapcscc i16 @f22()
// AAPCS: define arm_aapcscc i32 @f23()
-// AAPCS: define arm_aapcscc void @f24({{.*}} noalias sret
-// AAPCS: define arm_aapcscc void @f25({{.*}} noalias sret
-// AAPCS: define arm_aapcscc void @f26({{.*}} noalias sret
-// AAPCS: define arm_aapcscc void @f27({{.*}} noalias sret
+// AAPCS: define arm_aapcscc void @f24({{.*}} sret
+// AAPCS: define arm_aapcscc void @f25({{.*}} sret
+// AAPCS: define arm_aapcscc void @f26({{.*}} sret
+// AAPCS: define arm_aapcscc void @f27({{.*}} sret
_Complex char f22(void) {}
_Complex short f23(void) {}
_Complex int f24(void) {}
@@ -149,7 +149,7 @@
struct s29 { _Complex short f0; };
struct s29 f29() {}
-// APCS-GNU: define arm_apcscc void @f30({{.*}} noalias sret
-// AAPCS: define arm_aapcscc void @f30({{.*}} noalias sret
+// APCS-GNU: define arm_apcscc void @f30({{.*}} sret
+// AAPCS: define arm_aapcscc void @f30({{.*}} sret
struct s30 { _Complex int f0; };
struct s30 f30() {}
Modified: cfe/branches/Apple/williamson/test/CodeGen/blocks.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/blocks.c?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/blocks.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/blocks.c Tue Apr 20 12:57:02 2010
@@ -12,7 +12,7 @@
int a[64];
};
-// RUN: grep 'internal void @__f2_block_invoke_(.struct.s0\* noalias sret .*, .*, .* byval .*)' %t
+// RUN: grep 'internal void @__f2_block_invoke_(.struct.s0\* sret .*, .*, .* byval .*)' %t
struct s0 f2(struct s0 a0) {
return ^(struct s0 a1){ return a1; }(a0);
}
Modified: cfe/branches/Apple/williamson/test/CodeGen/struct-passing.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/struct-passing.c?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/struct-passing.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/struct-passing.c Tue Apr 20 12:57:02 2010
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s
// RUN: grep 'declare i32 @f0() readnone$' %t
// RUN: grep 'declare i32 @f1() readonly$' %t
-// RUN: grep 'declare void @f2(.* noalias sret)$' %t
-// RUN: grep 'declare void @f3(.* noalias sret)$' %t
+// RUN: grep 'declare void @f2(.* sret)$' %t
+// RUN: grep 'declare void @f3(.* sret)$' %t
// RUN: grep 'declare void @f4(.* byval)$' %t
// RUN: grep 'declare void @f5(.* byval)$' %t
// PR3835
Modified: cfe/branches/Apple/williamson/test/CodeGen/x86_32-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/x86_32-arguments.c?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/x86_32-arguments.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/x86_32-arguments.c Tue Apr 20 12:57:02 2010
@@ -72,7 +72,7 @@
// Small vectors and 1 x {i64,double} are returned in registers
// RUN: grep 'i32 @f11()' %t
-// RUN: grep -F 'void @f12(<2 x i32>* noalias sret %agg.result)' %t
+// RUN: grep -F 'void @f12(<2 x i32>* sret %agg.result)' %t
// RUN: grep 'i64 @f13()' %t
// RUN: grep 'i64 @f14()' %t
// RUN: grep '<2 x i64> @f15()' %t
@@ -94,11 +94,11 @@
// 128-bits).
// RUN: grep 'i32 @f17()' %t
-// RUN: grep -F 'void @f18(%2* noalias sret %agg.result)' %t
-// RUN: grep -F 'void @f19(%3* noalias sret %agg.result)' %t
-// RUN: grep -F 'void @f20(%4* noalias sret %agg.result)' %t
-// RUN: grep -F 'void @f21(%5* noalias sret %agg.result)' %t
-// RUN: grep -F 'void @f22(%6* noalias sret %agg.result)' %t
+// RUN: grep -F 'void @f18(%2* sret %agg.result)' %t
+// RUN: grep -F 'void @f19(%3* sret %agg.result)' %t
+// RUN: grep -F 'void @f20(%4* sret %agg.result)' %t
+// RUN: grep -F 'void @f21(%5* sret %agg.result)' %t
+// RUN: grep -F 'void @f22(%6* sret %agg.result)' %t
struct { T11 a; } f17(void) { while (1) {} }
struct { T12 a; } f18(void) { while (1) {} }
struct { T13 a; } f19(void) { while (1) {} }
@@ -117,11 +117,11 @@
// Small structures are handled recursively
// RUN: grep -F 'i32 @f26()' %t
-// RUN: grep 'void @f27(%.truct.s27\* noalias sret %agg.result)' %t
+// RUN: grep 'void @f27(%.truct.s27\* sret %agg.result)' %t
struct s26 { struct { char a, b; } a; struct { char a, b; } b; } f26(void) { while (1) {} }
struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) { while (1) {} }
-// RUN: grep 'void @f28(%.truct.s28\* noalias sret %agg.result)' %t
+// RUN: grep 'void @f28(%.truct.s28\* sret %agg.result)' %t
struct s28 { int a; int b[]; } f28(void) { while (1) {} }
// RUN: grep 'define i16 @f29()' %t
@@ -151,7 +151,7 @@
// RUN: grep 'define float @f37()' %t
struct s37 { float c[1][1]; } f37(void) { while (1) {} }
-// RUN: grep 'define void @f38(.struct.s38. noalias sret .agg.result)' %t
+// RUN: grep 'define void @f38(.struct.s38. sret .agg.result)' %t
struct s38 { char a[3]; short b; } f38(void) { while (1) {} }
// RUN: grep 'define void @f39(.struct.s39. byval align 16 .x)' %t
Modified: cfe/branches/Apple/williamson/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/x86_64-arguments.c?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/x86_64-arguments.c Tue Apr 20 12:57:02 2010
@@ -58,7 +58,7 @@
struct s10 { int a; int b; int : 0; };
void f10(struct s10 a0) {}
-// RUN: grep 'define void @f11(.union.anon. noalias sret .agg.result)' %t
+// RUN: grep 'define void @f11(.union.anon. sret .agg.result)' %t
union { long double a; float b; } f11() { while (1) {} }
// RUN: grep 'define i64 @f12_0()' %t
@@ -69,7 +69,7 @@
// Check that sret parameter is accounted for when checking available integer
// registers.
-// RUN: grep 'define void @f13(.struct.s13_0. noalias sret .agg.result, i32 .a, i32 .b, i32 .c, i32 .d, .struct.s13_1. byval .e, i32 .f)' %t
+// RUN: grep 'define void @f13(.struct.s13_0. sret .agg.result, i32 .a, i32 .b, i32 .c, i32 .d, .struct.s13_1. byval .e, i32 .f)' %t
struct s13_0 { long long f0[3]; };
struct s13_1 { long long f0[2]; };
Modified: cfe/branches/Apple/williamson/test/CodeGenCXX/x86_32-arguments.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGenCXX/x86_32-arguments.cpp?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGenCXX/x86_32-arguments.cpp (original)
+++ cfe/branches/Apple/williamson/test/CodeGenCXX/x86_32-arguments.cpp Tue Apr 20 12:57:02 2010
@@ -6,7 +6,7 @@
int s;
};
-// CHECK: define void @_Z1fv(%struct.S* noalias sret %
+// CHECK: define void @_Z1fv(%struct.S* sret %
S f() { return S(); }
// CHECK: define void @_Z1f1S(%struct.S*)
void f(S) { }
@@ -17,7 +17,7 @@
double c;
};
-// CHECK: define void @_Z1gv(%class.C* noalias sret %
+// CHECK: define void @_Z1gv(%class.C* sret %
C g() { return C(); }
// CHECK: define void @_Z1f1C(%class.C*)
Modified: cfe/branches/Apple/williamson/test/CodeGenObjC/x86_64-struct-return-gc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGenObjC/x86_64-struct-return-gc.m?rev=101919&r1=101918&r2=101919&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGenObjC/x86_64-struct-return-gc.m (original)
+++ cfe/branches/Apple/williamson/test/CodeGenObjC/x86_64-struct-return-gc.m Tue Apr 20 12:57:02 2010
@@ -25,7 +25,7 @@
void Indirect_test(void) {
struct Indirect i;
- // CHECK: call void @indirect_func(%struct.Indirect* noalias sret
+ // CHECK: call void @indirect_func(%struct.Indirect* sret
// CHECK: call i8* @objc_memmove_collectable(
i = indirect_func();
}
More information about the llvm-branch-commits
mailing list