Skip to content

Commit

Permalink
Merged master:9100bd772d4f into amd-gfx:e28cb5ae5057
Browse files Browse the repository at this point in the history
Local branch amd-gfx e28cb5a Merge remote-tracking branch 'llvm.org/master' into amd-gfx
Remote branch master 9100bd7 [SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond
  • Loading branch information
Sw authored and Sw committed Sep 29, 2020
2 parents e28cb5a + 9100bd7 commit a62392b
Show file tree
Hide file tree
Showing 142 changed files with 833 additions and 908 deletions.
4 changes: 2 additions & 2 deletions clang/lib/CodeGen/CGCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2144,7 +2144,7 @@ void CodeGenModule::ConstructAttributeList(
// Attach attributes to sret.
if (IRFunctionArgs.hasSRetArg()) {
llvm::AttrBuilder SRETAttrs;
SRETAttrs.addStructRetAttr(getTypes().ConvertTypeForMem(RetTy));
SRETAttrs.addAttribute(llvm::Attribute::StructRet);
hasUsedSRet = true;
if (RetAI.getInReg())
SRETAttrs.addAttribute(llvm::Attribute::InReg);
Expand Down Expand Up @@ -2279,7 +2279,7 @@ void CodeGenModule::ConstructAttributeList(
// Add 'sret' if we haven't already used it for something, but
// only if the result is void.
if (!hasUsedSRet && RetTy->isVoidType()) {
Attrs.addStructRetAttr(getTypes().ConvertTypeForMem(ParamType));
Attrs.addAttribute(llvm::Attribute::StructRet);
hasUsedSRet = true;
}

Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/2006-05-19-SingleEltReturn.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct Y bar() {


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

// X86_32: define void @bar(%struct.Y* noalias sret(%struct.Y) align 4 %{{[^,)]*}})
// X86_32: define void @bar(%struct.Y* noalias sret align 4 %{{[^,)]*}})
// X86_32: ret void
24 changes: 12 additions & 12 deletions clang/test/CodeGen/64bit-swiftcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
/*****************************************************************************/

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

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

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

SWIFTCALL void context_1(CONTEXT void *self) {}
// CHECK-LABEL: define {{.*}} void @context_1(i8* swiftself
Expand Down Expand Up @@ -547,7 +547,7 @@ typedef struct {
double d4;
} struct_d5;
TEST(struct_d5)
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_d5([[STRUCT5]]

typedef struct {
Expand Down Expand Up @@ -734,7 +734,7 @@ typedef struct {
long long l4;
} struct_l5;
TEST(struct_l5)
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_l5([[STRUCT5]]*

typedef struct {
Expand Down Expand Up @@ -779,7 +779,7 @@ typedef struct {
char16 c4;
} struct_vc5;
TEST(struct_vc5)
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vc5([[STRUCT]]

typedef struct {
Expand Down Expand Up @@ -824,7 +824,7 @@ typedef struct {
short8 c4;
} struct_vs5;
TEST(struct_vs5)
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vs5([[STRUCT]]

typedef struct {
Expand Down Expand Up @@ -869,7 +869,7 @@ typedef struct {
int4 c4;
} struct_vi5;
TEST(struct_vi5)
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vi5([[STRUCT]]

typedef struct {
Expand Down Expand Up @@ -897,7 +897,7 @@ typedef struct {
long2 c4;
} struct_vl5;
TEST(struct_vl5)
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vl5([[STRUCT]]

typedef struct {
Expand Down Expand Up @@ -925,7 +925,7 @@ typedef struct {
double2 c4;
} struct_vd5;
TEST(struct_vd5)
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vd5([[STRUCT]]

typedef struct {
Expand All @@ -949,7 +949,7 @@ typedef struct {
double4 c2;
} struct_vd43;
TEST(struct_vd43)
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vd43([[STRUCT]]

typedef struct {
Expand Down Expand Up @@ -985,7 +985,7 @@ typedef struct {
float4 c4;
} struct_vf5;
TEST(struct_vf5)
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret
// CHECK: define swiftcc void @take_struct_vf5([[STRUCT]]

typedef struct {
Expand All @@ -1010,7 +1010,7 @@ struct {
} s;
} union_het_vecint;
TEST(union_het_vecint)
// CHECK: define swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret([[UNION]])
// CHECK: define swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret
// CHECK: define swiftcc void @take_union_het_vecint([[UNION]]*

typedef struct {
Expand Down
30 changes: 15 additions & 15 deletions clang/test/CodeGen/X86/x86_32-arguments-darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct s10 {
// Small vectors and 1 x {i64,double} are returned in registers

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

// CHECK: i32 @f17()
// CHECK: void @f18(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
// CHECK: void @f19(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
// CHECK: void @f20(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 8 %agg.result)
// CHECK: void @f21(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 16 %agg.result)
// CHECK: void @f22(%{{.*}}* noalias sret(%struct.anon.{{[0-9]+}}) align 16 %agg.result)
// CHECK: void @f18(%{{.*}}* noalias sret align 8 %agg.result)
// CHECK: void @f19(%{{.*}}* noalias sret align 8 %agg.result)
// CHECK: void @f20(%{{.*}}* noalias sret align 8 %agg.result)
// CHECK: void @f21(%{{.*}}* noalias sret align 16 %agg.result)
// CHECK: void @f22(%{{.*}}* noalias sret align 16 %agg.result)
struct { T11 a; } f17(void) { while (1) {} }
struct { T12 a; } f18(void) { while (1) {} }
struct { T13 a; } f19(void) { while (1) {} }
Expand All @@ -116,11 +116,11 @@ struct { struct {} a; struct { float a[1]; } b; } f25(void) { while (1) {} }

// Small structures are handled recursively
// CHECK: i32 @f26()
// CHECK: void @f27(%struct.s27* noalias sret(%struct.s27) align 1 %agg.result)
// CHECK: void @f27(%struct.s27* noalias sret align 1 %agg.result)
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) {} }

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

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

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

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

void f56(char a0, struct s56_0 a1,
t56_v2i a2, struct s56_1 a3,
t56_v1d a4, struct s56_2 a5,
t56_v4i a6, struct s56_3 a7,
t56_v2d a8, struct s56_4 a9,
t56_v8i a10, struct s56_5 a11,
void f56(char a0, struct s56_0 a1,
t56_v2i a2, struct s56_1 a3,
t56_v1d a4, struct s56_2 a5,
t56_v4i a6, struct s56_3 a7,
t56_v2d a8, struct s56_4 a9,
t56_v8i a10, struct s56_5 a11,
t56_v4d a12, struct s56_6 a13) {
extern void f56_0(int x, ...);
f56_0(1, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/X86/x86_32-arguments-iamcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ st4_t retSmallStruct(st4_t r) { return r; }
// CHECK-LABEL: define i64 @retPaddedStruct(i32 %r.coerce0, i32 %r.coerce1)
st5_t retPaddedStruct(st5_t r) { return r; }

// 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)
// 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)
st12_t retLargeStruct(int i1, st12_t r) { return r; }

// CHECK-LABEL: define i32 @varArgs(i32 %i1, ...)
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/X86/x86_64-arguments-nacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void f12_1(struct s12 a0) {}

// Check that sret parameter is accounted for when checking available integer
// registers.
// 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)
// 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)

struct s13_0 { long long f0[3]; };
struct s13_1 { long long f0[2]; };
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/X86/x86_64-arguments-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ void f6(_Complex double a) {}
// CHECK-LABEL: define dso_local i64 @f7()
_Complex float f7() { return 1.0; }

// CHECK-LABEL: define dso_local void @f8({ double, double }* noalias sret({ double, double }) align 8 %agg.result)
// CHECK-LABEL: define dso_local void @f8({ double, double }* noalias sret align 8 %agg.result)
_Complex double f8() { return 1.0; }
12 changes: 6 additions & 6 deletions clang/test/CodeGen/X86/x86_64-arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void f7(e7 a0) {

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

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

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

// Check that sret parameter is accounted for when checking available integer
// registers.
// 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)
// 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)

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

Expand All @@ -123,7 +123,7 @@ struct StringRef {
};

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

// PR7567
Expand Down Expand Up @@ -151,7 +151,7 @@ struct f24s { long a; int b; };

struct f23S f24(struct f23S *X, struct f24s *P2) {
return *X;

// CHECK: define { i64, i32 } @f24(%struct.f23S* %X, %struct.f24s* %P2)
}

Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/aarch64-varargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ typedef struct __attribute__((aligned(32))) {
__int128 val;
} overaligned_int128_struct;
overaligned_int128_struct overaligned_int128_struct_test() {
// CHECK-LABEL: define void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret(%struct.overaligned_int128_struct) align 32 %agg.result)
// CHECK-LABEL: define void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret align 32 %agg.result)
return va_arg(the_list, overaligned_int128_struct);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
Expand Down Expand Up @@ -853,7 +853,7 @@ typedef struct {
__int128 val __attribute__((aligned(32)));
} overaligned_int128_struct_member;
overaligned_int128_struct_member overaligned_int128_struct_member_test() {
// 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)
// CHECK-LABEL: define void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret align 32 %agg.result)
return va_arg(the_list, overaligned_int128_struct_member);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/aggregate-assign-call.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ struct S baz(int i, volatile int *j) {
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP1_ALLOCA]] to i8*
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])
//
// O1: call void @foo_int(%struct.S* sret(%struct.S) align 4 %[[TMP1_ALLOCA]],
// O1: call void @foo_int(%struct.S* sret align 4 %[[TMP1_ALLOCA]],
// O1: call void @llvm.memcpy
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP1_ALLOCA]] to i8*
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP2_ALLOCA]] to i8*
// O1: call void @llvm.lifetime.start.p0i8({{[^,]*}}, i8* %[[P]])
// O1: call void @foo_int(%struct.S* sret(%struct.S) align 4 %[[TMP2_ALLOCA]],
// O1: call void @foo_int(%struct.S* sret align 4 %[[TMP2_ALLOCA]],
// O1: call void @llvm.memcpy
// O1: %[[P:[^ ]+]] = bitcast %struct.S* %[[TMP2_ALLOCA]] to i8*
// O1: call void @llvm.lifetime.end.p0i8({{[^,]*}}, i8* %[[P]])
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/aligned-sret.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) double simd_doub
typedef struct { simd_double4 columns[4]; } simd_double4x4;
typedef simd_double4x4 matrix_double4x4;

// CHECK: define void @ident(%struct.simd_double4x4* noalias sret(%struct.simd_double4x4) align 16 %agg.result
// CHECK: define void @ident(%struct.simd_double4x4* noalias sret align 16 %agg.result
matrix_double4x4 ident(matrix_double4x4 x) {
return x;
}
8 changes: 4 additions & 4 deletions clang/test/CodeGen/arc/arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void cf1(cs1 i) {}
typedef struct {
int cc;
} s2;
// CHECK: define void @f2(%struct.s2* noalias sret(%struct.s2) align 4 %agg.result)
// CHECK: define void @f2(%struct.s2* noalias sret align 4 %agg.result)
s2 f2() {
s2 foo;
return foo;
Expand All @@ -32,7 +32,7 @@ typedef struct {
int cc;
int dd;
} s3;
// CHECK: define void @f3(%struct.s3* noalias sret(%struct.s3) align 4 %agg.result)
// CHECK: define void @f3(%struct.s3* noalias sret align 4 %agg.result)
s3 f3() {
s3 foo;
return foo;
Expand Down Expand Up @@ -128,8 +128,8 @@ void st3(s16 a, s16 b, s16 c) {}

// 1 sret + 1 i32 + 2*(i32 coerce) + 4*(i32 coerce) + 1 byval
s16 st4(int x, s8 a, s16 b, s16 c) { return b; }
// 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)
// 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)

// 1 sret + 2*(i32 coerce) + 4*(i32 coerce) + 4*(i32 coerce)
s16 st5(s8 a, s16 b, s16 c) { return b; }
// 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)
// 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)
2 changes: 1 addition & 1 deletion clang/test/CodeGen/arm-aapcs-vfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void test_vfp_stack_gpr_split_1(double a, double b, double c, double d, double e
// 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)
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) {}

// 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)
// 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)
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) {}

typedef struct { int a; int b:4; int c; } struct_int_bitfield_int;
Expand Down
Loading

0 comments on commit a62392b

Please sign in to comment.