Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / nofpclass.c
blob7fea8192cda7512406775f508bf0b748b458f08c
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --version 2
2 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -ffinite-math-only -emit-llvm -o - %s | FileCheck -check-prefixes=CFINITEONLY %s
4 // RUN: %clang_cc1 -x cl -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -cl-finite-math-only -emit-llvm -o - %s | FileCheck -check-prefixes=CLFINITEONLY %s
6 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -menable-no-nans -emit-llvm -o - %s | FileCheck -check-prefixes=NONANS %s
7 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -menable-no-infs -emit-llvm -o - %s | FileCheck -check-prefixes=NOINFS %s
9 // XUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -fsignaling-nans -emit-llvm -o - %s | FileCheck -check-prefixes=SNANS %s
10 // XUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +avx -fenable-matrix -fno-signaling-nans -emit-llvm -o - %s | FileCheck -check-prefixes=NO-SNANS %s
12 #ifdef __OPENCL_C_VERSION__
13 #pragma OPENCL EXTENSION __cl_clang_variadic_functions : enable
14 #endif
16 typedef float float1 __attribute__((ext_vector_type(1)));
17 typedef float float2 __attribute__((ext_vector_type(2)));
18 typedef _Float16 half2 __attribute__((ext_vector_type(2)));
19 typedef double double2 __attribute__((ext_vector_type(2)));
20 typedef double dx5x5_t __attribute__((matrix_type(5, 5)));
22 extern float extern_func(float, double, _Float16);
23 extern float2 extern_func_vec(float2, double2, half2);
24 extern _Complex float extern_complex(_Complex float, _Complex double, _Complex _Float16);
25 extern float variadic(float, ...);
26 extern dx5x5_t extern_matrix(dx5x5_t);
29 // CFINITEONLY: Function Attrs: noinline nounwind optnone
30 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @defined_func_f32
31 // CFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[A:%.*]], float noundef nofpclass(nan inf) [[B:%.*]], float noundef nofpclass(nan inf) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
32 // CFINITEONLY-NEXT: entry:
33 // CFINITEONLY-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
34 // CFINITEONLY-NEXT: [[B_ADDR:%.*]] = alloca float, align 4
35 // CFINITEONLY-NEXT: [[C_ADDR:%.*]] = alloca float, align 4
36 // CFINITEONLY-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
37 // CFINITEONLY-NEXT: store float [[B]], ptr [[B_ADDR]], align 4
38 // CFINITEONLY-NEXT: store float [[C]], ptr [[C_ADDR]], align 4
39 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
40 // CFINITEONLY-NEXT: [[TMP1:%.*]] = load float, ptr [[B_ADDR]], align 4
41 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load float, ptr [[C_ADDR]], align 4
42 // CFINITEONLY-NEXT: [[TMP3:%.*]] = call nnan ninf float @llvm.fma.f32(float [[TMP0]], float [[TMP1]], float [[TMP2]])
43 // CFINITEONLY-NEXT: [[ADD:%.*]] = fadd nnan ninf float [[TMP3]], 4.000000e+00
44 // CFINITEONLY-NEXT: ret float [[ADD]]
46 // CLFINITEONLY: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
47 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @defined_func_f32
48 // CLFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[A:%.*]], float noundef nofpclass(nan inf) [[B:%.*]], float noundef nofpclass(nan inf) [[C:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
49 // CLFINITEONLY-NEXT: entry:
50 // CLFINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf float @llvm.fma.f32(float [[A]], float [[B]], float [[C]])
51 // CLFINITEONLY-NEXT: [[ADD:%.*]] = fadd nnan ninf float [[TMP0]], 4.000000e+00
52 // CLFINITEONLY-NEXT: ret float [[ADD]]
54 // NONANS: Function Attrs: noinline nounwind optnone
55 // NONANS-LABEL: define dso_local nofpclass(nan) float @defined_func_f32
56 // NONANS-SAME: (float noundef nofpclass(nan) [[A:%.*]], float noundef nofpclass(nan) [[B:%.*]], float noundef nofpclass(nan) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
57 // NONANS-NEXT: entry:
58 // NONANS-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
59 // NONANS-NEXT: [[B_ADDR:%.*]] = alloca float, align 4
60 // NONANS-NEXT: [[C_ADDR:%.*]] = alloca float, align 4
61 // NONANS-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
62 // NONANS-NEXT: store float [[B]], ptr [[B_ADDR]], align 4
63 // NONANS-NEXT: store float [[C]], ptr [[C_ADDR]], align 4
64 // NONANS-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
65 // NONANS-NEXT: [[TMP1:%.*]] = load float, ptr [[B_ADDR]], align 4
66 // NONANS-NEXT: [[TMP2:%.*]] = load float, ptr [[C_ADDR]], align 4
67 // NONANS-NEXT: [[TMP3:%.*]] = call nnan float @llvm.fma.f32(float [[TMP0]], float [[TMP1]], float [[TMP2]])
68 // NONANS-NEXT: [[ADD:%.*]] = fadd nnan float [[TMP3]], 4.000000e+00
69 // NONANS-NEXT: ret float [[ADD]]
71 // NOINFS: Function Attrs: noinline nounwind optnone
72 // NOINFS-LABEL: define dso_local nofpclass(inf) float @defined_func_f32
73 // NOINFS-SAME: (float noundef nofpclass(inf) [[A:%.*]], float noundef nofpclass(inf) [[B:%.*]], float noundef nofpclass(inf) [[C:%.*]]) #[[ATTR0:[0-9]+]] {
74 // NOINFS-NEXT: entry:
75 // NOINFS-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
76 // NOINFS-NEXT: [[B_ADDR:%.*]] = alloca float, align 4
77 // NOINFS-NEXT: [[C_ADDR:%.*]] = alloca float, align 4
78 // NOINFS-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
79 // NOINFS-NEXT: store float [[B]], ptr [[B_ADDR]], align 4
80 // NOINFS-NEXT: store float [[C]], ptr [[C_ADDR]], align 4
81 // NOINFS-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
82 // NOINFS-NEXT: [[TMP1:%.*]] = load float, ptr [[B_ADDR]], align 4
83 // NOINFS-NEXT: [[TMP2:%.*]] = load float, ptr [[C_ADDR]], align 4
84 // NOINFS-NEXT: [[TMP3:%.*]] = call ninf float @llvm.fma.f32(float [[TMP0]], float [[TMP1]], float [[TMP2]])
85 // NOINFS-NEXT: [[ADD:%.*]] = fadd ninf float [[TMP3]], 4.000000e+00
86 // NOINFS-NEXT: ret float [[ADD]]
88 float defined_func_f32(float a, float b, float c) {
89 return __builtin_fmaf(a, b, c) + 4.0f;
92 // CFINITEONLY: Function Attrs: noinline nounwind optnone
93 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x double> @defined_func_v2f64
94 // CFINITEONLY-SAME: (<2 x double> noundef nofpclass(nan inf) [[A:%.*]], <2 x double> noundef nofpclass(nan inf) [[B:%.*]], <2 x double> noundef nofpclass(nan inf) [[C:%.*]]) #[[ATTR2:[0-9]+]] {
95 // CFINITEONLY-NEXT: entry:
96 // CFINITEONLY-NEXT: [[A_ADDR:%.*]] = alloca <2 x double>, align 16
97 // CFINITEONLY-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
98 // CFINITEONLY-NEXT: [[C_ADDR:%.*]] = alloca <2 x double>, align 16
99 // CFINITEONLY-NEXT: store <2 x double> [[A]], ptr [[A_ADDR]], align 16
100 // CFINITEONLY-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
101 // CFINITEONLY-NEXT: store <2 x double> [[C]], ptr [[C_ADDR]], align 16
102 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load <2 x double>, ptr [[A_ADDR]], align 16
103 // CFINITEONLY-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
104 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr [[C_ADDR]], align 16
105 // CFINITEONLY-NEXT: [[TMP3:%.*]] = call nnan ninf <2 x double> @llvm.fma.v2f64(<2 x double> [[TMP0]], <2 x double> [[TMP1]], <2 x double> [[TMP2]])
106 // CFINITEONLY-NEXT: [[ADD:%.*]] = fadd nnan ninf <2 x double> [[TMP3]], <double 4.000000e+00, double 4.000000e+00>
107 // CFINITEONLY-NEXT: ret <2 x double> [[ADD]]
109 // CLFINITEONLY: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
110 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x double> @defined_func_v2f64
111 // CLFINITEONLY-SAME: (<2 x double> noundef nofpclass(nan inf) [[A:%.*]], <2 x double> noundef nofpclass(nan inf) [[B:%.*]], <2 x double> noundef nofpclass(nan inf) [[C:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] {
112 // CLFINITEONLY-NEXT: entry:
113 // CLFINITEONLY-NEXT: [[TMP0:%.*]] = tail call nnan ninf <2 x double> @llvm.fma.v2f64(<2 x double> [[A]], <2 x double> [[B]], <2 x double> [[C]])
114 // CLFINITEONLY-NEXT: [[ADD:%.*]] = fadd nnan ninf <2 x double> [[TMP0]], <double 4.000000e+00, double 4.000000e+00>
115 // CLFINITEONLY-NEXT: ret <2 x double> [[ADD]]
117 // NONANS: Function Attrs: noinline nounwind optnone
118 // NONANS-LABEL: define dso_local nofpclass(nan) <2 x double> @defined_func_v2f64
119 // NONANS-SAME: (<2 x double> noundef nofpclass(nan) [[A:%.*]], <2 x double> noundef nofpclass(nan) [[B:%.*]], <2 x double> noundef nofpclass(nan) [[C:%.*]]) #[[ATTR2:[0-9]+]] {
120 // NONANS-NEXT: entry:
121 // NONANS-NEXT: [[A_ADDR:%.*]] = alloca <2 x double>, align 16
122 // NONANS-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
123 // NONANS-NEXT: [[C_ADDR:%.*]] = alloca <2 x double>, align 16
124 // NONANS-NEXT: store <2 x double> [[A]], ptr [[A_ADDR]], align 16
125 // NONANS-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
126 // NONANS-NEXT: store <2 x double> [[C]], ptr [[C_ADDR]], align 16
127 // NONANS-NEXT: [[TMP0:%.*]] = load <2 x double>, ptr [[A_ADDR]], align 16
128 // NONANS-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
129 // NONANS-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr [[C_ADDR]], align 16
130 // NONANS-NEXT: [[TMP3:%.*]] = call nnan <2 x double> @llvm.fma.v2f64(<2 x double> [[TMP0]], <2 x double> [[TMP1]], <2 x double> [[TMP2]])
131 // NONANS-NEXT: [[ADD:%.*]] = fadd nnan <2 x double> [[TMP3]], <double 4.000000e+00, double 4.000000e+00>
132 // NONANS-NEXT: ret <2 x double> [[ADD]]
134 // NOINFS: Function Attrs: noinline nounwind optnone
135 // NOINFS-LABEL: define dso_local nofpclass(inf) <2 x double> @defined_func_v2f64
136 // NOINFS-SAME: (<2 x double> noundef nofpclass(inf) [[A:%.*]], <2 x double> noundef nofpclass(inf) [[B:%.*]], <2 x double> noundef nofpclass(inf) [[C:%.*]]) #[[ATTR2:[0-9]+]] {
137 // NOINFS-NEXT: entry:
138 // NOINFS-NEXT: [[A_ADDR:%.*]] = alloca <2 x double>, align 16
139 // NOINFS-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
140 // NOINFS-NEXT: [[C_ADDR:%.*]] = alloca <2 x double>, align 16
141 // NOINFS-NEXT: store <2 x double> [[A]], ptr [[A_ADDR]], align 16
142 // NOINFS-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
143 // NOINFS-NEXT: store <2 x double> [[C]], ptr [[C_ADDR]], align 16
144 // NOINFS-NEXT: [[TMP0:%.*]] = load <2 x double>, ptr [[A_ADDR]], align 16
145 // NOINFS-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
146 // NOINFS-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr [[C_ADDR]], align 16
147 // NOINFS-NEXT: [[TMP3:%.*]] = call ninf <2 x double> @llvm.fma.v2f64(<2 x double> [[TMP0]], <2 x double> [[TMP1]], <2 x double> [[TMP2]])
148 // NOINFS-NEXT: [[ADD:%.*]] = fadd ninf <2 x double> [[TMP3]], <double 4.000000e+00, double 4.000000e+00>
149 // NOINFS-NEXT: ret <2 x double> [[ADD]]
151 double2 defined_func_v2f64(double2 a, double2 b, double2 c) {
152 return __builtin_elementwise_fma(a, b, c) + 4.0;
155 // CFINITEONLY: Function Attrs: noinline nounwind optnone
156 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_extern_func
157 // CFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[A:%.*]], double noundef nofpclass(nan inf) [[B:%.*]], half noundef nofpclass(nan inf) [[C:%.*]]) #[[ATTR0]] {
158 // CFINITEONLY-NEXT: entry:
159 // CFINITEONLY-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
160 // CFINITEONLY-NEXT: [[B_ADDR:%.*]] = alloca double, align 8
161 // CFINITEONLY-NEXT: [[C_ADDR:%.*]] = alloca half, align 2
162 // CFINITEONLY-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
163 // CFINITEONLY-NEXT: store double [[B]], ptr [[B_ADDR]], align 8
164 // CFINITEONLY-NEXT: store half [[C]], ptr [[C_ADDR]], align 2
165 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
166 // CFINITEONLY-NEXT: [[TMP1:%.*]] = load double, ptr [[B_ADDR]], align 8
167 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load half, ptr [[C_ADDR]], align 2
168 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) float @extern_func(float noundef nofpclass(nan inf) [[TMP0]], double noundef nofpclass(nan inf) [[TMP1]], half noundef nofpclass(nan inf) [[TMP2]])
169 // CFINITEONLY-NEXT: ret float [[CALL]]
171 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
172 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_extern_func
173 // CLFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[A:%.*]], double noundef nofpclass(nan inf) [[B:%.*]], half noundef nofpclass(nan inf) [[C:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] {
174 // CLFINITEONLY-NEXT: entry:
175 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) float @extern_func(float noundef nofpclass(nan inf) [[A]], double noundef nofpclass(nan inf) [[B]], half noundef nofpclass(nan inf) [[C]]) #[[ATTR10:[0-9]+]]
176 // CLFINITEONLY-NEXT: ret float [[CALL]]
178 // NONANS: Function Attrs: noinline nounwind optnone
179 // NONANS-LABEL: define dso_local nofpclass(nan) float @call_extern_func
180 // NONANS-SAME: (float noundef nofpclass(nan) [[A:%.*]], double noundef nofpclass(nan) [[B:%.*]], half noundef nofpclass(nan) [[C:%.*]]) #[[ATTR0]] {
181 // NONANS-NEXT: entry:
182 // NONANS-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
183 // NONANS-NEXT: [[B_ADDR:%.*]] = alloca double, align 8
184 // NONANS-NEXT: [[C_ADDR:%.*]] = alloca half, align 2
185 // NONANS-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
186 // NONANS-NEXT: store double [[B]], ptr [[B_ADDR]], align 8
187 // NONANS-NEXT: store half [[C]], ptr [[C_ADDR]], align 2
188 // NONANS-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
189 // NONANS-NEXT: [[TMP1:%.*]] = load double, ptr [[B_ADDR]], align 8
190 // NONANS-NEXT: [[TMP2:%.*]] = load half, ptr [[C_ADDR]], align 2
191 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) float @extern_func(float noundef nofpclass(nan) [[TMP0]], double noundef nofpclass(nan) [[TMP1]], half noundef nofpclass(nan) [[TMP2]])
192 // NONANS-NEXT: ret float [[CALL]]
194 // NOINFS: Function Attrs: noinline nounwind optnone
195 // NOINFS-LABEL: define dso_local nofpclass(inf) float @call_extern_func
196 // NOINFS-SAME: (float noundef nofpclass(inf) [[A:%.*]], double noundef nofpclass(inf) [[B:%.*]], half noundef nofpclass(inf) [[C:%.*]]) #[[ATTR0]] {
197 // NOINFS-NEXT: entry:
198 // NOINFS-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
199 // NOINFS-NEXT: [[B_ADDR:%.*]] = alloca double, align 8
200 // NOINFS-NEXT: [[C_ADDR:%.*]] = alloca half, align 2
201 // NOINFS-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
202 // NOINFS-NEXT: store double [[B]], ptr [[B_ADDR]], align 8
203 // NOINFS-NEXT: store half [[C]], ptr [[C_ADDR]], align 2
204 // NOINFS-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
205 // NOINFS-NEXT: [[TMP1:%.*]] = load double, ptr [[B_ADDR]], align 8
206 // NOINFS-NEXT: [[TMP2:%.*]] = load half, ptr [[C_ADDR]], align 2
207 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) float @extern_func(float noundef nofpclass(inf) [[TMP0]], double noundef nofpclass(inf) [[TMP1]], half noundef nofpclass(inf) [[TMP2]])
208 // NOINFS-NEXT: ret float [[CALL]]
210 float call_extern_func(float a, double b, _Float16 c) {
211 return extern_func(a, b, c);
214 // CFINITEONLY: Function Attrs: noinline nounwind optnone
215 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @call_extern_func_vec
216 // CFINITEONLY-SAME: (double noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[B:%.*]], i32 noundef [[C_COERCE:%.*]]) #[[ATTR2]] {
217 // CFINITEONLY-NEXT: entry:
218 // CFINITEONLY-NEXT: [[RETVAL:%.*]] = alloca <2 x float>, align 8
219 // CFINITEONLY-NEXT: [[A:%.*]] = alloca <2 x float>, align 8
220 // CFINITEONLY-NEXT: [[C:%.*]] = alloca <2 x half>, align 4
221 // CFINITEONLY-NEXT: [[A_ADDR:%.*]] = alloca <2 x float>, align 8
222 // CFINITEONLY-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
223 // CFINITEONLY-NEXT: [[C_ADDR:%.*]] = alloca <2 x half>, align 4
224 // CFINITEONLY-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
225 // CFINITEONLY-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
226 // CFINITEONLY-NEXT: [[COERCE4:%.*]] = alloca <2 x float>, align 8
227 // CFINITEONLY-NEXT: store double [[A_COERCE]], ptr [[A]], align 8
228 // CFINITEONLY-NEXT: [[A1:%.*]] = load <2 x float>, ptr [[A]], align 8
229 // CFINITEONLY-NEXT: store i32 [[C_COERCE]], ptr [[C]], align 4
230 // CFINITEONLY-NEXT: [[C2:%.*]] = load <2 x half>, ptr [[C]], align 4
231 // CFINITEONLY-NEXT: store <2 x float> [[A1]], ptr [[A_ADDR]], align 8
232 // CFINITEONLY-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
233 // CFINITEONLY-NEXT: store <2 x half> [[C2]], ptr [[C_ADDR]], align 4
234 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load <2 x float>, ptr [[A_ADDR]], align 8
235 // CFINITEONLY-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
236 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load <2 x half>, ptr [[C_ADDR]], align 4
237 // CFINITEONLY-NEXT: store <2 x float> [[TMP0]], ptr [[COERCE]], align 8
238 // CFINITEONLY-NEXT: [[TMP3:%.*]] = load double, ptr [[COERCE]], align 8
239 // CFINITEONLY-NEXT: store <2 x half> [[TMP2]], ptr [[COERCE3]], align 4
240 // CFINITEONLY-NEXT: [[TMP4:%.*]] = load i32, ptr [[COERCE3]], align 4
241 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) double @extern_func_vec(double noundef nofpclass(nan inf) [[TMP3]], <2 x double> noundef nofpclass(nan inf) [[TMP1]], i32 noundef [[TMP4]])
242 // CFINITEONLY-NEXT: store double [[CALL]], ptr [[COERCE4]], align 8
243 // CFINITEONLY-NEXT: [[TMP5:%.*]] = load <2 x float>, ptr [[COERCE4]], align 8
244 // CFINITEONLY-NEXT: store <2 x float> [[TMP5]], ptr [[RETVAL]], align 8
245 // CFINITEONLY-NEXT: [[TMP6:%.*]] = load double, ptr [[RETVAL]], align 8
246 // CFINITEONLY-NEXT: ret double [[TMP6]]
248 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
249 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) double @call_extern_func_vec
250 // CLFINITEONLY-SAME: (double noundef nofpclass(nan inf) [[A_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[B:%.*]], i32 noundef [[C_COERCE:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+]] {
251 // CLFINITEONLY-NEXT: entry:
252 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) double @extern_func_vec(double noundef nofpclass(nan inf) [[A_COERCE]], <2 x double> noundef nofpclass(nan inf) [[B]], i32 noundef [[C_COERCE]]) #[[ATTR10]]
253 // CLFINITEONLY-NEXT: ret double [[CALL]]
255 // NONANS: Function Attrs: noinline nounwind optnone
256 // NONANS-LABEL: define dso_local nofpclass(nan) double @call_extern_func_vec
257 // NONANS-SAME: (double noundef nofpclass(nan) [[A_COERCE:%.*]], <2 x double> noundef nofpclass(nan) [[B:%.*]], i32 noundef [[C_COERCE:%.*]]) #[[ATTR2]] {
258 // NONANS-NEXT: entry:
259 // NONANS-NEXT: [[RETVAL:%.*]] = alloca <2 x float>, align 8
260 // NONANS-NEXT: [[A:%.*]] = alloca <2 x float>, align 8
261 // NONANS-NEXT: [[C:%.*]] = alloca <2 x half>, align 4
262 // NONANS-NEXT: [[A_ADDR:%.*]] = alloca <2 x float>, align 8
263 // NONANS-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
264 // NONANS-NEXT: [[C_ADDR:%.*]] = alloca <2 x half>, align 4
265 // NONANS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
266 // NONANS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
267 // NONANS-NEXT: [[COERCE4:%.*]] = alloca <2 x float>, align 8
268 // NONANS-NEXT: store double [[A_COERCE]], ptr [[A]], align 8
269 // NONANS-NEXT: [[A1:%.*]] = load <2 x float>, ptr [[A]], align 8
270 // NONANS-NEXT: store i32 [[C_COERCE]], ptr [[C]], align 4
271 // NONANS-NEXT: [[C2:%.*]] = load <2 x half>, ptr [[C]], align 4
272 // NONANS-NEXT: store <2 x float> [[A1]], ptr [[A_ADDR]], align 8
273 // NONANS-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
274 // NONANS-NEXT: store <2 x half> [[C2]], ptr [[C_ADDR]], align 4
275 // NONANS-NEXT: [[TMP0:%.*]] = load <2 x float>, ptr [[A_ADDR]], align 8
276 // NONANS-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
277 // NONANS-NEXT: [[TMP2:%.*]] = load <2 x half>, ptr [[C_ADDR]], align 4
278 // NONANS-NEXT: store <2 x float> [[TMP0]], ptr [[COERCE]], align 8
279 // NONANS-NEXT: [[TMP3:%.*]] = load double, ptr [[COERCE]], align 8
280 // NONANS-NEXT: store <2 x half> [[TMP2]], ptr [[COERCE3]], align 4
281 // NONANS-NEXT: [[TMP4:%.*]] = load i32, ptr [[COERCE3]], align 4
282 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) double @extern_func_vec(double noundef nofpclass(nan) [[TMP3]], <2 x double> noundef nofpclass(nan) [[TMP1]], i32 noundef [[TMP4]])
283 // NONANS-NEXT: store double [[CALL]], ptr [[COERCE4]], align 8
284 // NONANS-NEXT: [[TMP5:%.*]] = load <2 x float>, ptr [[COERCE4]], align 8
285 // NONANS-NEXT: store <2 x float> [[TMP5]], ptr [[RETVAL]], align 8
286 // NONANS-NEXT: [[TMP6:%.*]] = load double, ptr [[RETVAL]], align 8
287 // NONANS-NEXT: ret double [[TMP6]]
289 // NOINFS: Function Attrs: noinline nounwind optnone
290 // NOINFS-LABEL: define dso_local nofpclass(inf) double @call_extern_func_vec
291 // NOINFS-SAME: (double noundef nofpclass(inf) [[A_COERCE:%.*]], <2 x double> noundef nofpclass(inf) [[B:%.*]], i32 noundef [[C_COERCE:%.*]]) #[[ATTR2]] {
292 // NOINFS-NEXT: entry:
293 // NOINFS-NEXT: [[RETVAL:%.*]] = alloca <2 x float>, align 8
294 // NOINFS-NEXT: [[A:%.*]] = alloca <2 x float>, align 8
295 // NOINFS-NEXT: [[C:%.*]] = alloca <2 x half>, align 4
296 // NOINFS-NEXT: [[A_ADDR:%.*]] = alloca <2 x float>, align 8
297 // NOINFS-NEXT: [[B_ADDR:%.*]] = alloca <2 x double>, align 16
298 // NOINFS-NEXT: [[C_ADDR:%.*]] = alloca <2 x half>, align 4
299 // NOINFS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
300 // NOINFS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
301 // NOINFS-NEXT: [[COERCE4:%.*]] = alloca <2 x float>, align 8
302 // NOINFS-NEXT: store double [[A_COERCE]], ptr [[A]], align 8
303 // NOINFS-NEXT: [[A1:%.*]] = load <2 x float>, ptr [[A]], align 8
304 // NOINFS-NEXT: store i32 [[C_COERCE]], ptr [[C]], align 4
305 // NOINFS-NEXT: [[C2:%.*]] = load <2 x half>, ptr [[C]], align 4
306 // NOINFS-NEXT: store <2 x float> [[A1]], ptr [[A_ADDR]], align 8
307 // NOINFS-NEXT: store <2 x double> [[B]], ptr [[B_ADDR]], align 16
308 // NOINFS-NEXT: store <2 x half> [[C2]], ptr [[C_ADDR]], align 4
309 // NOINFS-NEXT: [[TMP0:%.*]] = load <2 x float>, ptr [[A_ADDR]], align 8
310 // NOINFS-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[B_ADDR]], align 16
311 // NOINFS-NEXT: [[TMP2:%.*]] = load <2 x half>, ptr [[C_ADDR]], align 4
312 // NOINFS-NEXT: store <2 x float> [[TMP0]], ptr [[COERCE]], align 8
313 // NOINFS-NEXT: [[TMP3:%.*]] = load double, ptr [[COERCE]], align 8
314 // NOINFS-NEXT: store <2 x half> [[TMP2]], ptr [[COERCE3]], align 4
315 // NOINFS-NEXT: [[TMP4:%.*]] = load i32, ptr [[COERCE3]], align 4
316 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) double @extern_func_vec(double noundef nofpclass(inf) [[TMP3]], <2 x double> noundef nofpclass(inf) [[TMP1]], i32 noundef [[TMP4]])
317 // NOINFS-NEXT: store double [[CALL]], ptr [[COERCE4]], align 8
318 // NOINFS-NEXT: [[TMP5:%.*]] = load <2 x float>, ptr [[COERCE4]], align 8
319 // NOINFS-NEXT: store <2 x float> [[TMP5]], ptr [[RETVAL]], align 8
320 // NOINFS-NEXT: [[TMP6:%.*]] = load double, ptr [[RETVAL]], align 8
321 // NOINFS-NEXT: ret double [[TMP6]]
323 float2 call_extern_func_vec(float2 a, double2 b, half2 c) {
324 return extern_func_vec(a, b, c);
327 // CFINITEONLY: Function Attrs: noinline nounwind optnone
328 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x float> @defined_complex_func
329 // CFINITEONLY-SAME: (<2 x float> noundef nofpclass(nan inf) [[A_COERCE:%.*]], double noundef nofpclass(nan inf) [[B_COERCE0:%.*]], double noundef nofpclass(nan inf) [[B_COERCE1:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR4:[0-9]+]] {
330 // CFINITEONLY-NEXT: entry:
331 // CFINITEONLY-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4
332 // CFINITEONLY-NEXT: [[A:%.*]] = alloca { float, float }, align 4
333 // CFINITEONLY-NEXT: [[B:%.*]] = alloca { double, double }, align 8
334 // CFINITEONLY-NEXT: [[C:%.*]] = alloca { half, half }, align 2
335 // CFINITEONLY-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
336 // CFINITEONLY-NEXT: [[COERCE1:%.*]] = alloca { double, double }, align 8
337 // CFINITEONLY-NEXT: [[COERCE2:%.*]] = alloca { half, half }, align 2
338 // CFINITEONLY-NEXT: [[COERCE3:%.*]] = alloca { float, float }, align 4
339 // CFINITEONLY-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4
340 // CFINITEONLY-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
341 // CFINITEONLY-NEXT: store double [[B_COERCE0]], ptr [[TMP0]], align 8
342 // CFINITEONLY-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
343 // CFINITEONLY-NEXT: store double [[B_COERCE1]], ptr [[TMP1]], align 8
344 // CFINITEONLY-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
345 // CFINITEONLY-NEXT: [[A_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 0
346 // CFINITEONLY-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4
347 // CFINITEONLY-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 1
348 // CFINITEONLY-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4
349 // CFINITEONLY-NEXT: [[B_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
350 // CFINITEONLY-NEXT: [[B_REAL:%.*]] = load double, ptr [[B_REALP]], align 8
351 // CFINITEONLY-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
352 // CFINITEONLY-NEXT: [[B_IMAG:%.*]] = load double, ptr [[B_IMAGP]], align 8
353 // CFINITEONLY-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
354 // CFINITEONLY-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
355 // CFINITEONLY-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
356 // CFINITEONLY-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
357 // CFINITEONLY-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
358 // CFINITEONLY-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
359 // CFINITEONLY-NEXT: store float [[A_REAL]], ptr [[COERCE_REALP]], align 4
360 // CFINITEONLY-NEXT: store float [[A_IMAG]], ptr [[COERCE_IMAGP]], align 4
361 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load <2 x float>, ptr [[COERCE]], align 4
362 // CFINITEONLY-NEXT: [[COERCE1_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
363 // CFINITEONLY-NEXT: [[COERCE1_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
364 // CFINITEONLY-NEXT: store double [[B_REAL]], ptr [[COERCE1_REALP]], align 8
365 // CFINITEONLY-NEXT: store double [[B_IMAG]], ptr [[COERCE1_IMAGP]], align 8
366 // CFINITEONLY-NEXT: [[TMP3:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
367 // CFINITEONLY-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
368 // CFINITEONLY-NEXT: [[TMP5:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
369 // CFINITEONLY-NEXT: [[TMP6:%.*]] = load double, ptr [[TMP5]], align 8
370 // CFINITEONLY-NEXT: [[COERCE2_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 0
371 // CFINITEONLY-NEXT: [[COERCE2_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 1
372 // CFINITEONLY-NEXT: store half [[C_REAL]], ptr [[COERCE2_REALP]], align 2
373 // CFINITEONLY-NEXT: store half [[C_IMAG]], ptr [[COERCE2_IMAGP]], align 2
374 // CFINITEONLY-NEXT: [[TMP7:%.*]] = load <2 x half>, ptr [[COERCE2]], align 2
375 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) <2 x float> @extern_complex(<2 x float> noundef nofpclass(nan inf) [[TMP2]], double noundef nofpclass(nan inf) [[TMP4]], double noundef nofpclass(nan inf) [[TMP6]], <2 x half> noundef nofpclass(nan inf) [[TMP7]])
376 // CFINITEONLY-NEXT: store <2 x float> [[CALL]], ptr [[COERCE3]], align 4
377 // CFINITEONLY-NEXT: [[COERCE3_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 0
378 // CFINITEONLY-NEXT: [[COERCE3_REAL:%.*]] = load float, ptr [[COERCE3_REALP]], align 4
379 // CFINITEONLY-NEXT: [[COERCE3_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 1
380 // CFINITEONLY-NEXT: [[COERCE3_IMAG:%.*]] = load float, ptr [[COERCE3_IMAGP]], align 4
381 // CFINITEONLY-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 0
382 // CFINITEONLY-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 1
383 // CFINITEONLY-NEXT: store float [[COERCE3_REAL]], ptr [[RETVAL_REALP]], align 4
384 // CFINITEONLY-NEXT: store float [[COERCE3_IMAG]], ptr [[RETVAL_IMAGP]], align 4
385 // CFINITEONLY-NEXT: [[TMP8:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4
386 // CFINITEONLY-NEXT: ret <2 x float> [[TMP8]]
388 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
389 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x float> @defined_complex_func
390 // CLFINITEONLY-SAME: (<2 x float> noundef nofpclass(nan inf) [[A_COERCE:%.*]], double noundef nofpclass(nan inf) [[B_COERCE0:%.*]], double noundef nofpclass(nan inf) [[B_COERCE1:%.*]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) local_unnamed_addr #[[ATTR6:[0-9]+]] {
391 // CLFINITEONLY-NEXT: entry:
392 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) <2 x float> @extern_complex(<2 x float> noundef nofpclass(nan inf) [[A_COERCE]], double noundef nofpclass(nan inf) [[B_COERCE0]], double noundef nofpclass(nan inf) [[B_COERCE1]], <2 x half> noundef nofpclass(nan inf) [[C_COERCE]]) #[[ATTR10]]
393 // CLFINITEONLY-NEXT: ret <2 x float> [[CALL]]
395 // NONANS: Function Attrs: noinline nounwind optnone
396 // NONANS-LABEL: define dso_local nofpclass(nan) <2 x float> @defined_complex_func
397 // NONANS-SAME: (<2 x float> noundef nofpclass(nan) [[A_COERCE:%.*]], double noundef nofpclass(nan) [[B_COERCE0:%.*]], double noundef nofpclass(nan) [[B_COERCE1:%.*]], <2 x half> noundef nofpclass(nan) [[C_COERCE:%.*]]) #[[ATTR4:[0-9]+]] {
398 // NONANS-NEXT: entry:
399 // NONANS-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4
400 // NONANS-NEXT: [[A:%.*]] = alloca { float, float }, align 4
401 // NONANS-NEXT: [[B:%.*]] = alloca { double, double }, align 8
402 // NONANS-NEXT: [[C:%.*]] = alloca { half, half }, align 2
403 // NONANS-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
404 // NONANS-NEXT: [[COERCE1:%.*]] = alloca { double, double }, align 8
405 // NONANS-NEXT: [[COERCE2:%.*]] = alloca { half, half }, align 2
406 // NONANS-NEXT: [[COERCE3:%.*]] = alloca { float, float }, align 4
407 // NONANS-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4
408 // NONANS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
409 // NONANS-NEXT: store double [[B_COERCE0]], ptr [[TMP0]], align 8
410 // NONANS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
411 // NONANS-NEXT: store double [[B_COERCE1]], ptr [[TMP1]], align 8
412 // NONANS-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
413 // NONANS-NEXT: [[A_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 0
414 // NONANS-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4
415 // NONANS-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 1
416 // NONANS-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4
417 // NONANS-NEXT: [[B_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
418 // NONANS-NEXT: [[B_REAL:%.*]] = load double, ptr [[B_REALP]], align 8
419 // NONANS-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
420 // NONANS-NEXT: [[B_IMAG:%.*]] = load double, ptr [[B_IMAGP]], align 8
421 // NONANS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
422 // NONANS-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
423 // NONANS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
424 // NONANS-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
425 // NONANS-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
426 // NONANS-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
427 // NONANS-NEXT: store float [[A_REAL]], ptr [[COERCE_REALP]], align 4
428 // NONANS-NEXT: store float [[A_IMAG]], ptr [[COERCE_IMAGP]], align 4
429 // NONANS-NEXT: [[TMP2:%.*]] = load <2 x float>, ptr [[COERCE]], align 4
430 // NONANS-NEXT: [[COERCE1_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
431 // NONANS-NEXT: [[COERCE1_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
432 // NONANS-NEXT: store double [[B_REAL]], ptr [[COERCE1_REALP]], align 8
433 // NONANS-NEXT: store double [[B_IMAG]], ptr [[COERCE1_IMAGP]], align 8
434 // NONANS-NEXT: [[TMP3:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
435 // NONANS-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
436 // NONANS-NEXT: [[TMP5:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
437 // NONANS-NEXT: [[TMP6:%.*]] = load double, ptr [[TMP5]], align 8
438 // NONANS-NEXT: [[COERCE2_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 0
439 // NONANS-NEXT: [[COERCE2_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 1
440 // NONANS-NEXT: store half [[C_REAL]], ptr [[COERCE2_REALP]], align 2
441 // NONANS-NEXT: store half [[C_IMAG]], ptr [[COERCE2_IMAGP]], align 2
442 // NONANS-NEXT: [[TMP7:%.*]] = load <2 x half>, ptr [[COERCE2]], align 2
443 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) <2 x float> @extern_complex(<2 x float> noundef nofpclass(nan) [[TMP2]], double noundef nofpclass(nan) [[TMP4]], double noundef nofpclass(nan) [[TMP6]], <2 x half> noundef nofpclass(nan) [[TMP7]])
444 // NONANS-NEXT: store <2 x float> [[CALL]], ptr [[COERCE3]], align 4
445 // NONANS-NEXT: [[COERCE3_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 0
446 // NONANS-NEXT: [[COERCE3_REAL:%.*]] = load float, ptr [[COERCE3_REALP]], align 4
447 // NONANS-NEXT: [[COERCE3_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 1
448 // NONANS-NEXT: [[COERCE3_IMAG:%.*]] = load float, ptr [[COERCE3_IMAGP]], align 4
449 // NONANS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 0
450 // NONANS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 1
451 // NONANS-NEXT: store float [[COERCE3_REAL]], ptr [[RETVAL_REALP]], align 4
452 // NONANS-NEXT: store float [[COERCE3_IMAG]], ptr [[RETVAL_IMAGP]], align 4
453 // NONANS-NEXT: [[TMP8:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4
454 // NONANS-NEXT: ret <2 x float> [[TMP8]]
456 // NOINFS: Function Attrs: noinline nounwind optnone
457 // NOINFS-LABEL: define dso_local nofpclass(inf) <2 x float> @defined_complex_func
458 // NOINFS-SAME: (<2 x float> noundef nofpclass(inf) [[A_COERCE:%.*]], double noundef nofpclass(inf) [[B_COERCE0:%.*]], double noundef nofpclass(inf) [[B_COERCE1:%.*]], <2 x half> noundef nofpclass(inf) [[C_COERCE:%.*]]) #[[ATTR4:[0-9]+]] {
459 // NOINFS-NEXT: entry:
460 // NOINFS-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4
461 // NOINFS-NEXT: [[A:%.*]] = alloca { float, float }, align 4
462 // NOINFS-NEXT: [[B:%.*]] = alloca { double, double }, align 8
463 // NOINFS-NEXT: [[C:%.*]] = alloca { half, half }, align 2
464 // NOINFS-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
465 // NOINFS-NEXT: [[COERCE1:%.*]] = alloca { double, double }, align 8
466 // NOINFS-NEXT: [[COERCE2:%.*]] = alloca { half, half }, align 2
467 // NOINFS-NEXT: [[COERCE3:%.*]] = alloca { float, float }, align 4
468 // NOINFS-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4
469 // NOINFS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
470 // NOINFS-NEXT: store double [[B_COERCE0]], ptr [[TMP0]], align 8
471 // NOINFS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
472 // NOINFS-NEXT: store double [[B_COERCE1]], ptr [[TMP1]], align 8
473 // NOINFS-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
474 // NOINFS-NEXT: [[A_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 0
475 // NOINFS-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4
476 // NOINFS-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 1
477 // NOINFS-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4
478 // NOINFS-NEXT: [[B_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 0
479 // NOINFS-NEXT: [[B_REAL:%.*]] = load double, ptr [[B_REALP]], align 8
480 // NOINFS-NEXT: [[B_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[B]], i32 0, i32 1
481 // NOINFS-NEXT: [[B_IMAG:%.*]] = load double, ptr [[B_IMAGP]], align 8
482 // NOINFS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
483 // NOINFS-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
484 // NOINFS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
485 // NOINFS-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
486 // NOINFS-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
487 // NOINFS-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
488 // NOINFS-NEXT: store float [[A_REAL]], ptr [[COERCE_REALP]], align 4
489 // NOINFS-NEXT: store float [[A_IMAG]], ptr [[COERCE_IMAGP]], align 4
490 // NOINFS-NEXT: [[TMP2:%.*]] = load <2 x float>, ptr [[COERCE]], align 4
491 // NOINFS-NEXT: [[COERCE1_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
492 // NOINFS-NEXT: [[COERCE1_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
493 // NOINFS-NEXT: store double [[B_REAL]], ptr [[COERCE1_REALP]], align 8
494 // NOINFS-NEXT: store double [[B_IMAG]], ptr [[COERCE1_IMAGP]], align 8
495 // NOINFS-NEXT: [[TMP3:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 0
496 // NOINFS-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
497 // NOINFS-NEXT: [[TMP5:%.*]] = getelementptr inbounds { double, double }, ptr [[COERCE1]], i32 0, i32 1
498 // NOINFS-NEXT: [[TMP6:%.*]] = load double, ptr [[TMP5]], align 8
499 // NOINFS-NEXT: [[COERCE2_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 0
500 // NOINFS-NEXT: [[COERCE2_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE2]], i32 0, i32 1
501 // NOINFS-NEXT: store half [[C_REAL]], ptr [[COERCE2_REALP]], align 2
502 // NOINFS-NEXT: store half [[C_IMAG]], ptr [[COERCE2_IMAGP]], align 2
503 // NOINFS-NEXT: [[TMP7:%.*]] = load <2 x half>, ptr [[COERCE2]], align 2
504 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) <2 x float> @extern_complex(<2 x float> noundef nofpclass(inf) [[TMP2]], double noundef nofpclass(inf) [[TMP4]], double noundef nofpclass(inf) [[TMP6]], <2 x half> noundef nofpclass(inf) [[TMP7]])
505 // NOINFS-NEXT: store <2 x float> [[CALL]], ptr [[COERCE3]], align 4
506 // NOINFS-NEXT: [[COERCE3_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 0
507 // NOINFS-NEXT: [[COERCE3_REAL:%.*]] = load float, ptr [[COERCE3_REALP]], align 4
508 // NOINFS-NEXT: [[COERCE3_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE3]], i32 0, i32 1
509 // NOINFS-NEXT: [[COERCE3_IMAG:%.*]] = load float, ptr [[COERCE3_IMAGP]], align 4
510 // NOINFS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 0
511 // NOINFS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 1
512 // NOINFS-NEXT: store float [[COERCE3_REAL]], ptr [[RETVAL_REALP]], align 4
513 // NOINFS-NEXT: store float [[COERCE3_IMAG]], ptr [[RETVAL_IMAGP]], align 4
514 // NOINFS-NEXT: [[TMP8:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4
515 // NOINFS-NEXT: ret <2 x float> [[TMP8]]
517 _Complex float defined_complex_func(_Complex float a, _Complex double b, _Complex _Float16 c) {
518 return extern_complex(a, b, c);
521 // CFINITEONLY: Function Attrs: noinline nounwind optnone
522 // CFINITEONLY-LABEL: define dso_local { double, double } @defined_complex_func_f64_ret
523 // CFINITEONLY-SAME: (double noundef nofpclass(nan inf) [[C_COERCE0:%.*]], double noundef nofpclass(nan inf) [[C_COERCE1:%.*]]) #[[ATTR0]] {
524 // CFINITEONLY-NEXT: entry:
525 // CFINITEONLY-NEXT: [[RETVAL:%.*]] = alloca { double, double }, align 8
526 // CFINITEONLY-NEXT: [[C:%.*]] = alloca { double, double }, align 8
527 // CFINITEONLY-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
528 // CFINITEONLY-NEXT: store double [[C_COERCE0]], ptr [[TMP0]], align 8
529 // CFINITEONLY-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
530 // CFINITEONLY-NEXT: store double [[C_COERCE1]], ptr [[TMP1]], align 8
531 // CFINITEONLY-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
532 // CFINITEONLY-NEXT: [[C_REAL:%.*]] = load double, ptr [[C_REALP]], align 8
533 // CFINITEONLY-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
534 // CFINITEONLY-NEXT: [[C_IMAG:%.*]] = load double, ptr [[C_IMAGP]], align 8
535 // CFINITEONLY-NEXT: [[C_REALP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
536 // CFINITEONLY-NEXT: [[C_REAL2:%.*]] = load double, ptr [[C_REALP1]], align 8
537 // CFINITEONLY-NEXT: [[C_IMAGP3:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
538 // CFINITEONLY-NEXT: [[C_IMAG4:%.*]] = load double, ptr [[C_IMAGP3]], align 8
539 // CFINITEONLY-NEXT: [[MUL_AC:%.*]] = fmul nnan ninf double [[C_REAL]], [[C_REAL2]]
540 // CFINITEONLY-NEXT: [[MUL_BD:%.*]] = fmul nnan ninf double [[C_IMAG]], [[C_IMAG4]]
541 // CFINITEONLY-NEXT: [[MUL_AD:%.*]] = fmul nnan ninf double [[C_REAL]], [[C_IMAG4]]
542 // CFINITEONLY-NEXT: [[MUL_BC:%.*]] = fmul nnan ninf double [[C_IMAG]], [[C_REAL2]]
543 // CFINITEONLY-NEXT: [[MUL_R:%.*]] = fsub nnan ninf double [[MUL_AC]], [[MUL_BD]]
544 // CFINITEONLY-NEXT: [[MUL_I:%.*]] = fadd nnan ninf double [[MUL_AD]], [[MUL_BC]]
545 // CFINITEONLY-NEXT: [[ISNAN_CMP:%.*]] = fcmp nnan ninf uno double [[MUL_R]], [[MUL_R]]
546 // CFINITEONLY-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2:![0-9]+]]
547 // CFINITEONLY: complex_mul_imag_nan:
548 // CFINITEONLY-NEXT: [[ISNAN_CMP5:%.*]] = fcmp nnan ninf uno double [[MUL_I]], [[MUL_I]]
549 // CFINITEONLY-NEXT: br i1 [[ISNAN_CMP5]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
550 // CFINITEONLY: complex_mul_libcall:
551 // CFINITEONLY-NEXT: [[CALL:%.*]] = call { double, double } @__muldc3(double noundef nofpclass(nan inf) [[C_REAL]], double noundef nofpclass(nan inf) [[C_IMAG]], double noundef nofpclass(nan inf) [[C_REAL2]], double noundef nofpclass(nan inf) [[C_IMAG4]]) #[[ATTR7:[0-9]+]]
552 // CFINITEONLY-NEXT: [[TMP2:%.*]] = extractvalue { double, double } [[CALL]], 0
553 // CFINITEONLY-NEXT: [[TMP3:%.*]] = extractvalue { double, double } [[CALL]], 1
554 // CFINITEONLY-NEXT: br label [[COMPLEX_MUL_CONT]]
555 // CFINITEONLY: complex_mul_cont:
556 // CFINITEONLY-NEXT: [[REAL_MUL_PHI:%.*]] = phi nnan ninf double [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP2]], [[COMPLEX_MUL_LIBCALL]] ]
557 // CFINITEONLY-NEXT: [[IMAG_MUL_PHI:%.*]] = phi nnan ninf double [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP3]], [[COMPLEX_MUL_LIBCALL]] ]
558 // CFINITEONLY-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 0
559 // CFINITEONLY-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 1
560 // CFINITEONLY-NEXT: store double [[REAL_MUL_PHI]], ptr [[RETVAL_REALP]], align 8
561 // CFINITEONLY-NEXT: store double [[IMAG_MUL_PHI]], ptr [[RETVAL_IMAGP]], align 8
562 // CFINITEONLY-NEXT: [[TMP4:%.*]] = load { double, double }, ptr [[RETVAL]], align 8
563 // CFINITEONLY-NEXT: ret { double, double } [[TMP4]]
565 // CLFINITEONLY: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
566 // CLFINITEONLY-LABEL: define dso_local { double, double } @defined_complex_func_f64_ret
567 // CLFINITEONLY-SAME: (double noundef nofpclass(nan inf) [[C_COERCE0:%.*]], double noundef nofpclass(nan inf) [[C_COERCE1:%.*]]) local_unnamed_addr #[[ATTR0]] {
568 // CLFINITEONLY-NEXT: entry:
569 // CLFINITEONLY-NEXT: [[MUL_AD:%.*]] = fmul nnan ninf double [[C_COERCE0]], [[C_COERCE1]]
570 // CLFINITEONLY-NEXT: [[MUL_I:%.*]] = fadd nnan ninf double [[MUL_AD]], [[MUL_AD]]
571 // CLFINITEONLY-NEXT: [[MUL_AC:%.*]] = fmul nnan ninf double [[C_COERCE0]], [[C_COERCE0]]
572 // CLFINITEONLY-NEXT: [[MUL_BD:%.*]] = fmul nnan ninf double [[C_COERCE1]], [[C_COERCE1]]
573 // CLFINITEONLY-NEXT: [[MUL_R:%.*]] = fsub nnan ninf double [[MUL_AC]], [[MUL_BD]]
574 // CLFINITEONLY-NEXT: [[DOTFCA_0_INSERT:%.*]] = insertvalue { double, double } poison, double [[MUL_R]], 0
575 // CLFINITEONLY-NEXT: [[DOTFCA_1_INSERT:%.*]] = insertvalue { double, double } [[DOTFCA_0_INSERT]], double [[MUL_I]], 1
576 // CLFINITEONLY-NEXT: ret { double, double } [[DOTFCA_1_INSERT]]
578 // NONANS: Function Attrs: noinline nounwind optnone
579 // NONANS-LABEL: define dso_local { double, double } @defined_complex_func_f64_ret
580 // NONANS-SAME: (double noundef nofpclass(nan) [[C_COERCE0:%.*]], double noundef nofpclass(nan) [[C_COERCE1:%.*]]) #[[ATTR0]] {
581 // NONANS-NEXT: entry:
582 // NONANS-NEXT: [[RETVAL:%.*]] = alloca { double, double }, align 8
583 // NONANS-NEXT: [[C:%.*]] = alloca { double, double }, align 8
584 // NONANS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
585 // NONANS-NEXT: store double [[C_COERCE0]], ptr [[TMP0]], align 8
586 // NONANS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
587 // NONANS-NEXT: store double [[C_COERCE1]], ptr [[TMP1]], align 8
588 // NONANS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
589 // NONANS-NEXT: [[C_REAL:%.*]] = load double, ptr [[C_REALP]], align 8
590 // NONANS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
591 // NONANS-NEXT: [[C_IMAG:%.*]] = load double, ptr [[C_IMAGP]], align 8
592 // NONANS-NEXT: [[C_REALP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
593 // NONANS-NEXT: [[C_REAL2:%.*]] = load double, ptr [[C_REALP1]], align 8
594 // NONANS-NEXT: [[C_IMAGP3:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
595 // NONANS-NEXT: [[C_IMAG4:%.*]] = load double, ptr [[C_IMAGP3]], align 8
596 // NONANS-NEXT: [[MUL_AC:%.*]] = fmul nnan double [[C_REAL]], [[C_REAL2]]
597 // NONANS-NEXT: [[MUL_BD:%.*]] = fmul nnan double [[C_IMAG]], [[C_IMAG4]]
598 // NONANS-NEXT: [[MUL_AD:%.*]] = fmul nnan double [[C_REAL]], [[C_IMAG4]]
599 // NONANS-NEXT: [[MUL_BC:%.*]] = fmul nnan double [[C_IMAG]], [[C_REAL2]]
600 // NONANS-NEXT: [[MUL_R:%.*]] = fsub nnan double [[MUL_AC]], [[MUL_BD]]
601 // NONANS-NEXT: [[MUL_I:%.*]] = fadd nnan double [[MUL_AD]], [[MUL_BC]]
602 // NONANS-NEXT: [[ISNAN_CMP:%.*]] = fcmp nnan uno double [[MUL_R]], [[MUL_R]]
603 // NONANS-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2:![0-9]+]]
604 // NONANS: complex_mul_imag_nan:
605 // NONANS-NEXT: [[ISNAN_CMP5:%.*]] = fcmp nnan uno double [[MUL_I]], [[MUL_I]]
606 // NONANS-NEXT: br i1 [[ISNAN_CMP5]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
607 // NONANS: complex_mul_libcall:
608 // NONANS-NEXT: [[CALL:%.*]] = call { double, double } @__muldc3(double noundef nofpclass(nan) [[C_REAL]], double noundef nofpclass(nan) [[C_IMAG]], double noundef nofpclass(nan) [[C_REAL2]], double noundef nofpclass(nan) [[C_IMAG4]]) #[[ATTR7:[0-9]+]]
609 // NONANS-NEXT: [[TMP2:%.*]] = extractvalue { double, double } [[CALL]], 0
610 // NONANS-NEXT: [[TMP3:%.*]] = extractvalue { double, double } [[CALL]], 1
611 // NONANS-NEXT: br label [[COMPLEX_MUL_CONT]]
612 // NONANS: complex_mul_cont:
613 // NONANS-NEXT: [[REAL_MUL_PHI:%.*]] = phi nnan double [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP2]], [[COMPLEX_MUL_LIBCALL]] ]
614 // NONANS-NEXT: [[IMAG_MUL_PHI:%.*]] = phi nnan double [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP3]], [[COMPLEX_MUL_LIBCALL]] ]
615 // NONANS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 0
616 // NONANS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 1
617 // NONANS-NEXT: store double [[REAL_MUL_PHI]], ptr [[RETVAL_REALP]], align 8
618 // NONANS-NEXT: store double [[IMAG_MUL_PHI]], ptr [[RETVAL_IMAGP]], align 8
619 // NONANS-NEXT: [[TMP4:%.*]] = load { double, double }, ptr [[RETVAL]], align 8
620 // NONANS-NEXT: ret { double, double } [[TMP4]]
622 // NOINFS: Function Attrs: noinline nounwind optnone
623 // NOINFS-LABEL: define dso_local { double, double } @defined_complex_func_f64_ret
624 // NOINFS-SAME: (double noundef nofpclass(inf) [[C_COERCE0:%.*]], double noundef nofpclass(inf) [[C_COERCE1:%.*]]) #[[ATTR0]] {
625 // NOINFS-NEXT: entry:
626 // NOINFS-NEXT: [[RETVAL:%.*]] = alloca { double, double }, align 8
627 // NOINFS-NEXT: [[C:%.*]] = alloca { double, double }, align 8
628 // NOINFS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
629 // NOINFS-NEXT: store double [[C_COERCE0]], ptr [[TMP0]], align 8
630 // NOINFS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
631 // NOINFS-NEXT: store double [[C_COERCE1]], ptr [[TMP1]], align 8
632 // NOINFS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
633 // NOINFS-NEXT: [[C_REAL:%.*]] = load double, ptr [[C_REALP]], align 8
634 // NOINFS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
635 // NOINFS-NEXT: [[C_IMAG:%.*]] = load double, ptr [[C_IMAGP]], align 8
636 // NOINFS-NEXT: [[C_REALP1:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 0
637 // NOINFS-NEXT: [[C_REAL2:%.*]] = load double, ptr [[C_REALP1]], align 8
638 // NOINFS-NEXT: [[C_IMAGP3:%.*]] = getelementptr inbounds { double, double }, ptr [[C]], i32 0, i32 1
639 // NOINFS-NEXT: [[C_IMAG4:%.*]] = load double, ptr [[C_IMAGP3]], align 8
640 // NOINFS-NEXT: [[MUL_AC:%.*]] = fmul ninf double [[C_REAL]], [[C_REAL2]]
641 // NOINFS-NEXT: [[MUL_BD:%.*]] = fmul ninf double [[C_IMAG]], [[C_IMAG4]]
642 // NOINFS-NEXT: [[MUL_AD:%.*]] = fmul ninf double [[C_REAL]], [[C_IMAG4]]
643 // NOINFS-NEXT: [[MUL_BC:%.*]] = fmul ninf double [[C_IMAG]], [[C_REAL2]]
644 // NOINFS-NEXT: [[MUL_R:%.*]] = fsub ninf double [[MUL_AC]], [[MUL_BD]]
645 // NOINFS-NEXT: [[MUL_I:%.*]] = fadd ninf double [[MUL_AD]], [[MUL_BC]]
646 // NOINFS-NEXT: [[ISNAN_CMP:%.*]] = fcmp ninf uno double [[MUL_R]], [[MUL_R]]
647 // NOINFS-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2:![0-9]+]]
648 // NOINFS: complex_mul_imag_nan:
649 // NOINFS-NEXT: [[ISNAN_CMP5:%.*]] = fcmp ninf uno double [[MUL_I]], [[MUL_I]]
650 // NOINFS-NEXT: br i1 [[ISNAN_CMP5]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
651 // NOINFS: complex_mul_libcall:
652 // NOINFS-NEXT: [[CALL:%.*]] = call { double, double } @__muldc3(double noundef nofpclass(inf) [[C_REAL]], double noundef nofpclass(inf) [[C_IMAG]], double noundef nofpclass(inf) [[C_REAL2]], double noundef nofpclass(inf) [[C_IMAG4]]) #[[ATTR7:[0-9]+]]
653 // NOINFS-NEXT: [[TMP2:%.*]] = extractvalue { double, double } [[CALL]], 0
654 // NOINFS-NEXT: [[TMP3:%.*]] = extractvalue { double, double } [[CALL]], 1
655 // NOINFS-NEXT: br label [[COMPLEX_MUL_CONT]]
656 // NOINFS: complex_mul_cont:
657 // NOINFS-NEXT: [[REAL_MUL_PHI:%.*]] = phi ninf double [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP2]], [[COMPLEX_MUL_LIBCALL]] ]
658 // NOINFS-NEXT: [[IMAG_MUL_PHI:%.*]] = phi ninf double [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[TMP3]], [[COMPLEX_MUL_LIBCALL]] ]
659 // NOINFS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 0
660 // NOINFS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[RETVAL]], i32 0, i32 1
661 // NOINFS-NEXT: store double [[REAL_MUL_PHI]], ptr [[RETVAL_REALP]], align 8
662 // NOINFS-NEXT: store double [[IMAG_MUL_PHI]], ptr [[RETVAL_IMAGP]], align 8
663 // NOINFS-NEXT: [[TMP4:%.*]] = load { double, double }, ptr [[RETVAL]], align 8
664 // NOINFS-NEXT: ret { double, double } [[TMP4]]
666 _Complex double defined_complex_func_f64_ret(_Complex double c) {
667 return c * c;
670 // CFINITEONLY: Function Attrs: noinline nounwind optnone
671 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x half> @defined_complex_func_f16_ret
672 // CFINITEONLY-SAME: (<2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) #[[ATTR4]] {
673 // CFINITEONLY-NEXT: entry:
674 // CFINITEONLY-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
675 // CFINITEONLY-NEXT: [[C:%.*]] = alloca { half, half }, align 2
676 // CFINITEONLY-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
677 // CFINITEONLY-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
678 // CFINITEONLY-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
679 // CFINITEONLY-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
680 // CFINITEONLY-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
681 // CFINITEONLY-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
682 // CFINITEONLY-NEXT: [[EXT:%.*]] = fpext half [[C_REAL]] to float
683 // CFINITEONLY-NEXT: [[EXT1:%.*]] = fpext half [[C_IMAG]] to float
684 // CFINITEONLY-NEXT: [[C_REALP2:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
685 // CFINITEONLY-NEXT: [[C_REAL3:%.*]] = load half, ptr [[C_REALP2]], align 2
686 // CFINITEONLY-NEXT: [[C_IMAGP4:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
687 // CFINITEONLY-NEXT: [[C_IMAG5:%.*]] = load half, ptr [[C_IMAGP4]], align 2
688 // CFINITEONLY-NEXT: [[EXT6:%.*]] = fpext half [[C_REAL3]] to float
689 // CFINITEONLY-NEXT: [[EXT7:%.*]] = fpext half [[C_IMAG5]] to float
690 // CFINITEONLY-NEXT: [[MUL_AC:%.*]] = fmul nnan ninf float [[EXT]], [[EXT6]]
691 // CFINITEONLY-NEXT: [[MUL_BD:%.*]] = fmul nnan ninf float [[EXT1]], [[EXT7]]
692 // CFINITEONLY-NEXT: [[MUL_AD:%.*]] = fmul nnan ninf float [[EXT]], [[EXT7]]
693 // CFINITEONLY-NEXT: [[MUL_BC:%.*]] = fmul nnan ninf float [[EXT1]], [[EXT6]]
694 // CFINITEONLY-NEXT: [[MUL_R:%.*]] = fsub nnan ninf float [[MUL_AC]], [[MUL_BD]]
695 // CFINITEONLY-NEXT: [[MUL_I:%.*]] = fadd nnan ninf float [[MUL_AD]], [[MUL_BC]]
696 // CFINITEONLY-NEXT: [[ISNAN_CMP:%.*]] = fcmp nnan ninf uno float [[MUL_R]], [[MUL_R]]
697 // CFINITEONLY-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2]]
698 // CFINITEONLY: complex_mul_imag_nan:
699 // CFINITEONLY-NEXT: [[ISNAN_CMP8:%.*]] = fcmp nnan ninf uno float [[MUL_I]], [[MUL_I]]
700 // CFINITEONLY-NEXT: br i1 [[ISNAN_CMP8]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
701 // CFINITEONLY: complex_mul_libcall:
702 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) <2 x float> @__mulsc3(float noundef nofpclass(nan inf) [[EXT]], float noundef nofpclass(nan inf) [[EXT1]], float noundef nofpclass(nan inf) [[EXT6]], float noundef nofpclass(nan inf) [[EXT7]]) #[[ATTR7]]
703 // CFINITEONLY-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
704 // CFINITEONLY-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
705 // CFINITEONLY-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
706 // CFINITEONLY-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
707 // CFINITEONLY-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
708 // CFINITEONLY-NEXT: br label [[COMPLEX_MUL_CONT]]
709 // CFINITEONLY: complex_mul_cont:
710 // CFINITEONLY-NEXT: [[REAL_MUL_PHI:%.*]] = phi nnan ninf float [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_REAL]], [[COMPLEX_MUL_LIBCALL]] ]
711 // CFINITEONLY-NEXT: [[IMAG_MUL_PHI:%.*]] = phi nnan ninf float [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_IMAG]], [[COMPLEX_MUL_LIBCALL]] ]
712 // CFINITEONLY-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[REAL_MUL_PHI]] to half
713 // CFINITEONLY-NEXT: [[UNPROMOTION9:%.*]] = fptrunc float [[IMAG_MUL_PHI]] to half
714 // CFINITEONLY-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 0
715 // CFINITEONLY-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 1
716 // CFINITEONLY-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
717 // CFINITEONLY-NEXT: store half [[UNPROMOTION9]], ptr [[RETVAL_IMAGP]], align 2
718 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
719 // CFINITEONLY-NEXT: ret <2 x half> [[TMP0]]
721 // CLFINITEONLY: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
722 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <2 x half> @defined_complex_func_f16_ret
723 // CLFINITEONLY-SAME: (<2 x half> noundef nofpclass(nan inf) [[C_COERCE:%.*]]) local_unnamed_addr #[[ATTR7:[0-9]+]] {
724 // CLFINITEONLY-NEXT: entry:
725 // CLFINITEONLY-NEXT: [[C_SROA_0_0_VEC_EXTRACT:%.*]] = extractelement <2 x half> [[C_COERCE]], i64 0
726 // CLFINITEONLY-NEXT: [[EXT:%.*]] = fpext half [[C_SROA_0_0_VEC_EXTRACT]] to float
727 // CLFINITEONLY-NEXT: [[C_SROA_0_2_VEC_EXTRACT:%.*]] = extractelement <2 x half> [[C_COERCE]], i64 1
728 // CLFINITEONLY-NEXT: [[EXT1:%.*]] = fpext half [[C_SROA_0_2_VEC_EXTRACT]] to float
729 // CLFINITEONLY-NEXT: [[MUL_AD:%.*]] = fmul nnan ninf float [[EXT]], [[EXT1]]
730 // CLFINITEONLY-NEXT: [[MUL_I:%.*]] = fadd nnan ninf float [[MUL_AD]], [[MUL_AD]]
731 // CLFINITEONLY-NEXT: [[MUL_AC:%.*]] = fmul nnan ninf float [[EXT]], [[EXT]]
732 // CLFINITEONLY-NEXT: [[MUL_BD:%.*]] = fmul nnan ninf float [[EXT1]], [[EXT1]]
733 // CLFINITEONLY-NEXT: [[MUL_R:%.*]] = fsub nnan ninf float [[MUL_AC]], [[MUL_BD]]
734 // CLFINITEONLY-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[MUL_R]] to half
735 // CLFINITEONLY-NEXT: [[UNPROMOTION9:%.*]] = fptrunc float [[MUL_I]] to half
736 // CLFINITEONLY-NEXT: [[RETVAL_SROA_0_0_VEC_INSERT:%.*]] = insertelement <2 x half> undef, half [[UNPROMOTION]], i64 0
737 // CLFINITEONLY-NEXT: [[RETVAL_SROA_0_2_VEC_INSERT:%.*]] = insertelement <2 x half> [[RETVAL_SROA_0_0_VEC_INSERT]], half [[UNPROMOTION9]], i64 1
738 // CLFINITEONLY-NEXT: ret <2 x half> [[RETVAL_SROA_0_2_VEC_INSERT]]
740 // NONANS: Function Attrs: noinline nounwind optnone
741 // NONANS-LABEL: define dso_local nofpclass(nan) <2 x half> @defined_complex_func_f16_ret
742 // NONANS-SAME: (<2 x half> noundef nofpclass(nan) [[C_COERCE:%.*]]) #[[ATTR4]] {
743 // NONANS-NEXT: entry:
744 // NONANS-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
745 // NONANS-NEXT: [[C:%.*]] = alloca { half, half }, align 2
746 // NONANS-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
747 // NONANS-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
748 // NONANS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
749 // NONANS-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
750 // NONANS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
751 // NONANS-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
752 // NONANS-NEXT: [[EXT:%.*]] = fpext half [[C_REAL]] to float
753 // NONANS-NEXT: [[EXT1:%.*]] = fpext half [[C_IMAG]] to float
754 // NONANS-NEXT: [[C_REALP2:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
755 // NONANS-NEXT: [[C_REAL3:%.*]] = load half, ptr [[C_REALP2]], align 2
756 // NONANS-NEXT: [[C_IMAGP4:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
757 // NONANS-NEXT: [[C_IMAG5:%.*]] = load half, ptr [[C_IMAGP4]], align 2
758 // NONANS-NEXT: [[EXT6:%.*]] = fpext half [[C_REAL3]] to float
759 // NONANS-NEXT: [[EXT7:%.*]] = fpext half [[C_IMAG5]] to float
760 // NONANS-NEXT: [[MUL_AC:%.*]] = fmul nnan float [[EXT]], [[EXT6]]
761 // NONANS-NEXT: [[MUL_BD:%.*]] = fmul nnan float [[EXT1]], [[EXT7]]
762 // NONANS-NEXT: [[MUL_AD:%.*]] = fmul nnan float [[EXT]], [[EXT7]]
763 // NONANS-NEXT: [[MUL_BC:%.*]] = fmul nnan float [[EXT1]], [[EXT6]]
764 // NONANS-NEXT: [[MUL_R:%.*]] = fsub nnan float [[MUL_AC]], [[MUL_BD]]
765 // NONANS-NEXT: [[MUL_I:%.*]] = fadd nnan float [[MUL_AD]], [[MUL_BC]]
766 // NONANS-NEXT: [[ISNAN_CMP:%.*]] = fcmp nnan uno float [[MUL_R]], [[MUL_R]]
767 // NONANS-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2]]
768 // NONANS: complex_mul_imag_nan:
769 // NONANS-NEXT: [[ISNAN_CMP8:%.*]] = fcmp nnan uno float [[MUL_I]], [[MUL_I]]
770 // NONANS-NEXT: br i1 [[ISNAN_CMP8]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
771 // NONANS: complex_mul_libcall:
772 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) <2 x float> @__mulsc3(float noundef nofpclass(nan) [[EXT]], float noundef nofpclass(nan) [[EXT1]], float noundef nofpclass(nan) [[EXT6]], float noundef nofpclass(nan) [[EXT7]]) #[[ATTR7]]
773 // NONANS-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
774 // NONANS-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
775 // NONANS-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
776 // NONANS-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
777 // NONANS-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
778 // NONANS-NEXT: br label [[COMPLEX_MUL_CONT]]
779 // NONANS: complex_mul_cont:
780 // NONANS-NEXT: [[REAL_MUL_PHI:%.*]] = phi nnan float [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_REAL]], [[COMPLEX_MUL_LIBCALL]] ]
781 // NONANS-NEXT: [[IMAG_MUL_PHI:%.*]] = phi nnan float [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_IMAG]], [[COMPLEX_MUL_LIBCALL]] ]
782 // NONANS-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[REAL_MUL_PHI]] to half
783 // NONANS-NEXT: [[UNPROMOTION9:%.*]] = fptrunc float [[IMAG_MUL_PHI]] to half
784 // NONANS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 0
785 // NONANS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 1
786 // NONANS-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
787 // NONANS-NEXT: store half [[UNPROMOTION9]], ptr [[RETVAL_IMAGP]], align 2
788 // NONANS-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
789 // NONANS-NEXT: ret <2 x half> [[TMP0]]
791 // NOINFS: Function Attrs: noinline nounwind optnone
792 // NOINFS-LABEL: define dso_local nofpclass(inf) <2 x half> @defined_complex_func_f16_ret
793 // NOINFS-SAME: (<2 x half> noundef nofpclass(inf) [[C_COERCE:%.*]]) #[[ATTR4]] {
794 // NOINFS-NEXT: entry:
795 // NOINFS-NEXT: [[RETVAL:%.*]] = alloca { half, half }, align 2
796 // NOINFS-NEXT: [[C:%.*]] = alloca { half, half }, align 2
797 // NOINFS-NEXT: [[COERCE:%.*]] = alloca { float, float }, align 4
798 // NOINFS-NEXT: store <2 x half> [[C_COERCE]], ptr [[C]], align 2
799 // NOINFS-NEXT: [[C_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
800 // NOINFS-NEXT: [[C_REAL:%.*]] = load half, ptr [[C_REALP]], align 2
801 // NOINFS-NEXT: [[C_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
802 // NOINFS-NEXT: [[C_IMAG:%.*]] = load half, ptr [[C_IMAGP]], align 2
803 // NOINFS-NEXT: [[EXT:%.*]] = fpext half [[C_REAL]] to float
804 // NOINFS-NEXT: [[EXT1:%.*]] = fpext half [[C_IMAG]] to float
805 // NOINFS-NEXT: [[C_REALP2:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 0
806 // NOINFS-NEXT: [[C_REAL3:%.*]] = load half, ptr [[C_REALP2]], align 2
807 // NOINFS-NEXT: [[C_IMAGP4:%.*]] = getelementptr inbounds { half, half }, ptr [[C]], i32 0, i32 1
808 // NOINFS-NEXT: [[C_IMAG5:%.*]] = load half, ptr [[C_IMAGP4]], align 2
809 // NOINFS-NEXT: [[EXT6:%.*]] = fpext half [[C_REAL3]] to float
810 // NOINFS-NEXT: [[EXT7:%.*]] = fpext half [[C_IMAG5]] to float
811 // NOINFS-NEXT: [[MUL_AC:%.*]] = fmul ninf float [[EXT]], [[EXT6]]
812 // NOINFS-NEXT: [[MUL_BD:%.*]] = fmul ninf float [[EXT1]], [[EXT7]]
813 // NOINFS-NEXT: [[MUL_AD:%.*]] = fmul ninf float [[EXT]], [[EXT7]]
814 // NOINFS-NEXT: [[MUL_BC:%.*]] = fmul ninf float [[EXT1]], [[EXT6]]
815 // NOINFS-NEXT: [[MUL_R:%.*]] = fsub ninf float [[MUL_AC]], [[MUL_BD]]
816 // NOINFS-NEXT: [[MUL_I:%.*]] = fadd ninf float [[MUL_AD]], [[MUL_BC]]
817 // NOINFS-NEXT: [[ISNAN_CMP:%.*]] = fcmp ninf uno float [[MUL_R]], [[MUL_R]]
818 // NOINFS-NEXT: br i1 [[ISNAN_CMP]], label [[COMPLEX_MUL_IMAG_NAN:%.*]], label [[COMPLEX_MUL_CONT:%.*]], !prof [[PROF2]]
819 // NOINFS: complex_mul_imag_nan:
820 // NOINFS-NEXT: [[ISNAN_CMP8:%.*]] = fcmp ninf uno float [[MUL_I]], [[MUL_I]]
821 // NOINFS-NEXT: br i1 [[ISNAN_CMP8]], label [[COMPLEX_MUL_LIBCALL:%.*]], label [[COMPLEX_MUL_CONT]], !prof [[PROF2]]
822 // NOINFS: complex_mul_libcall:
823 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) <2 x float> @__mulsc3(float noundef nofpclass(inf) [[EXT]], float noundef nofpclass(inf) [[EXT1]], float noundef nofpclass(inf) [[EXT6]], float noundef nofpclass(inf) [[EXT7]]) #[[ATTR7]]
824 // NOINFS-NEXT: store <2 x float> [[CALL]], ptr [[COERCE]], align 4
825 // NOINFS-NEXT: [[COERCE_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 0
826 // NOINFS-NEXT: [[COERCE_REAL:%.*]] = load float, ptr [[COERCE_REALP]], align 4
827 // NOINFS-NEXT: [[COERCE_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE]], i32 0, i32 1
828 // NOINFS-NEXT: [[COERCE_IMAG:%.*]] = load float, ptr [[COERCE_IMAGP]], align 4
829 // NOINFS-NEXT: br label [[COMPLEX_MUL_CONT]]
830 // NOINFS: complex_mul_cont:
831 // NOINFS-NEXT: [[REAL_MUL_PHI:%.*]] = phi ninf float [ [[MUL_R]], [[ENTRY:%.*]] ], [ [[MUL_R]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_REAL]], [[COMPLEX_MUL_LIBCALL]] ]
832 // NOINFS-NEXT: [[IMAG_MUL_PHI:%.*]] = phi ninf float [ [[MUL_I]], [[ENTRY]] ], [ [[MUL_I]], [[COMPLEX_MUL_IMAG_NAN]] ], [ [[COERCE_IMAG]], [[COMPLEX_MUL_LIBCALL]] ]
833 // NOINFS-NEXT: [[UNPROMOTION:%.*]] = fptrunc float [[REAL_MUL_PHI]] to half
834 // NOINFS-NEXT: [[UNPROMOTION9:%.*]] = fptrunc float [[IMAG_MUL_PHI]] to half
835 // NOINFS-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 0
836 // NOINFS-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[RETVAL]], i32 0, i32 1
837 // NOINFS-NEXT: store half [[UNPROMOTION]], ptr [[RETVAL_REALP]], align 2
838 // NOINFS-NEXT: store half [[UNPROMOTION9]], ptr [[RETVAL_IMAGP]], align 2
839 // NOINFS-NEXT: [[TMP0:%.*]] = load <2 x half>, ptr [[RETVAL]], align 2
840 // NOINFS-NEXT: ret <2 x half> [[TMP0]]
842 _Complex _Float16 defined_complex_func_f16_ret(_Complex _Float16 c) {
843 return c * c;
846 // CFINITEONLY: Function Attrs: noinline nounwind optnone
847 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_variadic
848 // CFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[F32:%.*]], double noundef nofpclass(nan inf) [[F64:%.*]], half noundef nofpclass(nan inf) [[F16:%.*]], double noundef nofpclass(nan inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
849 // CFINITEONLY-NEXT: entry:
850 // CFINITEONLY-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
851 // CFINITEONLY-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
852 // CFINITEONLY-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
853 // CFINITEONLY-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
854 // CFINITEONLY-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
855 // CFINITEONLY-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
856 // CFINITEONLY-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
857 // CFINITEONLY-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
858 // CFINITEONLY-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
859 // CFINITEONLY-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
860 // CFINITEONLY-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
861 // CFINITEONLY-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
862 // CFINITEONLY-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
863 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
864 // CFINITEONLY-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
865 // CFINITEONLY-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
866 // CFINITEONLY-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
867 // CFINITEONLY-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
868 // CFINITEONLY-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
869 // CFINITEONLY-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
870 // CFINITEONLY-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
871 // CFINITEONLY-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
872 // CFINITEONLY-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
873 // CFINITEONLY-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
874 // CFINITEONLY-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
875 // CFINITEONLY-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
876 // CFINITEONLY-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
877 // CFINITEONLY-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
878 // CFINITEONLY-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
879 // CFINITEONLY-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
880 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load float, ptr [[F32_ADDR]], align 4
881 // CFINITEONLY-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
882 // CFINITEONLY-NEXT: [[CONV:%.*]] = fpext float [[TMP3]] to double
883 // CFINITEONLY-NEXT: [[TMP4:%.*]] = load double, ptr [[F64_ADDR]], align 8
884 // CFINITEONLY-NEXT: [[TMP5:%.*]] = load half, ptr [[F16_ADDR]], align 2
885 // CFINITEONLY-NEXT: [[TMP6:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
886 // CFINITEONLY-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
887 // CFINITEONLY-NEXT: [[TMP8:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
888 // CFINITEONLY-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
889 // CFINITEONLY-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
890 // CFINITEONLY-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
891 // CFINITEONLY-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
892 // CFINITEONLY-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
893 // CFINITEONLY-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
894 // CFINITEONLY-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
895 // CFINITEONLY-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
896 // CFINITEONLY-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
897 // CFINITEONLY-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
898 // CFINITEONLY-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
899 // CFINITEONLY-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
900 // CFINITEONLY-NEXT: store <2 x float> [[TMP6]], ptr [[COERCE]], align 8
901 // CFINITEONLY-NEXT: [[TMP9:%.*]] = load double, ptr [[COERCE]], align 8
902 // CFINITEONLY-NEXT: store <2 x half> [[TMP8]], ptr [[COERCE3]], align 4
903 // CFINITEONLY-NEXT: [[TMP10:%.*]] = load i32, ptr [[COERCE3]], align 4
904 // CFINITEONLY-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
905 // CFINITEONLY-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
906 // CFINITEONLY-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
907 // CFINITEONLY-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
908 // CFINITEONLY-NEXT: [[TMP11:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
909 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
910 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
911 // CFINITEONLY-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
912 // CFINITEONLY-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
913 // CFINITEONLY-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
914 // CFINITEONLY-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
915 // CFINITEONLY-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
916 // CFINITEONLY-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
917 // CFINITEONLY-NEXT: [[TMP12:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
918 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) float (float, ...) @variadic(float noundef nofpclass(nan inf) [[TMP2]], double noundef nofpclass(nan inf) [[CONV]], double noundef nofpclass(nan inf) [[TMP4]], half noundef nofpclass(nan inf) [[TMP5]], double noundef nofpclass(nan inf) [[TMP9]], <2 x double> noundef nofpclass(nan inf) [[TMP7]], i32 noundef [[TMP10]], <2 x float> noundef nofpclass(nan inf) [[TMP11]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan inf) [[TMP12]])
919 // CFINITEONLY-NEXT: ret float [[CALL]]
921 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
922 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_variadic
923 // CLFINITEONLY-SAME: (float noundef nofpclass(nan inf) [[F32:%.*]], double noundef nofpclass(nan inf) [[F64:%.*]], half noundef nofpclass(nan inf) [[F16:%.*]], double noundef nofpclass(nan inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE1:%.*]], ptr nocapture noundef readonly byval({ half, half }) align 8 [[CF16:%.*]]) local_unnamed_addr #[[ATTR5]] {
924 // CLFINITEONLY-NEXT: entry:
925 // CLFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
926 // CLFINITEONLY-NEXT: [[CONV:%.*]] = fpext float [[F32]] to double
927 // CLFINITEONLY-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16]], align 8
928 // CLFINITEONLY-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i64 0, i32 1
929 // CLFINITEONLY-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
930 // CLFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i64 0, i32 1
931 // CLFINITEONLY-NEXT: store double [[CF64_COERCE0]], ptr [[INDIRECT_ARG_TEMP]], align 8
932 // CLFINITEONLY-NEXT: store double [[CF64_COERCE1]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
933 // CLFINITEONLY-NEXT: [[COERCE5_SROA_0_0_VEC_INSERT:%.*]] = insertelement <2 x half> undef, half [[CF16_REAL]], i64 0
934 // CLFINITEONLY-NEXT: [[COERCE5_SROA_0_2_VEC_INSERT:%.*]] = insertelement <2 x half> [[COERCE5_SROA_0_0_VEC_INSERT]], half [[CF16_IMAG]], i64 1
935 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) float (float, ...) @variadic(float noundef nofpclass(nan inf) [[F32]], double noundef nofpclass(nan inf) [[CONV]], double noundef nofpclass(nan inf) [[F64]], half noundef nofpclass(nan inf) [[F16]], double noundef nofpclass(nan inf) [[V2F32_COERCE]], <2 x double> noundef nofpclass(nan inf) [[V2F64]], i32 noundef [[V2F16_COERCE]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE]], ptr noundef nonnull byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan inf) [[COERCE5_SROA_0_2_VEC_INSERT]]) #[[ATTR10]]
936 // CLFINITEONLY-NEXT: ret float [[CALL]]
938 // NONANS: Function Attrs: noinline nounwind optnone
939 // NONANS-LABEL: define dso_local nofpclass(nan) float @call_variadic
940 // NONANS-SAME: (float noundef nofpclass(nan) [[F32:%.*]], double noundef nofpclass(nan) [[F64:%.*]], half noundef nofpclass(nan) [[F16:%.*]], double noundef nofpclass(nan) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan) [[CF32_COERCE:%.*]], double noundef nofpclass(nan) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
941 // NONANS-NEXT: entry:
942 // NONANS-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
943 // NONANS-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
944 // NONANS-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
945 // NONANS-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
946 // NONANS-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
947 // NONANS-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
948 // NONANS-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
949 // NONANS-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
950 // NONANS-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
951 // NONANS-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
952 // NONANS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
953 // NONANS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
954 // NONANS-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
955 // NONANS-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
956 // NONANS-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
957 // NONANS-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
958 // NONANS-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
959 // NONANS-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
960 // NONANS-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
961 // NONANS-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
962 // NONANS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
963 // NONANS-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
964 // NONANS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
965 // NONANS-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
966 // NONANS-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
967 // NONANS-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
968 // NONANS-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
969 // NONANS-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
970 // NONANS-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
971 // NONANS-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
972 // NONANS-NEXT: [[TMP2:%.*]] = load float, ptr [[F32_ADDR]], align 4
973 // NONANS-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
974 // NONANS-NEXT: [[CONV:%.*]] = fpext float [[TMP3]] to double
975 // NONANS-NEXT: [[TMP4:%.*]] = load double, ptr [[F64_ADDR]], align 8
976 // NONANS-NEXT: [[TMP5:%.*]] = load half, ptr [[F16_ADDR]], align 2
977 // NONANS-NEXT: [[TMP6:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
978 // NONANS-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
979 // NONANS-NEXT: [[TMP8:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
980 // NONANS-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
981 // NONANS-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
982 // NONANS-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
983 // NONANS-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
984 // NONANS-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
985 // NONANS-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
986 // NONANS-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
987 // NONANS-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
988 // NONANS-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
989 // NONANS-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
990 // NONANS-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
991 // NONANS-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
992 // NONANS-NEXT: store <2 x float> [[TMP6]], ptr [[COERCE]], align 8
993 // NONANS-NEXT: [[TMP9:%.*]] = load double, ptr [[COERCE]], align 8
994 // NONANS-NEXT: store <2 x half> [[TMP8]], ptr [[COERCE3]], align 4
995 // NONANS-NEXT: [[TMP10:%.*]] = load i32, ptr [[COERCE3]], align 4
996 // NONANS-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
997 // NONANS-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
998 // NONANS-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
999 // NONANS-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
1000 // NONANS-NEXT: [[TMP11:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
1001 // NONANS-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
1002 // NONANS-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
1003 // NONANS-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
1004 // NONANS-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1005 // NONANS-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
1006 // NONANS-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
1007 // NONANS-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
1008 // NONANS-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
1009 // NONANS-NEXT: [[TMP12:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
1010 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) float (float, ...) @variadic(float noundef nofpclass(nan) [[TMP2]], double noundef nofpclass(nan) [[CONV]], double noundef nofpclass(nan) [[TMP4]], half noundef nofpclass(nan) [[TMP5]], double noundef nofpclass(nan) [[TMP9]], <2 x double> noundef nofpclass(nan) [[TMP7]], i32 noundef [[TMP10]], <2 x float> noundef nofpclass(nan) [[TMP11]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan) [[TMP12]])
1011 // NONANS-NEXT: ret float [[CALL]]
1013 // NOINFS: Function Attrs: noinline nounwind optnone
1014 // NOINFS-LABEL: define dso_local nofpclass(inf) float @call_variadic
1015 // NOINFS-SAME: (float noundef nofpclass(inf) [[F32:%.*]], double noundef nofpclass(inf) [[F64:%.*]], half noundef nofpclass(inf) [[F16:%.*]], double noundef nofpclass(inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(inf) [[CF32_COERCE:%.*]], double noundef nofpclass(inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(inf) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
1016 // NOINFS-NEXT: entry:
1017 // NOINFS-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
1018 // NOINFS-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
1019 // NOINFS-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
1020 // NOINFS-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
1021 // NOINFS-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
1022 // NOINFS-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
1023 // NOINFS-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
1024 // NOINFS-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
1025 // NOINFS-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
1026 // NOINFS-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
1027 // NOINFS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
1028 // NOINFS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
1029 // NOINFS-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
1030 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
1031 // NOINFS-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
1032 // NOINFS-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
1033 // NOINFS-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
1034 // NOINFS-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
1035 // NOINFS-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
1036 // NOINFS-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
1037 // NOINFS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1038 // NOINFS-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
1039 // NOINFS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1040 // NOINFS-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
1041 // NOINFS-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
1042 // NOINFS-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
1043 // NOINFS-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
1044 // NOINFS-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
1045 // NOINFS-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
1046 // NOINFS-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
1047 // NOINFS-NEXT: [[TMP2:%.*]] = load float, ptr [[F32_ADDR]], align 4
1048 // NOINFS-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
1049 // NOINFS-NEXT: [[CONV:%.*]] = fpext float [[TMP3]] to double
1050 // NOINFS-NEXT: [[TMP4:%.*]] = load double, ptr [[F64_ADDR]], align 8
1051 // NOINFS-NEXT: [[TMP5:%.*]] = load half, ptr [[F16_ADDR]], align 2
1052 // NOINFS-NEXT: [[TMP6:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
1053 // NOINFS-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
1054 // NOINFS-NEXT: [[TMP8:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
1055 // NOINFS-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
1056 // NOINFS-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
1057 // NOINFS-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
1058 // NOINFS-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
1059 // NOINFS-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1060 // NOINFS-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
1061 // NOINFS-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1062 // NOINFS-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
1063 // NOINFS-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
1064 // NOINFS-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
1065 // NOINFS-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
1066 // NOINFS-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
1067 // NOINFS-NEXT: store <2 x float> [[TMP6]], ptr [[COERCE]], align 8
1068 // NOINFS-NEXT: [[TMP9:%.*]] = load double, ptr [[COERCE]], align 8
1069 // NOINFS-NEXT: store <2 x half> [[TMP8]], ptr [[COERCE3]], align 4
1070 // NOINFS-NEXT: [[TMP10:%.*]] = load i32, ptr [[COERCE3]], align 4
1071 // NOINFS-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
1072 // NOINFS-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
1073 // NOINFS-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
1074 // NOINFS-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
1075 // NOINFS-NEXT: [[TMP11:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
1076 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
1077 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
1078 // NOINFS-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
1079 // NOINFS-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1080 // NOINFS-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
1081 // NOINFS-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
1082 // NOINFS-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
1083 // NOINFS-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
1084 // NOINFS-NEXT: [[TMP12:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
1085 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) float (float, ...) @variadic(float noundef nofpclass(inf) [[TMP2]], double noundef nofpclass(inf) [[CONV]], double noundef nofpclass(inf) [[TMP4]], half noundef nofpclass(inf) [[TMP5]], double noundef nofpclass(inf) [[TMP9]], <2 x double> noundef nofpclass(inf) [[TMP7]], i32 noundef [[TMP10]], <2 x float> noundef nofpclass(inf) [[TMP11]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(inf) [[TMP12]])
1086 // NOINFS-NEXT: ret float [[CALL]]
1088 float call_variadic(float f32, double f64, _Float16 f16,
1089 float2 v2f32, double2 v2f64, half2 v2f16,
1090 _Complex float cf32, _Complex double cf64, _Complex _Float16 cf16) {
1091 return variadic(f32, f32, f64, f16, v2f32, v2f64, v2f16, cf32, cf64, cf16);
1094 // CFINITEONLY: Function Attrs: noinline nounwind optnone
1095 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_variadic_indirect
1096 // CFINITEONLY-SAME: (ptr noundef [[FPTR:%.*]], float noundef nofpclass(nan inf) [[F32:%.*]], double noundef nofpclass(nan inf) [[F64:%.*]], half noundef nofpclass(nan inf) [[F16:%.*]], double noundef nofpclass(nan inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
1097 // CFINITEONLY-NEXT: entry:
1098 // CFINITEONLY-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
1099 // CFINITEONLY-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
1100 // CFINITEONLY-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
1101 // CFINITEONLY-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
1102 // CFINITEONLY-NEXT: [[FPTR_ADDR:%.*]] = alloca ptr, align 8
1103 // CFINITEONLY-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
1104 // CFINITEONLY-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
1105 // CFINITEONLY-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
1106 // CFINITEONLY-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
1107 // CFINITEONLY-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
1108 // CFINITEONLY-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
1109 // CFINITEONLY-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
1110 // CFINITEONLY-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
1111 // CFINITEONLY-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
1112 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
1113 // CFINITEONLY-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
1114 // CFINITEONLY-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
1115 // CFINITEONLY-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
1116 // CFINITEONLY-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
1117 // CFINITEONLY-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
1118 // CFINITEONLY-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
1119 // CFINITEONLY-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1120 // CFINITEONLY-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
1121 // CFINITEONLY-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1122 // CFINITEONLY-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
1123 // CFINITEONLY-NEXT: store ptr [[FPTR]], ptr [[FPTR_ADDR]], align 8
1124 // CFINITEONLY-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
1125 // CFINITEONLY-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
1126 // CFINITEONLY-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
1127 // CFINITEONLY-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
1128 // CFINITEONLY-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
1129 // CFINITEONLY-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
1130 // CFINITEONLY-NEXT: [[TMP2:%.*]] = load ptr, ptr [[FPTR_ADDR]], align 8
1131 // CFINITEONLY-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
1132 // CFINITEONLY-NEXT: [[TMP4:%.*]] = load float, ptr [[F32_ADDR]], align 4
1133 // CFINITEONLY-NEXT: [[CONV:%.*]] = fpext float [[TMP4]] to double
1134 // CFINITEONLY-NEXT: [[TMP5:%.*]] = load double, ptr [[F64_ADDR]], align 8
1135 // CFINITEONLY-NEXT: [[TMP6:%.*]] = load half, ptr [[F16_ADDR]], align 2
1136 // CFINITEONLY-NEXT: [[TMP7:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
1137 // CFINITEONLY-NEXT: [[TMP8:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
1138 // CFINITEONLY-NEXT: [[TMP9:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
1139 // CFINITEONLY-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
1140 // CFINITEONLY-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
1141 // CFINITEONLY-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
1142 // CFINITEONLY-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
1143 // CFINITEONLY-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1144 // CFINITEONLY-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
1145 // CFINITEONLY-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1146 // CFINITEONLY-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
1147 // CFINITEONLY-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
1148 // CFINITEONLY-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
1149 // CFINITEONLY-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
1150 // CFINITEONLY-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
1151 // CFINITEONLY-NEXT: store <2 x float> [[TMP7]], ptr [[COERCE]], align 8
1152 // CFINITEONLY-NEXT: [[TMP10:%.*]] = load double, ptr [[COERCE]], align 8
1153 // CFINITEONLY-NEXT: store <2 x half> [[TMP9]], ptr [[COERCE3]], align 4
1154 // CFINITEONLY-NEXT: [[TMP11:%.*]] = load i32, ptr [[COERCE3]], align 4
1155 // CFINITEONLY-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
1156 // CFINITEONLY-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
1157 // CFINITEONLY-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
1158 // CFINITEONLY-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
1159 // CFINITEONLY-NEXT: [[TMP12:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
1160 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
1161 // CFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
1162 // CFINITEONLY-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
1163 // CFINITEONLY-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1164 // CFINITEONLY-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
1165 // CFINITEONLY-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
1166 // CFINITEONLY-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
1167 // CFINITEONLY-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
1168 // CFINITEONLY-NEXT: [[TMP13:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
1169 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) float (float, ...) [[TMP2]](float noundef nofpclass(nan inf) [[TMP3]], double noundef nofpclass(nan inf) [[CONV]], double noundef nofpclass(nan inf) [[TMP5]], half noundef nofpclass(nan inf) [[TMP6]], double noundef nofpclass(nan inf) [[TMP10]], <2 x double> noundef nofpclass(nan inf) [[TMP8]], i32 noundef [[TMP11]], <2 x float> noundef nofpclass(nan inf) [[TMP12]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan inf) [[TMP13]])
1170 // CFINITEONLY-NEXT: ret float [[CALL]]
1172 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
1173 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) float @call_variadic_indirect
1174 // CLFINITEONLY-SAME: (ptr nocapture noundef readonly [[FPTR:%.*]], float noundef nofpclass(nan inf) [[F32:%.*]], double noundef nofpclass(nan inf) [[F64:%.*]], half noundef nofpclass(nan inf) [[F16:%.*]], double noundef nofpclass(nan inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan inf) [[CF64_COERCE1:%.*]], ptr nocapture noundef readonly byval({ half, half }) align 8 [[CF16:%.*]]) local_unnamed_addr #[[ATTR5]] {
1175 // CLFINITEONLY-NEXT: entry:
1176 // CLFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
1177 // CLFINITEONLY-NEXT: [[CONV:%.*]] = fpext float [[F32]] to double
1178 // CLFINITEONLY-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16]], align 8
1179 // CLFINITEONLY-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i64 0, i32 1
1180 // CLFINITEONLY-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
1181 // CLFINITEONLY-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i64 0, i32 1
1182 // CLFINITEONLY-NEXT: store double [[CF64_COERCE0]], ptr [[INDIRECT_ARG_TEMP]], align 8
1183 // CLFINITEONLY-NEXT: store double [[CF64_COERCE1]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1184 // CLFINITEONLY-NEXT: [[COERCE5_SROA_0_0_VEC_INSERT:%.*]] = insertelement <2 x half> undef, half [[CF16_REAL]], i64 0
1185 // CLFINITEONLY-NEXT: [[COERCE5_SROA_0_2_VEC_INSERT:%.*]] = insertelement <2 x half> [[COERCE5_SROA_0_0_VEC_INSERT]], half [[CF16_IMAG]], i64 1
1186 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) float (float, ...) [[FPTR]](float noundef nofpclass(nan inf) [[F32]], double noundef nofpclass(nan inf) [[CONV]], double noundef nofpclass(nan inf) [[F64]], half noundef nofpclass(nan inf) [[F16]], double noundef nofpclass(nan inf) [[V2F32_COERCE]], <2 x double> noundef nofpclass(nan inf) [[V2F64]], i32 noundef [[V2F16_COERCE]], <2 x float> noundef nofpclass(nan inf) [[CF32_COERCE]], ptr noundef nonnull byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan inf) [[COERCE5_SROA_0_2_VEC_INSERT]]) #[[ATTR10]]
1187 // CLFINITEONLY-NEXT: ret float [[CALL]]
1189 // NONANS: Function Attrs: noinline nounwind optnone
1190 // NONANS-LABEL: define dso_local nofpclass(nan) float @call_variadic_indirect
1191 // NONANS-SAME: (ptr noundef [[FPTR:%.*]], float noundef nofpclass(nan) [[F32:%.*]], double noundef nofpclass(nan) [[F64:%.*]], half noundef nofpclass(nan) [[F16:%.*]], double noundef nofpclass(nan) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(nan) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(nan) [[CF32_COERCE:%.*]], double noundef nofpclass(nan) [[CF64_COERCE0:%.*]], double noundef nofpclass(nan) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
1192 // NONANS-NEXT: entry:
1193 // NONANS-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
1194 // NONANS-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
1195 // NONANS-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
1196 // NONANS-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
1197 // NONANS-NEXT: [[FPTR_ADDR:%.*]] = alloca ptr, align 8
1198 // NONANS-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
1199 // NONANS-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
1200 // NONANS-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
1201 // NONANS-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
1202 // NONANS-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
1203 // NONANS-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
1204 // NONANS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
1205 // NONANS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
1206 // NONANS-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
1207 // NONANS-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
1208 // NONANS-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
1209 // NONANS-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
1210 // NONANS-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
1211 // NONANS-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
1212 // NONANS-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
1213 // NONANS-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
1214 // NONANS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1215 // NONANS-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
1216 // NONANS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1217 // NONANS-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
1218 // NONANS-NEXT: store ptr [[FPTR]], ptr [[FPTR_ADDR]], align 8
1219 // NONANS-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
1220 // NONANS-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
1221 // NONANS-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
1222 // NONANS-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
1223 // NONANS-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
1224 // NONANS-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
1225 // NONANS-NEXT: [[TMP2:%.*]] = load ptr, ptr [[FPTR_ADDR]], align 8
1226 // NONANS-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
1227 // NONANS-NEXT: [[TMP4:%.*]] = load float, ptr [[F32_ADDR]], align 4
1228 // NONANS-NEXT: [[CONV:%.*]] = fpext float [[TMP4]] to double
1229 // NONANS-NEXT: [[TMP5:%.*]] = load double, ptr [[F64_ADDR]], align 8
1230 // NONANS-NEXT: [[TMP6:%.*]] = load half, ptr [[F16_ADDR]], align 2
1231 // NONANS-NEXT: [[TMP7:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
1232 // NONANS-NEXT: [[TMP8:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
1233 // NONANS-NEXT: [[TMP9:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
1234 // NONANS-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
1235 // NONANS-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
1236 // NONANS-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
1237 // NONANS-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
1238 // NONANS-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1239 // NONANS-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
1240 // NONANS-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1241 // NONANS-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
1242 // NONANS-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
1243 // NONANS-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
1244 // NONANS-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
1245 // NONANS-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
1246 // NONANS-NEXT: store <2 x float> [[TMP7]], ptr [[COERCE]], align 8
1247 // NONANS-NEXT: [[TMP10:%.*]] = load double, ptr [[COERCE]], align 8
1248 // NONANS-NEXT: store <2 x half> [[TMP9]], ptr [[COERCE3]], align 4
1249 // NONANS-NEXT: [[TMP11:%.*]] = load i32, ptr [[COERCE3]], align 4
1250 // NONANS-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
1251 // NONANS-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
1252 // NONANS-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
1253 // NONANS-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
1254 // NONANS-NEXT: [[TMP12:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
1255 // NONANS-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
1256 // NONANS-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
1257 // NONANS-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
1258 // NONANS-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1259 // NONANS-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
1260 // NONANS-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
1261 // NONANS-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
1262 // NONANS-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
1263 // NONANS-NEXT: [[TMP13:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
1264 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) float (float, ...) [[TMP2]](float noundef nofpclass(nan) [[TMP3]], double noundef nofpclass(nan) [[CONV]], double noundef nofpclass(nan) [[TMP5]], half noundef nofpclass(nan) [[TMP6]], double noundef nofpclass(nan) [[TMP10]], <2 x double> noundef nofpclass(nan) [[TMP8]], i32 noundef [[TMP11]], <2 x float> noundef nofpclass(nan) [[TMP12]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(nan) [[TMP13]])
1265 // NONANS-NEXT: ret float [[CALL]]
1267 // NOINFS: Function Attrs: noinline nounwind optnone
1268 // NOINFS-LABEL: define dso_local nofpclass(inf) float @call_variadic_indirect
1269 // NOINFS-SAME: (ptr noundef [[FPTR:%.*]], float noundef nofpclass(inf) [[F32:%.*]], double noundef nofpclass(inf) [[F64:%.*]], half noundef nofpclass(inf) [[F16:%.*]], double noundef nofpclass(inf) [[V2F32_COERCE:%.*]], <2 x double> noundef nofpclass(inf) [[V2F64:%.*]], i32 noundef [[V2F16_COERCE:%.*]], <2 x float> noundef nofpclass(inf) [[CF32_COERCE:%.*]], double noundef nofpclass(inf) [[CF64_COERCE0:%.*]], double noundef nofpclass(inf) [[CF64_COERCE1:%.*]], ptr noundef byval({ half, half }) align 8 [[CF16:%.*]]) #[[ATTR2]] {
1270 // NOINFS-NEXT: entry:
1271 // NOINFS-NEXT: [[V2F32:%.*]] = alloca <2 x float>, align 8
1272 // NOINFS-NEXT: [[V2F16:%.*]] = alloca <2 x half>, align 4
1273 // NOINFS-NEXT: [[CF32:%.*]] = alloca { float, float }, align 4
1274 // NOINFS-NEXT: [[CF64:%.*]] = alloca { double, double }, align 8
1275 // NOINFS-NEXT: [[FPTR_ADDR:%.*]] = alloca ptr, align 8
1276 // NOINFS-NEXT: [[F32_ADDR:%.*]] = alloca float, align 4
1277 // NOINFS-NEXT: [[F64_ADDR:%.*]] = alloca double, align 8
1278 // NOINFS-NEXT: [[F16_ADDR:%.*]] = alloca half, align 2
1279 // NOINFS-NEXT: [[V2F32_ADDR:%.*]] = alloca <2 x float>, align 8
1280 // NOINFS-NEXT: [[V2F64_ADDR:%.*]] = alloca <2 x double>, align 16
1281 // NOINFS-NEXT: [[V2F16_ADDR:%.*]] = alloca <2 x half>, align 4
1282 // NOINFS-NEXT: [[COERCE:%.*]] = alloca <2 x float>, align 8
1283 // NOINFS-NEXT: [[COERCE3:%.*]] = alloca <2 x half>, align 4
1284 // NOINFS-NEXT: [[COERCE4:%.*]] = alloca { float, float }, align 4
1285 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP:%.*]] = alloca { double, double }, align 8
1286 // NOINFS-NEXT: [[COERCE5:%.*]] = alloca { half, half }, align 2
1287 // NOINFS-NEXT: store double [[V2F32_COERCE]], ptr [[V2F32]], align 8
1288 // NOINFS-NEXT: [[V2F321:%.*]] = load <2 x float>, ptr [[V2F32]], align 8
1289 // NOINFS-NEXT: store i32 [[V2F16_COERCE]], ptr [[V2F16]], align 4
1290 // NOINFS-NEXT: [[V2F162:%.*]] = load <2 x half>, ptr [[V2F16]], align 4
1291 // NOINFS-NEXT: store <2 x float> [[CF32_COERCE]], ptr [[CF32]], align 4
1292 // NOINFS-NEXT: [[TMP0:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1293 // NOINFS-NEXT: store double [[CF64_COERCE0]], ptr [[TMP0]], align 8
1294 // NOINFS-NEXT: [[TMP1:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1295 // NOINFS-NEXT: store double [[CF64_COERCE1]], ptr [[TMP1]], align 8
1296 // NOINFS-NEXT: store ptr [[FPTR]], ptr [[FPTR_ADDR]], align 8
1297 // NOINFS-NEXT: store float [[F32]], ptr [[F32_ADDR]], align 4
1298 // NOINFS-NEXT: store double [[F64]], ptr [[F64_ADDR]], align 8
1299 // NOINFS-NEXT: store half [[F16]], ptr [[F16_ADDR]], align 2
1300 // NOINFS-NEXT: store <2 x float> [[V2F321]], ptr [[V2F32_ADDR]], align 8
1301 // NOINFS-NEXT: store <2 x double> [[V2F64]], ptr [[V2F64_ADDR]], align 16
1302 // NOINFS-NEXT: store <2 x half> [[V2F162]], ptr [[V2F16_ADDR]], align 4
1303 // NOINFS-NEXT: [[TMP2:%.*]] = load ptr, ptr [[FPTR_ADDR]], align 8
1304 // NOINFS-NEXT: [[TMP3:%.*]] = load float, ptr [[F32_ADDR]], align 4
1305 // NOINFS-NEXT: [[TMP4:%.*]] = load float, ptr [[F32_ADDR]], align 4
1306 // NOINFS-NEXT: [[CONV:%.*]] = fpext float [[TMP4]] to double
1307 // NOINFS-NEXT: [[TMP5:%.*]] = load double, ptr [[F64_ADDR]], align 8
1308 // NOINFS-NEXT: [[TMP6:%.*]] = load half, ptr [[F16_ADDR]], align 2
1309 // NOINFS-NEXT: [[TMP7:%.*]] = load <2 x float>, ptr [[V2F32_ADDR]], align 8
1310 // NOINFS-NEXT: [[TMP8:%.*]] = load <2 x double>, ptr [[V2F64_ADDR]], align 16
1311 // NOINFS-NEXT: [[TMP9:%.*]] = load <2 x half>, ptr [[V2F16_ADDR]], align 4
1312 // NOINFS-NEXT: [[CF32_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 0
1313 // NOINFS-NEXT: [[CF32_REAL:%.*]] = load float, ptr [[CF32_REALP]], align 4
1314 // NOINFS-NEXT: [[CF32_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[CF32]], i32 0, i32 1
1315 // NOINFS-NEXT: [[CF32_IMAG:%.*]] = load float, ptr [[CF32_IMAGP]], align 4
1316 // NOINFS-NEXT: [[CF64_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 0
1317 // NOINFS-NEXT: [[CF64_REAL:%.*]] = load double, ptr [[CF64_REALP]], align 8
1318 // NOINFS-NEXT: [[CF64_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[CF64]], i32 0, i32 1
1319 // NOINFS-NEXT: [[CF64_IMAG:%.*]] = load double, ptr [[CF64_IMAGP]], align 8
1320 // NOINFS-NEXT: [[CF16_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 0
1321 // NOINFS-NEXT: [[CF16_REAL:%.*]] = load half, ptr [[CF16_REALP]], align 8
1322 // NOINFS-NEXT: [[CF16_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[CF16]], i32 0, i32 1
1323 // NOINFS-NEXT: [[CF16_IMAG:%.*]] = load half, ptr [[CF16_IMAGP]], align 2
1324 // NOINFS-NEXT: store <2 x float> [[TMP7]], ptr [[COERCE]], align 8
1325 // NOINFS-NEXT: [[TMP10:%.*]] = load double, ptr [[COERCE]], align 8
1326 // NOINFS-NEXT: store <2 x half> [[TMP9]], ptr [[COERCE3]], align 4
1327 // NOINFS-NEXT: [[TMP11:%.*]] = load i32, ptr [[COERCE3]], align 4
1328 // NOINFS-NEXT: [[COERCE4_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 0
1329 // NOINFS-NEXT: [[COERCE4_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[COERCE4]], i32 0, i32 1
1330 // NOINFS-NEXT: store float [[CF32_REAL]], ptr [[COERCE4_REALP]], align 4
1331 // NOINFS-NEXT: store float [[CF32_IMAG]], ptr [[COERCE4_IMAGP]], align 4
1332 // NOINFS-NEXT: [[TMP12:%.*]] = load <2 x float>, ptr [[COERCE4]], align 4
1333 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP_REALP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 0
1334 // NOINFS-NEXT: [[INDIRECT_ARG_TEMP_IMAGP:%.*]] = getelementptr inbounds { double, double }, ptr [[INDIRECT_ARG_TEMP]], i32 0, i32 1
1335 // NOINFS-NEXT: store double [[CF64_REAL]], ptr [[INDIRECT_ARG_TEMP_REALP]], align 8
1336 // NOINFS-NEXT: store double [[CF64_IMAG]], ptr [[INDIRECT_ARG_TEMP_IMAGP]], align 8
1337 // NOINFS-NEXT: [[COERCE5_REALP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 0
1338 // NOINFS-NEXT: [[COERCE5_IMAGP:%.*]] = getelementptr inbounds { half, half }, ptr [[COERCE5]], i32 0, i32 1
1339 // NOINFS-NEXT: store half [[CF16_REAL]], ptr [[COERCE5_REALP]], align 2
1340 // NOINFS-NEXT: store half [[CF16_IMAG]], ptr [[COERCE5_IMAGP]], align 2
1341 // NOINFS-NEXT: [[TMP13:%.*]] = load <2 x half>, ptr [[COERCE5]], align 2
1342 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) float (float, ...) [[TMP2]](float noundef nofpclass(inf) [[TMP3]], double noundef nofpclass(inf) [[CONV]], double noundef nofpclass(inf) [[TMP5]], half noundef nofpclass(inf) [[TMP6]], double noundef nofpclass(inf) [[TMP10]], <2 x double> noundef nofpclass(inf) [[TMP8]], i32 noundef [[TMP11]], <2 x float> noundef nofpclass(inf) [[TMP12]], ptr noundef byval({ double, double }) align 8 [[INDIRECT_ARG_TEMP]], <2 x half> noundef nofpclass(inf) [[TMP13]])
1343 // NOINFS-NEXT: ret float [[CALL]]
1345 float call_variadic_indirect(float fptr(float, ...), float f32, double f64, _Float16 f16,
1346 float2 v2f32, double2 v2f64, half2 v2f16,
1347 _Complex float cf32, _Complex double cf64, _Complex _Float16 cf16) {
1348 return (*fptr)(f32, f32, f64, f16, v2f32, v2f64, v2f16, cf32, cf64, cf16);
1351 typedef __attribute__((__vector_size__(4 * sizeof(double)))) double __m256d;
1352 extern __m256d extern_m256d(__m256d, ...);
1354 // CFINITEONLY: Function Attrs: noinline nounwind optnone
1355 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <4 x double> @call_m256d
1356 // CFINITEONLY-SAME: (<4 x double> noundef nofpclass(nan inf) [[X:%.*]]) #[[ATTR5:[0-9]+]] {
1357 // CFINITEONLY-NEXT: entry:
1358 // CFINITEONLY-NEXT: [[X_ADDR:%.*]] = alloca <4 x double>, align 32
1359 // CFINITEONLY-NEXT: store <4 x double> [[X]], ptr [[X_ADDR]], align 32
1360 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1361 // CFINITEONLY-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1362 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) <4 x double> (<4 x double>, ...) @extern_m256d(<4 x double> noundef nofpclass(nan inf) [[TMP0]], <4 x double> noundef nofpclass(nan inf) [[TMP1]])
1363 // CFINITEONLY-NEXT: ret <4 x double> [[CALL]]
1365 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
1366 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <4 x double> @call_m256d
1367 // CLFINITEONLY-SAME: (<4 x double> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR8:[0-9]+]] {
1368 // CLFINITEONLY-NEXT: entry:
1369 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) <4 x double> (<4 x double>, ...) @extern_m256d(<4 x double> noundef nofpclass(nan inf) [[X]], <4 x double> noundef nofpclass(nan inf) [[X]]) #[[ATTR10]]
1370 // CLFINITEONLY-NEXT: ret <4 x double> [[CALL]]
1372 // NONANS: Function Attrs: noinline nounwind optnone
1373 // NONANS-LABEL: define dso_local nofpclass(nan) <4 x double> @call_m256d
1374 // NONANS-SAME: (<4 x double> noundef nofpclass(nan) [[X:%.*]]) #[[ATTR5:[0-9]+]] {
1375 // NONANS-NEXT: entry:
1376 // NONANS-NEXT: [[X_ADDR:%.*]] = alloca <4 x double>, align 32
1377 // NONANS-NEXT: store <4 x double> [[X]], ptr [[X_ADDR]], align 32
1378 // NONANS-NEXT: [[TMP0:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1379 // NONANS-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1380 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) <4 x double> (<4 x double>, ...) @extern_m256d(<4 x double> noundef nofpclass(nan) [[TMP0]], <4 x double> noundef nofpclass(nan) [[TMP1]])
1381 // NONANS-NEXT: ret <4 x double> [[CALL]]
1383 // NOINFS: Function Attrs: noinline nounwind optnone
1384 // NOINFS-LABEL: define dso_local nofpclass(inf) <4 x double> @call_m256d
1385 // NOINFS-SAME: (<4 x double> noundef nofpclass(inf) [[X:%.*]]) #[[ATTR5:[0-9]+]] {
1386 // NOINFS-NEXT: entry:
1387 // NOINFS-NEXT: [[X_ADDR:%.*]] = alloca <4 x double>, align 32
1388 // NOINFS-NEXT: store <4 x double> [[X]], ptr [[X_ADDR]], align 32
1389 // NOINFS-NEXT: [[TMP0:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1390 // NOINFS-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr [[X_ADDR]], align 32
1391 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) <4 x double> (<4 x double>, ...) @extern_m256d(<4 x double> noundef nofpclass(inf) [[TMP0]], <4 x double> noundef nofpclass(inf) [[TMP1]])
1392 // NOINFS-NEXT: ret <4 x double> [[CALL]]
1394 __m256d call_m256d(__m256d x) {
1395 return extern_m256d(x, x);
1398 // CFINITEONLY: Function Attrs: noinline nounwind optnone
1399 // CFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <25 x double> @call_matrix
1400 // CFINITEONLY-SAME: (<25 x double> noundef nofpclass(nan inf) [[X:%.*]]) #[[ATTR6:[0-9]+]] {
1401 // CFINITEONLY-NEXT: entry:
1402 // CFINITEONLY-NEXT: [[X_ADDR:%.*]] = alloca [25 x double], align 8
1403 // CFINITEONLY-NEXT: store <25 x double> [[X]], ptr [[X_ADDR]], align 8
1404 // CFINITEONLY-NEXT: [[TMP0:%.*]] = load <25 x double>, ptr [[X_ADDR]], align 8
1405 // CFINITEONLY-NEXT: [[CALL:%.*]] = call nnan ninf nofpclass(nan inf) <25 x double> @extern_matrix(<25 x double> noundef nofpclass(nan inf) [[TMP0]])
1406 // CFINITEONLY-NEXT: ret <25 x double> [[CALL]]
1408 // CLFINITEONLY: Function Attrs: convergent norecurse nounwind
1409 // CLFINITEONLY-LABEL: define dso_local nofpclass(nan inf) <25 x double> @call_matrix
1410 // CLFINITEONLY-SAME: (<25 x double> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR9:[0-9]+]] {
1411 // CLFINITEONLY-NEXT: entry:
1412 // CLFINITEONLY-NEXT: [[CALL:%.*]] = tail call nnan ninf nofpclass(nan inf) <25 x double> @extern_matrix(<25 x double> noundef nofpclass(nan inf) [[X]]) #[[ATTR10]]
1413 // CLFINITEONLY-NEXT: ret <25 x double> [[CALL]]
1415 // NONANS: Function Attrs: noinline nounwind optnone
1416 // NONANS-LABEL: define dso_local nofpclass(nan) <25 x double> @call_matrix
1417 // NONANS-SAME: (<25 x double> noundef nofpclass(nan) [[X:%.*]]) #[[ATTR6:[0-9]+]] {
1418 // NONANS-NEXT: entry:
1419 // NONANS-NEXT: [[X_ADDR:%.*]] = alloca [25 x double], align 8
1420 // NONANS-NEXT: store <25 x double> [[X]], ptr [[X_ADDR]], align 8
1421 // NONANS-NEXT: [[TMP0:%.*]] = load <25 x double>, ptr [[X_ADDR]], align 8
1422 // NONANS-NEXT: [[CALL:%.*]] = call nnan nofpclass(nan) <25 x double> @extern_matrix(<25 x double> noundef nofpclass(nan) [[TMP0]])
1423 // NONANS-NEXT: ret <25 x double> [[CALL]]
1425 // NOINFS: Function Attrs: noinline nounwind optnone
1426 // NOINFS-LABEL: define dso_local nofpclass(inf) <25 x double> @call_matrix
1427 // NOINFS-SAME: (<25 x double> noundef nofpclass(inf) [[X:%.*]]) #[[ATTR6:[0-9]+]] {
1428 // NOINFS-NEXT: entry:
1429 // NOINFS-NEXT: [[X_ADDR:%.*]] = alloca [25 x double], align 8
1430 // NOINFS-NEXT: store <25 x double> [[X]], ptr [[X_ADDR]], align 8
1431 // NOINFS-NEXT: [[TMP0:%.*]] = load <25 x double>, ptr [[X_ADDR]], align 8
1432 // NOINFS-NEXT: [[CALL:%.*]] = call ninf nofpclass(inf) <25 x double> @extern_matrix(<25 x double> noundef nofpclass(inf) [[TMP0]])
1433 // NOINFS-NEXT: ret <25 x double> [[CALL]]
1435 dx5x5_t call_matrix(dx5x5_t x) {
1436 return extern_matrix(x);