Skip to content

Commit eb9f7c2

Browse files
committed
Revert "OpaquePtr: Add type to sret attribute"
This reverts commit 55c4ff9. Issues were introduced as discussed in https://reviews.llvm.org/D88241 where this change made previous bugs in the linker and BitCodeWriter visible.
1 parent 297ec61 commit eb9f7c2

File tree

138 files changed

+757
-883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+757
-883
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,7 +2144,7 @@ void CodeGenModule::ConstructAttributeList(
21442144
// Attach attributes to sret.
21452145
if (IRFunctionArgs.hasSRetArg()) {
21462146
llvm::AttrBuilder SRETAttrs;
2147-
SRETAttrs.addStructRetAttr(getTypes().ConvertTypeForMem(RetTy));
2147+
SRETAttrs.addAttribute(llvm::Attribute::StructRet);
21482148
hasUsedSRet = true;
21492149
if (RetAI.getInReg())
21502150
SRETAttrs.addAttribute(llvm::Attribute::InReg);
@@ -2279,7 +2279,7 @@ void CodeGenModule::ConstructAttributeList(
22792279
// Add 'sret' if we haven't already used it for something, but
22802280
// only if the result is void.
22812281
if (!hasUsedSRet && RetTy->isVoidType()) {
2282-
Attrs.addStructRetAttr(getTypes().ConvertTypeForMem(ParamType));
2282+
Attrs.addAttribute(llvm::Attribute::StructRet);
22832283
hasUsedSRet = true;
22842284
}
22852285

clang/test/CodeGen/2006-05-19-SingleEltReturn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct Y bar() {
2424

2525

2626
// X86_32: define void @foo(%struct.Y* %P)
27-
// X86_32: call void @bar(%struct.Y* sret(%struct.Y) align 4 %{{[^),]*}})
27+
// X86_32: call void @bar(%struct.Y* sret align 4 %{{[^),]*}})
2828

29-
// X86_32: define void @bar(%struct.Y* noalias sret(%struct.Y) align 4 %{{[^,)]*}})
29+
// X86_32: define void @bar(%struct.Y* noalias sret align 4 %{{[^,)]*}})
3030
// X86_32: ret void

clang/test/CodeGen/64bit-swiftcall.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
/*****************************************************************************/
2121

2222
SWIFTCALL void indirect_result_1(OUT int *arg0, OUT float *arg1) {}
23-
// CHECK-LABEL: define {{.*}} void @indirect_result_1(i32* noalias sret(i32*) align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
23+
// CHECK-LABEL: define {{.*}} void @indirect_result_1(i32* noalias sret align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
2424

2525
// TODO: maybe this shouldn't suppress sret.
2626
SWIFTCALL int indirect_result_2(OUT int *arg0, OUT float *arg1) { __builtin_unreachable(); }
2727
// CHECK-LABEL: define {{.*}} i32 @indirect_result_2(i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
2828

2929
typedef struct { char array[1024]; } struct_reallybig;
3030
SWIFTCALL struct_reallybig indirect_result_3(OUT int *arg0, OUT float *arg1) { __builtin_unreachable(); }
31-
// CHECK-LABEL: define {{.*}} void @indirect_result_3({{.*}}* noalias sret(%struct.struct_reallybig) {{.*}}, i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
31+
// CHECK-LABEL: define {{.*}} void @indirect_result_3({{.*}}* noalias sret {{.*}}, i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
3232

3333
SWIFTCALL void context_1(CONTEXT void *self) {}
3434
// CHECK-LABEL: define {{.*}} void @context_1(i8* swiftself
@@ -547,7 +547,7 @@ typedef struct {
547547
double d4;
548548
} struct_d5;
549549
TEST(struct_d5)
550-
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
550+
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret
551551
// CHECK: define swiftcc void @take_struct_d5([[STRUCT5]]
552552

553553
typedef struct {
@@ -734,7 +734,7 @@ typedef struct {
734734
long long l4;
735735
} struct_l5;
736736
TEST(struct_l5)
737-
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
737+
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret
738738
// CHECK: define swiftcc void @take_struct_l5([[STRUCT5]]*
739739

740740
typedef struct {
@@ -779,7 +779,7 @@ typedef struct {
779779
char16 c4;
780780
} struct_vc5;
781781
TEST(struct_vc5)
782-
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
782+
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret
783783
// CHECK: define swiftcc void @take_struct_vc5([[STRUCT]]
784784

785785
typedef struct {
@@ -824,7 +824,7 @@ typedef struct {
824824
short8 c4;
825825
} struct_vs5;
826826
TEST(struct_vs5)
827-
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
827+
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret
828828
// CHECK: define swiftcc void @take_struct_vs5([[STRUCT]]
829829

830830
typedef struct {
@@ -869,7 +869,7 @@ typedef struct {
869869
int4 c4;
870870
} struct_vi5;
871871
TEST(struct_vi5)
872-
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
872+
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret
873873
// CHECK: define swiftcc void @take_struct_vi5([[STRUCT]]
874874

875875
typedef struct {
@@ -897,7 +897,7 @@ typedef struct {
897897
long2 c4;
898898
} struct_vl5;
899899
TEST(struct_vl5)
900-
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
900+
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret
901901
// CHECK: define swiftcc void @take_struct_vl5([[STRUCT]]
902902

903903
typedef struct {
@@ -925,7 +925,7 @@ typedef struct {
925925
double2 c4;
926926
} struct_vd5;
927927
TEST(struct_vd5)
928-
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
928+
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret
929929
// CHECK: define swiftcc void @take_struct_vd5([[STRUCT]]
930930

931931
typedef struct {
@@ -949,7 +949,7 @@ typedef struct {
949949
double4 c2;
950950
} struct_vd43;
951951
TEST(struct_vd43)
952-
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
952+
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret
953953
// CHECK: define swiftcc void @take_struct_vd43([[STRUCT]]
954954

955955
typedef struct {
@@ -985,7 +985,7 @@ typedef struct {
985985
float4 c4;
986986
} struct_vf5;
987987
TEST(struct_vf5)
988-
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
988+
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret
989989
// CHECK: define swiftcc void @take_struct_vf5([[STRUCT]]
990990

991991
typedef struct {
@@ -1010,7 +1010,7 @@ struct {
10101010
} s;
10111011
} union_het_vecint;
10121012
TEST(union_het_vecint)
1013-
// CHECK: define swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret([[UNION]])
1013+
// CHECK: define swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret
10141014
// CHECK: define swiftcc void @take_union_het_vecint([[UNION]]*
10151015

10161016
typedef struct {

clang/test/CodeGen/X86/x86_32-arguments-darwin.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct s10 {
7171
// Small vectors and 1 x {i64,double} are returned in registers
7272

7373
// CHECK: i32 @f11()
74-
// CHECK: void @f12(<2 x i32>* noalias sret(<2 x i32>) align 8 %agg.result)
74+
// CHECK: void @f12(<2 x i32>* noalias sret align 8 %agg.result)
7575
// CHECK: i64 @f13()
7676
// CHECK: i64 @f14()
7777
// CHECK: <2 x i64> @f15()
@@ -93,11 +93,11 @@ T16 f16(void) { while (1) {} }
9393
// 128-bits).
9494

9595
// CHECK: i32 @f17()
96-
// CHECK: void @f18(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
97-
// CHECK: void @f19(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
98-
// CHECK: void @f20(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
99-
// CHECK: void @f21(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 16 %agg.result)
100-
// CHECK: void @f22(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 16 %agg.result)
96+
// CHECK: void @f18(%{{.*}}* noalias sret align 8 %agg.result)
97+
// CHECK: void @f19(%{{.*}}* noalias sret align 8 %agg.result)
98+
// CHECK: void @f20(%{{.*}}* noalias sret align 8 %agg.result)
99+
// CHECK: void @f21(%{{.*}}* noalias sret align 16 %agg.result)
100+
// CHECK: void @f22(%{{.*}}* noalias sret align 16 %agg.result)
101101
struct { T11 a; } f17(void) { while (1) {} }
102102
struct { T12 a; } f18(void) { while (1) {} }
103103
struct { T13 a; } f19(void) { while (1) {} }
@@ -116,11 +116,11 @@ struct { struct {} a; struct { float a[1]; } b; } f25(void) { while (1) {} }
116116

117117
// Small structures are handled recursively
118118
// CHECK: i32 @f26()
119-
// CHECK: void @f27(%struct.s27* noalias sret(%struct.s27) align 1 %agg.result)
119+
// CHECK: void @f27(%struct.s27* noalias sret align 1 %agg.result)
120120
struct s26 { struct { char a, b; } a; struct { char a, b; } b; } f26(void) { while (1) {} }
121121
struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) { while (1) {} }
122122

123-
// CHECK: void @f28(%struct.s28* noalias sret(%struct.s28) align 4 %agg.result)
123+
// CHECK: void @f28(%struct.s28* noalias sret align 4 %agg.result)
124124
struct s28 { int a; int b[]; } f28(void) { while (1) {} }
125125

126126
// CHECK-LABEL: define i16 @f29()
@@ -150,7 +150,7 @@ struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) { while (
150150
// CHECK-LABEL: define float @f37()
151151
struct s37 { float c[1][1]; } f37(void) { while (1) {} }
152152

153-
// CHECK-LABEL: define void @f38(%struct.s38* noalias sret(%struct.s38) align 2 %agg.result)
153+
// CHECK-LABEL: define void @f38(%struct.s38* noalias sret align 2 %agg.result)
154154
struct s38 { char a[3]; short b; } f38(void) { while (1) {} }
155155

156156
// CHECK-LABEL: define void @f39(%struct.s39* byval(%struct.s39) align 16 %x)
@@ -264,12 +264,12 @@ struct s56_4 { t56_v2d a; };
264264
struct s56_5 { t56_v8i a; };
265265
struct s56_6 { t56_v4d a; };
266266

267-
void f56(char a0, struct s56_0 a1,
268-
t56_v2i a2, struct s56_1 a3,
269-
t56_v1d a4, struct s56_2 a5,
270-
t56_v4i a6, struct s56_3 a7,
271-
t56_v2d a8, struct s56_4 a9,
272-
t56_v8i a10, struct s56_5 a11,
267+
void f56(char a0, struct s56_0 a1,
268+
t56_v2i a2, struct s56_1 a3,
269+
t56_v1d a4, struct s56_2 a5,
270+
t56_v4i a6, struct s56_3 a7,
271+
t56_v2d a8, struct s56_4 a9,
272+
t56_v8i a10, struct s56_5 a11,
273273
t56_v4d a12, struct s56_6 a13) {
274274
extern void f56_0(int x, ...);
275275
f56_0(1, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,

clang/test/CodeGen/X86/x86_32-arguments-iamcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ st4_t retSmallStruct(st4_t r) { return r; }
5858
// CHECK-LABEL: define i64 @retPaddedStruct(i32 %r.coerce0, i32 %r.coerce1)
5959
st5_t retPaddedStruct(st5_t r) { return r; }
6060

61-
// CHECK-LABEL: define void @retLargeStruct(%struct.st12_t* noalias sret(%struct.st12_t) align 4 %agg.result, i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %r)
61+
// CHECK-LABEL: define void @retLargeStruct(%struct.st12_t* noalias sret align 4 %agg.result, i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %r)
6262
st12_t retLargeStruct(int i1, st12_t r) { return r; }
6363

6464
// CHECK-LABEL: define i32 @varArgs(i32 %i1, ...)

clang/test/CodeGen/X86/x86_64-arguments-nacl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void f12_1(struct s12 a0) {}
6161

6262
// Check that sret parameter is accounted for when checking available integer
6363
// registers.
64-
// CHECK: define void @f13(%struct.s13_0* noalias sret(%struct.s13_0) align 8 %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f)
64+
// CHECK: define void @f13(%struct.s13_0* noalias sret align 8 %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f)
6565

6666
struct s13_0 { long long f0[3]; };
6767
struct s13_1 { long long f0[2]; };

clang/test/CodeGen/X86/x86_64-arguments-win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ void f6(_Complex double a) {}
2727
// CHECK-LABEL: define dso_local i64 @f7()
2828
_Complex float f7() { return 1.0; }
2929

30-
// CHECK-LABEL: define dso_local void @f8({ double, double }* noalias sret({ double, double }) align 8 %agg.result)
30+
// CHECK-LABEL: define dso_local void @f8({ double, double }* noalias sret align 8 %agg.result)
3131
_Complex double f8() { return 1.0; }

clang/test/CodeGen/X86/x86_64-arguments.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void f7(e7 a0) {
4747

4848
// Test merging/passing of upper eightbyte with X87 class.
4949
//
50-
// CHECK-LABEL: define void @f8_1(%union.u8* noalias sret(%union.u8) align 16 %agg.result)
50+
// CHECK-LABEL: define void @f8_1(%union.u8* noalias sret align 16 %agg.result)
5151
// CHECK-LABEL: define void @f8_2(%union.u8* byval(%union.u8) align 16 %a0)
5252
union u8 {
5353
long double a;
@@ -63,7 +63,7 @@ struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} }
6363
struct s10 { int a; int b; int : 0; };
6464
void f10(struct s10 a0) {}
6565

66-
// CHECK-LABEL: define void @f11(%union.anon* noalias sret(%union.anon) align 16 %agg.result)
66+
// CHECK-LABEL: define void @f11(%union.anon* noalias sret align 16 %agg.result)
6767
union { long double a; float b; } f11() { while (1) {} }
6868

6969
// CHECK-LABEL: define i32 @f12_0()
@@ -74,7 +74,7 @@ void f12_1(struct s12 a0) {}
7474

7575
// Check that sret parameter is accounted for when checking available integer
7676
// registers.
77-
// CHECK: define void @f13(%struct.s13_0* noalias sret(%struct.s13_0) align 8 %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f)
77+
// CHECK: define void @f13(%struct.s13_0* noalias sret align 8 %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f)
7878

7979
struct s13_0 { long long f0[3]; };
8080
struct s13_1 { long long f0[2]; };
@@ -98,7 +98,7 @@ void f17(float a, float b, float c, float d, float e, float f, float g, float h,
9898
// Check for valid coercion. The struct should be passed/returned as i32, not
9999
// as i64 for better code quality.
100100
// rdar://8135035
101-
// CHECK-LABEL: define void @f18(i32 %a, i32 %f18_arg1.coerce)
101+
// CHECK-LABEL: define void @f18(i32 %a, i32 %f18_arg1.coerce)
102102
struct f18_s0 { int f0; };
103103
void f18(int a, struct f18_s0 f18_arg1) { while (1) {} }
104104

@@ -123,7 +123,7 @@ struct StringRef {
123123
};
124124

125125
// rdar://7375902
126-
// CHECK-LABEL: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1)
126+
// CHECK-LABEL: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1)
127127
const char *f21(struct StringRef S) { return S.x+S.Ptr; }
128128

129129
// PR7567
@@ -151,7 +151,7 @@ struct f24s { long a; int b; };
151151

152152
struct f23S f24(struct f23S *X, struct f24s *P2) {
153153
return *X;
154-
154+
155155
// CHECK: define { i64, i32 } @f24(%struct.f23S* %X, %struct.f24s* %P2)
156156
}
157157

clang/test/CodeGen/aarch64-varargs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ typedef struct __attribute__((aligned(32))) {
639639
__int128 val;
640640
} overaligned_int128_struct;
641641
overaligned_int128_struct overaligned_int128_struct_test() {
642-
// CHECK-LABEL: define void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret(%struct.overaligned_int128_struct) align 32 %agg.result)
642+
// CHECK-LABEL: define void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret align 32 %agg.result)
643643
return va_arg(the_list, overaligned_int128_struct);
644644
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3)
645645
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
@@ -853,7 +853,7 @@ typedef struct {
853853
__int128 val __attribute__((aligned(32)));
854854
} overaligned_int128_struct_member;
855855
overaligned_int128_struct_member overaligned_int128_struct_member_test() {
856-
// CHECK-LABEL: define void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret(%struct.overaligned_int128_struct_member) align 32 %agg.result)
856+
// CHECK-LABEL: define void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret align 32 %agg.result)
857857
return va_arg(the_list, overaligned_int128_struct_member);
858858
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3)
859859
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0

clang/test/CodeGen/aggregate-assign-call.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ struct S baz(int i, volatile int *j) {
6060
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP1_ALLOCA]] to i8*
6161
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])
6262
//
63-
// O1: call void @foo_int(%struct.S* sret(%struct.S) align 4 %[[TMP1_ALLOCA]],
63+
// O1: call void @foo_int(%struct.S* sret align 4 %[[TMP1_ALLOCA]],
6464
// O1: call void @llvm.memcpy
6565
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP1_ALLOCA]] to i8*
6666
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])
6767
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP2_ALLOCA]] to i8*
6868
// O1: call void @llvm.lifetime.start.p0i8({{[^,]*}}, i8* %[[P]])
69-
// O1: call void @foo_int(%struct.S* sret(%struct.S) align 4 %[[TMP2_ALLOCA]],
69+
// O1: call void @foo_int(%struct.S* sret align 4 %[[TMP2_ALLOCA]],
7070
// O1: call void @llvm.memcpy
7171
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP2_ALLOCA]] to i8*
7272
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])

clang/test/CodeGen/aligned-sret.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) double simd_doub
44
typedef struct { simd_double4 columns[4]; } simd_double4x4;
55
typedef simd_double4x4 matrix_double4x4;
66

7-
// CHECK: define void @ident(%struct.simd_double4x4* noalias sret(%struct.simd_double4x4) align 16 %agg.result
7+
// CHECK: define void @ident(%struct.simd_double4x4* noalias sret align 16 %agg.result
88
matrix_double4x4 ident(matrix_double4x4 x) {
99
return x;
1010
}

clang/test/CodeGen/arc/arguments.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void cf1(cs1 i) {}
2222
typedef struct {
2323
int cc;
2424
} s2;
25-
// CHECK: define void @f2(%struct.s2* noalias sret(%struct.s2) align 4 %agg.result)
25+
// CHECK: define void @f2(%struct.s2* noalias sret align 4 %agg.result)
2626
s2 f2() {
2727
s2 foo;
2828
return foo;
@@ -32,7 +32,7 @@ typedef struct {
3232
int cc;
3333
int dd;
3434
} s3;
35-
// CHECK: define void @f3(%struct.s3* noalias sret(%struct.s3) align 4 %agg.result)
35+
// CHECK: define void @f3(%struct.s3* noalias sret align 4 %agg.result)
3636
s3 f3() {
3737
s3 foo;
3838
return foo;
@@ -128,8 +128,8 @@ void st3(s16 a, s16 b, s16 c) {}
128128

129129
// 1 sret + 1 i32 + 2*(i32 coerce) + 4*(i32 coerce) + 1 byval
130130
s16 st4(int x, s8 a, s16 b, s16 c) { return b; }
131-
// CHECK: define void @st4(%struct.s16* noalias sret(%struct.s16) align 4 %agg.result, i32 inreg %x, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce)
131+
// CHECK: define void @st4(%struct.s16* noalias sret align 4 %agg.result, i32 inreg %x, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce)
132132

133133
// 1 sret + 2*(i32 coerce) + 4*(i32 coerce) + 4*(i32 coerce)
134134
s16 st5(s8 a, s16 b, s16 c) { return b; }
135-
// CHECK: define void @st5(%struct.s16* noalias sret(%struct.s16) align 4 %agg.result, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce)
135+
// CHECK: define void @st5(%struct.s16* noalias sret align 4 %agg.result, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce)

clang/test/CodeGen/arm-aapcs-vfp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void test_vfp_stack_gpr_split_1(double a, double b, double c, double d, double e
125125
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_2(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [2 x i64] %k.coerce)
126126
void test_vfp_stack_gpr_split_2(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_long_long_int k) {}
127127

128-
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret(%struct.struct_long_long_int) align 8 %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [2 x i64] %k.coerce)
128+
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret align 8 %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [2 x i64] %k.coerce)
129129
struct_long_long_int test_vfp_stack_gpr_split_3(double a, double b, double c, double d, double e, double f, double g, double h, double i, struct_long_long_int k) {}
130130

131131
typedef struct { int a; int b:4; int c; } struct_int_bitfield_int;

0 commit comments

Comments
 (0)