1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-globals --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" --global-value-regex "\![0-9]+"
3 // RUN: %clang_cc1 -internal-isystem %S/Inputs/include -x c++ -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-host.bc
4 // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Headers/openmp_wrappers -internal-isystem %S/Inputs/include -x c++ -fopenmp -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s
12 #pragma omp begin declare target
14 const float constexpr_fabsf_f32
= fabsf(-2.0f
);
15 const float constexpr_fabs_f32
= fabs(-2.0f
);
17 const float constexpr_sinf_f32
= sinf(-2.0f
);
18 const float constexpr_sin_f32
= sin(-2.0f
);
20 const float constexpr_cosf_f32
= cosf(-2.0f
);
21 const float constexpr_cos_f32
= cos(-2.0f
);
23 const float constexpr_fmaf_f32
= fmaf(2.0f
, 4.0f
, 1.0f
);
24 const float constexpr_fma_f32
= fma(2.0f
, 4.0f
, 1.0f
);
27 const float constexpr_min_f32
= min(2.0f
, -4.0f
);
28 const float constexpr_max_f32
= max(2.0f
, -4.0f
);
30 const float constexpr_fmin_f32
= fmin(2.0f
, -4.0f
);
31 const float constexpr_fmax_f32
= fmax(2.0f
, -4.0f
);
33 const float constexpr_fminf_f32
= fminf(2.0f
, -4.0f
);
34 const float constexpr_fmaxf_f32
= fmaxf(2.0f
, -4.0f
);
37 #pragma omp end declare target
38 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init
39 // CHECK-SAME: () #[[ATTR0:[0-9]+]] {
41 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
42 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
43 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
44 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
45 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
46 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
47 // CHECK-NEXT: [[TMP1:%.*]] = call noundef float @llvm.fabs.f32(float [[TMP0]])
48 // CHECK-NEXT: store float [[TMP1]], ptr addrspacecast (ptr addrspace(1) @_ZL19constexpr_fabsf_f32 to ptr), align 4
49 // CHECK-NEXT: ret void
52 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.1
53 // CHECK-SAME: () #[[ATTR0]] {
55 // CHECK-NEXT: [[RETVAL_I_I:%.*]] = alloca float, align 4, addrspace(5)
56 // CHECK-NEXT: [[__X_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
57 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
58 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
59 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
60 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
61 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
62 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
63 // CHECK-NEXT: [[RETVAL_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I_I]] to ptr
64 // CHECK-NEXT: [[__X_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I_I]] to ptr
65 // CHECK-NEXT: store float [[TMP0]], ptr [[__X_ADDR_ASCAST_I_I]], align 4
66 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I_I]], align 4
67 // CHECK-NEXT: [[TMP2:%.*]] = call noundef float @llvm.fabs.f32(float [[TMP1]])
68 // CHECK-NEXT: store float [[TMP2]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_fabs_f32 to ptr), align 4
69 // CHECK-NEXT: ret void
72 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.2
73 // CHECK-SAME: () #[[ATTR0]] {
75 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
76 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
77 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
78 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
79 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
80 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
81 // CHECK-NEXT: [[CALL_I:%.*]] = call noundef float @__ocml_sin_f32(float noundef [[TMP0]]) #[[ATTR3:[0-9]+]]
82 // CHECK-NEXT: store float [[CALL_I]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_sinf_f32 to ptr), align 4
83 // CHECK-NEXT: ret void
86 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.3
87 // CHECK-SAME: () #[[ATTR0]] {
89 // CHECK-NEXT: [[RETVAL_I_I:%.*]] = alloca float, align 4, addrspace(5)
90 // CHECK-NEXT: [[__X_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
91 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
92 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
93 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
94 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
95 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
96 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
97 // CHECK-NEXT: [[RETVAL_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I_I]] to ptr
98 // CHECK-NEXT: [[__X_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I_I]] to ptr
99 // CHECK-NEXT: store float [[TMP0]], ptr [[__X_ADDR_ASCAST_I_I]], align 4
100 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I_I]], align 4
101 // CHECK-NEXT: [[CALL_I_I:%.*]] = call noundef float @__ocml_sin_f32(float noundef [[TMP1]]) #[[ATTR3]]
102 // CHECK-NEXT: store float [[CALL_I_I]], ptr addrspacecast (ptr addrspace(1) @_ZL17constexpr_sin_f32 to ptr), align 4
103 // CHECK-NEXT: ret void
106 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.4
107 // CHECK-SAME: () #[[ATTR0]] {
108 // CHECK-NEXT: entry:
109 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
110 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
111 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
112 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
113 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
114 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
115 // CHECK-NEXT: [[CALL_I:%.*]] = call noundef float @__ocml_cos_f32(float noundef [[TMP0]]) #[[ATTR3]]
116 // CHECK-NEXT: store float [[CALL_I]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_cosf_f32 to ptr), align 4
117 // CHECK-NEXT: ret void
120 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.5
121 // CHECK-SAME: () #[[ATTR0]] {
122 // CHECK-NEXT: entry:
123 // CHECK-NEXT: [[RETVAL_I_I:%.*]] = alloca float, align 4, addrspace(5)
124 // CHECK-NEXT: [[__X_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
125 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
126 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
127 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
128 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
129 // CHECK-NEXT: store float -2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
130 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
131 // CHECK-NEXT: [[RETVAL_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I_I]] to ptr
132 // CHECK-NEXT: [[__X_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I_I]] to ptr
133 // CHECK-NEXT: store float [[TMP0]], ptr [[__X_ADDR_ASCAST_I_I]], align 4
134 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I_I]], align 4
135 // CHECK-NEXT: [[CALL_I_I:%.*]] = call noundef float @__ocml_cos_f32(float noundef [[TMP1]]) #[[ATTR3]]
136 // CHECK-NEXT: store float [[CALL_I_I]], ptr addrspacecast (ptr addrspace(1) @_ZL17constexpr_cos_f32 to ptr), align 4
137 // CHECK-NEXT: ret void
140 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.6
141 // CHECK-SAME: () #[[ATTR0]] {
142 // CHECK-NEXT: entry:
143 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
144 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
145 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
146 // CHECK-NEXT: [[__Z_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
147 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
148 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
149 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
150 // CHECK-NEXT: [[__Z_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Z_ADDR_I]] to ptr
151 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
152 // CHECK-NEXT: store float 4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
153 // CHECK-NEXT: store float 1.000000e+00, ptr [[__Z_ADDR_ASCAST_I]], align 4
154 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
155 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
156 // CHECK-NEXT: [[TMP2:%.*]] = load float, ptr [[__Z_ADDR_ASCAST_I]], align 4
157 // CHECK-NEXT: [[TMP3:%.*]] = call noundef float @llvm.fma.f32(float [[TMP0]], float [[TMP1]], float [[TMP2]])
158 // CHECK-NEXT: store float [[TMP3]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_fmaf_f32 to ptr), align 4
159 // CHECK-NEXT: ret void
162 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.7
163 // CHECK-SAME: () #[[ATTR0]] {
164 // CHECK-NEXT: entry:
165 // CHECK-NEXT: [[RETVAL_I_I:%.*]] = alloca float, align 4, addrspace(5)
166 // CHECK-NEXT: [[__X_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
167 // CHECK-NEXT: [[__Y_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
168 // CHECK-NEXT: [[__Z_ADDR_I_I:%.*]] = alloca float, align 4, addrspace(5)
169 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
170 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
171 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
172 // CHECK-NEXT: [[__Z_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
173 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
174 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
175 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
176 // CHECK-NEXT: [[__Z_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Z_ADDR_I]] to ptr
177 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
178 // CHECK-NEXT: store float 4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
179 // CHECK-NEXT: store float 1.000000e+00, ptr [[__Z_ADDR_ASCAST_I]], align 4
180 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
181 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
182 // CHECK-NEXT: [[TMP2:%.*]] = load float, ptr [[__Z_ADDR_ASCAST_I]], align 4
183 // CHECK-NEXT: [[RETVAL_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I_I]] to ptr
184 // CHECK-NEXT: [[__X_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I_I]] to ptr
185 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I_I]] to ptr
186 // CHECK-NEXT: [[__Z_ADDR_ASCAST_I_I:%.*]] = addrspacecast ptr addrspace(5) [[__Z_ADDR_I_I]] to ptr
187 // CHECK-NEXT: store float [[TMP0]], ptr [[__X_ADDR_ASCAST_I_I]], align 4
188 // CHECK-NEXT: store float [[TMP1]], ptr [[__Y_ADDR_ASCAST_I_I]], align 4
189 // CHECK-NEXT: store float [[TMP2]], ptr [[__Z_ADDR_ASCAST_I_I]], align 4
190 // CHECK-NEXT: [[TMP3:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I_I]], align 4
191 // CHECK-NEXT: [[TMP4:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I_I]], align 4
192 // CHECK-NEXT: [[TMP5:%.*]] = load float, ptr [[__Z_ADDR_ASCAST_I_I]], align 4
193 // CHECK-NEXT: [[TMP6:%.*]] = call noundef float @llvm.fma.f32(float [[TMP3]], float [[TMP4]], float [[TMP5]])
194 // CHECK-NEXT: store float [[TMP6]], ptr addrspacecast (ptr addrspace(1) @_ZL17constexpr_fma_f32 to ptr), align 4
195 // CHECK-NEXT: ret void
198 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.8
199 // CHECK-SAME: () #[[ATTR0]] {
200 // CHECK-NEXT: entry:
201 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
202 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
203 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
204 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
205 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
206 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
207 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
208 // CHECK-NEXT: store float -4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
209 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
210 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
211 // CHECK-NEXT: [[TMP2:%.*]] = call noundef float @llvm.minnum.f32(float [[TMP0]], float [[TMP1]])
212 // CHECK-NEXT: store float [[TMP2]], ptr addrspacecast (ptr addrspace(1) @_ZL17constexpr_min_f32 to ptr), align 4
213 // CHECK-NEXT: ret void
216 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.9
217 // CHECK-SAME: () #[[ATTR0]] {
218 // CHECK-NEXT: entry:
219 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
220 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
221 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
222 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
223 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
224 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
225 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
226 // CHECK-NEXT: store float -4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
227 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
228 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
229 // CHECK-NEXT: [[TMP2:%.*]] = call noundef float @llvm.maxnum.f32(float [[TMP0]], float [[TMP1]])
230 // CHECK-NEXT: store float [[TMP2]], ptr addrspacecast (ptr addrspace(1) @_ZL17constexpr_max_f32 to ptr), align 4
231 // CHECK-NEXT: ret void
234 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.10
235 // CHECK-SAME: () #[[ATTR0]] {
236 // CHECK-NEXT: entry:
237 // CHECK-NEXT: [[CALL:%.*]] = call noundef float @_Z4fminff(float noundef 2.000000e+00, float noundef -4.000000e+00) #[[ATTR4:[0-9]+]]
238 // CHECK-NEXT: store float [[CALL]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_fmin_f32 to ptr), align 4
239 // CHECK-NEXT: ret void
242 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.11
243 // CHECK-SAME: () #[[ATTR0]] {
244 // CHECK-NEXT: entry:
245 // CHECK-NEXT: [[CALL:%.*]] = call noundef float @_Z4fmaxff(float noundef 2.000000e+00, float noundef -4.000000e+00) #[[ATTR4]]
246 // CHECK-NEXT: store float [[CALL]], ptr addrspacecast (ptr addrspace(1) @_ZL18constexpr_fmax_f32 to ptr), align 4
247 // CHECK-NEXT: ret void
250 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.12
251 // CHECK-SAME: () #[[ATTR0]] {
252 // CHECK-NEXT: entry:
253 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
254 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
255 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
256 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
257 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
258 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
259 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
260 // CHECK-NEXT: store float -4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
261 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
262 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
263 // CHECK-NEXT: [[TMP2:%.*]] = call noundef float @llvm.minnum.f32(float [[TMP0]], float [[TMP1]])
264 // CHECK-NEXT: store float [[TMP2]], ptr addrspacecast (ptr addrspace(1) @_ZL19constexpr_fminf_f32 to ptr), align 4
265 // CHECK-NEXT: ret void
268 // CHECK-LABEL: define {{[^@]+}}@__cxx_global_var_init.13
269 // CHECK-SAME: () #[[ATTR0]] {
270 // CHECK-NEXT: entry:
271 // CHECK-NEXT: [[RETVAL_I:%.*]] = alloca float, align 4, addrspace(5)
272 // CHECK-NEXT: [[__X_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
273 // CHECK-NEXT: [[__Y_ADDR_I:%.*]] = alloca float, align 4, addrspace(5)
274 // CHECK-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr
275 // CHECK-NEXT: [[__X_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__X_ADDR_I]] to ptr
276 // CHECK-NEXT: [[__Y_ADDR_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[__Y_ADDR_I]] to ptr
277 // CHECK-NEXT: store float 2.000000e+00, ptr [[__X_ADDR_ASCAST_I]], align 4
278 // CHECK-NEXT: store float -4.000000e+00, ptr [[__Y_ADDR_ASCAST_I]], align 4
279 // CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[__X_ADDR_ASCAST_I]], align 4
280 // CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__Y_ADDR_ASCAST_I]], align 4
281 // CHECK-NEXT: [[TMP2:%.*]] = call noundef float @llvm.maxnum.f32(float [[TMP0]], float [[TMP1]])
282 // CHECK-NEXT: store float [[TMP2]], ptr addrspacecast (ptr addrspace(1) @_ZL19constexpr_fmaxf_f32 to ptr), align 4
283 // CHECK-NEXT: ret void
286 // CHECK-LABEL: define {{[^@]+}}@_GLOBAL__sub_I_amdgcn_openmp_device_math_constexpr.cpp
287 // CHECK-SAME: () #[[ATTR0]] {
288 // CHECK-NEXT: entry:
289 // CHECK-NEXT: call void @__cxx_global_var_init()
290 // CHECK-NEXT: call void @__cxx_global_var_init.1()
291 // CHECK-NEXT: call void @__cxx_global_var_init.2()
292 // CHECK-NEXT: call void @__cxx_global_var_init.3()
293 // CHECK-NEXT: call void @__cxx_global_var_init.4()
294 // CHECK-NEXT: call void @__cxx_global_var_init.5()
295 // CHECK-NEXT: call void @__cxx_global_var_init.6()
296 // CHECK-NEXT: call void @__cxx_global_var_init.7()
297 // CHECK-NEXT: call void @__cxx_global_var_init.8()
298 // CHECK-NEXT: call void @__cxx_global_var_init.9()
299 // CHECK-NEXT: call void @__cxx_global_var_init.10()
300 // CHECK-NEXT: call void @__cxx_global_var_init.11()
301 // CHECK-NEXT: call void @__cxx_global_var_init.12()
302 // CHECK-NEXT: call void @__cxx_global_var_init.13()
303 // CHECK-NEXT: ret void