1
+ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --filter "^define |^entry:" --version 2
1
2
// RUN: %clang_cc1 -triple riscv32 -emit-llvm %s -o - \
2
- // RUN: | FileCheck -check-prefixes=ILP32,ILP32 -ILP32F,ILP32-ILP32F-ILP32D %s
3
+ // RUN: | FileCheck -check-prefixes=ILP32-ILP32F-ILP32D ,ILP32-ILP32F,ILP32 %s
3
4
// RUN: %clang_cc1 -triple riscv32 -target-feature +f -target-abi ilp32f -emit-llvm %s -o - \
4
- // RUN: | FileCheck -check-prefixes=ILP32F, ILP32-ILP32F,ILP32F-ILP32D,ILP32-ILP32F-ILP32D %s
5
+ // RUN: | FileCheck -check-prefixes=ILP32-ILP32F-ILP32D ,ILP32F-ILP32D,ILP32-ILP32F,ILP32F %s
5
6
// RUN: %clang_cc1 -triple riscv32 -target-feature +f -target-feature +d -target-abi ilp32d -emit-llvm %s -o - \
6
- // RUN: | FileCheck -check-prefixes=ILP32D, ILP32F-ILP32D,ILP32- ILP32F-ILP32D %s
7
+ // RUN: | FileCheck -check-prefixes=ILP32- ILP32F-ILP32D,ILP32F-ILP32D, ILP32D %s
7
8
8
9
// RUN: %clang_cc1 -triple riscv64 -emit-llvm %s -o - \
9
- // RUN: | FileCheck -check-prefixes=LP64,LP64 -LP64F,LP64-LP64F-LP64D %s
10
+ // RUN: | FileCheck -check-prefixes=LP64-LP64F-LP64D ,LP64-LP64F,LP64 %s
10
11
// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-abi lp64f -emit-llvm %s -o - \
11
- // RUN: | FileCheck -check-prefixes=LP64F, LP64-LP64F,LP64F-LP64D,LP64-LP64F-LP64D %s
12
+ // RUN: | FileCheck -check-prefixes=LP64-LP64F-LP64D ,LP64F-LP64D,LP64-LP64F,LP64F %s
12
13
// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d -target-abi lp64d -emit-llvm %s -o - \
13
- // RUN: | FileCheck -check-prefixes=LP64D, LP64F-LP64D,LP64- LP64F-LP64D %s
14
+ // RUN: | FileCheck -check-prefixes=LP64- LP64F-LP64D,LP64F-LP64D, LP64D %s
14
15
15
16
#include < stdint.h>
16
17
@@ -25,8 +26,14 @@ struct child1_int32_s : parent1_int32_s {
25
26
int32_t i2;
26
27
};
27
28
28
- // ILP32-ILP32F-ILP32D-LABEL: define{{.*}} [2 x i32] @_Z30int32_int32_struct_inheritance14child1_int32_s([2 x i32] %a.coerce)
29
- // LP64-LP64F-LP64D-LABEL: define{{.*}} i64 @_Z30int32_int32_struct_inheritance14child1_int32_s(i64 %a.coerce)
29
+ // ILP32-ILP32F-ILP32D-LABEL: define dso_local [2 x i32] @_Z30int32_int32_struct_inheritance14child1_int32_s
30
+ // ILP32-ILP32F-ILP32D-SAME: ([2 x i32] [[A_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
31
+ // ILP32-ILP32F-ILP32D: entry:
32
+ //
33
+ // LP64-LP64F-LP64D-LABEL: define dso_local i64 @_Z30int32_int32_struct_inheritance14child1_int32_s
34
+ // LP64-LP64F-LP64D-SAME: (i64 [[A_COERCE:%.*]]) #[[ATTR0:[0-9]+]] {
35
+ // LP64-LP64F-LP64D: entry:
36
+ //
30
37
struct child1_int32_s int32_int32_struct_inheritance (struct child1_int32_s a) {
31
38
return a;
32
39
}
@@ -39,10 +46,22 @@ struct child2_float_s : parent2_int32_s {
39
46
float f1;
40
47
};
41
48
42
- // ILP32: define{{.*}} [2 x i32] @_Z30int32_float_struct_inheritance14child2_float_s([2 x i32] %a.coerce)
43
- // ILP32F-ILP32D: define{{.*}} { i32, float } @_Z30int32_float_struct_inheritance14child2_float_s(i32 %0, float %1)
44
- // LP64: define{{.*}} i64 @_Z30int32_float_struct_inheritance14child2_float_s(i64 %a.coerce)
45
- // LP64F-LP64D: define{{.*}} { i32, float } @_Z30int32_float_struct_inheritance14child2_float_s(i32 %0, float %1)
49
+ // ILP32-LABEL: define dso_local [2 x i32] @_Z30int32_float_struct_inheritance14child2_float_s
50
+ // ILP32-SAME: ([2 x i32] [[A_COERCE:%.*]]) #[[ATTR0]] {
51
+ // ILP32: entry:
52
+ //
53
+ // ILP32F-ILP32D-LABEL: define dso_local { i32, float } @_Z30int32_float_struct_inheritance14child2_float_s
54
+ // ILP32F-ILP32D-SAME: (i32 [[TMP0:%.*]], float [[TMP1:%.*]]) #[[ATTR0]] {
55
+ // ILP32F-ILP32D: entry:
56
+ //
57
+ // LP64-LABEL: define dso_local i64 @_Z30int32_float_struct_inheritance14child2_float_s
58
+ // LP64-SAME: (i64 [[A_COERCE:%.*]]) #[[ATTR0]] {
59
+ // LP64: entry:
60
+ //
61
+ // LP64F-LP64D-LABEL: define dso_local { i32, float } @_Z30int32_float_struct_inheritance14child2_float_s
62
+ // LP64F-LP64D-SAME: (i32 [[TMP0:%.*]], float [[TMP1:%.*]]) #[[ATTR0]] {
63
+ // LP64F-LP64D: entry:
64
+ //
46
65
struct child2_float_s int32_float_struct_inheritance (struct child2_float_s a) {
47
66
return a;
48
67
}
@@ -55,9 +74,18 @@ struct child3_int64_s : parent3_float_s {
55
74
int64_t i1;
56
75
};
57
76
58
- // ILP32-ILP32F-ILP32D-LABEL: define{{.*}} void @_Z30float_int64_struct_inheritance14child3_int64_s(ptr noalias sret(%struct.child3_int64_s)
59
- // LP64-LABEL: define{{.*}} [2 x i64] @_Z30float_int64_struct_inheritance14child3_int64_s([2 x i64] %a.coerce)
60
- // LP64F-LP64D-LABEL: define{{.*}} { float, i64 } @_Z30float_int64_struct_inheritance14child3_int64_s(float %0, i64 %1)
77
+ // ILP32-ILP32F-ILP32D-LABEL: define dso_local void @_Z30float_int64_struct_inheritance14child3_int64_s
78
+ // ILP32-ILP32F-ILP32D-SAME: (ptr noalias sret([[STRUCT_CHILD3_INT64_S:%.*]]) align 8 [[AGG_RESULT:%.*]], ptr noundef [[A:%.*]]) #[[ATTR0]] {
79
+ // ILP32-ILP32F-ILP32D: entry:
80
+ //
81
+ // LP64-LABEL: define dso_local [2 x i64] @_Z30float_int64_struct_inheritance14child3_int64_s
82
+ // LP64-SAME: ([2 x i64] [[A_COERCE:%.*]]) #[[ATTR0]] {
83
+ // LP64: entry:
84
+ //
85
+ // LP64F-LP64D-LABEL: define dso_local { float, i64 } @_Z30float_int64_struct_inheritance14child3_int64_s
86
+ // LP64F-LP64D-SAME: (float [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] {
87
+ // LP64F-LP64D: entry:
88
+ //
61
89
struct child3_int64_s float_int64_struct_inheritance (struct child3_int64_s a) {
62
90
return a;
63
91
}
@@ -70,10 +98,22 @@ struct child4_double_s : parent4_double_s {
70
98
double d1;
71
99
};
72
100
73
- // ILP32-ILP32F-LABEL: define{{.*}} void @_Z32double_double_struct_inheritance15child4_double_s(ptr noalias sret(%struct.child4_double_s)
74
- // ILP32D-LABEL: define{{.*}} { double, double } @_Z32double_double_struct_inheritance15child4_double_s(double %0, double %1)
75
- // LP64-LP64F-LABEL: define{{.*}} [2 x i64] @_Z32double_double_struct_inheritance15child4_double_s([2 x i64] %a.coerce)
76
- // LP64D-LABEL: define{{.*}} { double, double } @_Z32double_double_struct_inheritance15child4_double_s(double %0, double %1)
101
+ // ILP32-ILP32F-LABEL: define dso_local void @_Z32double_double_struct_inheritance15child4_double_s
102
+ // ILP32-ILP32F-SAME: (ptr noalias sret([[STRUCT_CHILD4_DOUBLE_S:%.*]]) align 8 [[AGG_RESULT:%.*]], ptr noundef [[A:%.*]]) #[[ATTR0]] {
103
+ // ILP32-ILP32F: entry:
104
+ //
105
+ // ILP32D-LABEL: define dso_local { double, double } @_Z32double_double_struct_inheritance15child4_double_s
106
+ // ILP32D-SAME: (double [[TMP0:%.*]], double [[TMP1:%.*]]) #[[ATTR0]] {
107
+ // ILP32D: entry:
108
+ //
109
+ // LP64-LP64F-LABEL: define dso_local [2 x i64] @_Z32double_double_struct_inheritance15child4_double_s
110
+ // LP64-LP64F-SAME: ([2 x i64] [[A_COERCE:%.*]]) #[[ATTR0]] {
111
+ // LP64-LP64F: entry:
112
+ //
113
+ // LP64D-LABEL: define dso_local { double, double } @_Z32double_double_struct_inheritance15child4_double_s
114
+ // LP64D-SAME: (double [[TMP0:%.*]], double [[TMP1:%.*]]) #[[ATTR0]] {
115
+ // LP64D: entry:
116
+ //
77
117
struct child4_double_s double_double_struct_inheritance (struct child4_double_s a) {
78
118
return a;
79
119
}
@@ -89,8 +129,14 @@ struct child5_virtual_s : virtual parent5_virtual_s {
89
129
float f1;
90
130
};
91
131
92
- // ILP32-ILP32F-ILP32D-LABEL: define{{.*}} void @_ZN16child5_virtual_sC1EOS_(ptr noundef nonnull align 4 dereferenceable(8) %this, ptr noundef nonnull align 4 dereferenceable(8) %0)
93
- // LP64-LP64F-LP64D-LABEL: define{{.*}} void @_ZN16child5_virtual_sC1EOS_(ptr noundef nonnull align 8 dereferenceable(12) %this, ptr noundef nonnull align 8 dereferenceable(12) %0)
132
+ // ILP32-ILP32F-ILP32D-LABEL: define dso_local void @_Z38int32_float_virtual_struct_inheritance16child5_virtual_s
133
+ // ILP32-ILP32F-ILP32D-SAME: (ptr noalias sret([[STRUCT_CHILD5_VIRTUAL_S:%.*]]) align 4 [[AGG_RESULT:%.*]], ptr noundef [[A:%.*]]) #[[ATTR0]] {
134
+ // ILP32-ILP32F-ILP32D: entry:
135
+ //
136
+ // LP64-LP64F-LP64D-LABEL: define dso_local void @_Z38int32_float_virtual_struct_inheritance16child5_virtual_s
137
+ // LP64-LP64F-LP64D-SAME: (ptr noalias sret([[STRUCT_CHILD5_VIRTUAL_S:%.*]]) align 8 [[AGG_RESULT:%.*]], ptr noundef [[A:%.*]]) #[[ATTR0]] {
138
+ // LP64-LP64F-LP64D: entry:
139
+ //
94
140
struct child5_virtual_s int32_float_virtual_struct_inheritance (struct child5_virtual_s a) {
95
141
return a;
96
142
}
@@ -110,14 +156,28 @@ struct child6b_s : parent6_float_s {
110
156
struct grandchild_6_s : child6a_s, child6b_s {
111
157
};
112
158
113
- // ILP32: define{{.*}} [2 x i32] @_Z38float_float_diamond_struct_inheritance14grandchild_6_s([2 x i32] %a.coerce)
114
159
// ILP32F-ILP64D: define{{.*}} { float, float } @_Z38float_float_diamond_struct_inheritance14grandchild_6_s(float %0, float %1)
115
- // LP64: define{{.*}} i64 @_Z38float_float_diamond_struct_inheritance14grandchild_6_s(i64 %a.coerce)
116
- // LP64F-LP64D: define{{.*}} { float, float } @_Z38float_float_diamond_struct_inheritance14grandchild_6_s(float %0, float %1)
160
+ // ILP32-LABEL: define dso_local [2 x i32] @_Z38float_float_diamond_struct_inheritance14grandchild_6_s
161
+ // ILP32-SAME: ([2 x i32] [[A_COERCE:%.*]]) #[[ATTR0]] {
162
+ // ILP32: entry:
163
+ //
164
+ // ILP32F-ILP32D-LABEL: define dso_local { float, float } @_Z38float_float_diamond_struct_inheritance14grandchild_6_s
165
+ // ILP32F-ILP32D-SAME: (float [[TMP0:%.*]], float [[TMP1:%.*]]) #[[ATTR0]] {
166
+ // ILP32F-ILP32D: entry:
167
+ //
168
+ // LP64-LABEL: define dso_local i64 @_Z38float_float_diamond_struct_inheritance14grandchild_6_s
169
+ // LP64-SAME: (i64 [[A_COERCE:%.*]]) #[[ATTR0]] {
170
+ // LP64: entry:
171
+ //
172
+ // LP64F-LP64D-LABEL: define dso_local { float, float } @_Z38float_float_diamond_struct_inheritance14grandchild_6_s
173
+ // LP64F-LP64D-SAME: (float [[TMP0:%.*]], float [[TMP1:%.*]]) #[[ATTR0]] {
174
+ // LP64F-LP64D: entry:
175
+ //
117
176
struct grandchild_6_s float_float_diamond_struct_inheritance (struct grandchild_6_s a) {
118
177
return a;
119
178
}
120
179
121
180
// NOTE: These prefixes are unused. Do not add tests below this line:
181
+ // // NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
122
182
// ILP32F: {{.*}}
123
183
// LP64F: {{.*}}
0 commit comments