1 ; RUN: opt < %s -vector-library=Accelerate -passes=inject-tli-mappings,loop-vectorize -S | FileCheck %s
3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 ;CHECK-LABEL: @sqrt_f32(
7 ;CHECK: vsqrtf{{.*}}<4 x float>
9 declare float @sqrtf(float) nounwind readnone
10 define void @sqrt_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
12 %cmp6 = icmp sgt i32 %n, 0
13 br i1 %cmp6, label %for.body, label %for.end
15 for.body: ; preds = %entry, %for.body
16 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
17 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
18 %0 = load float, ptr %arrayidx, align 4
19 %call = tail call float @sqrtf(float %0) nounwind readnone
20 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
21 store float %call, ptr %arrayidx2, align 4
22 %indvars.iv.next = add i64 %indvars.iv, 1
23 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
24 %exitcond = icmp eq i32 %lftr.wideiv, %n
25 br i1 %exitcond, label %for.end, label %for.body
27 for.end: ; preds = %for.body, %entry
31 ;CHECK-LABEL: @exp_f32(
32 ;CHECK: vexpf{{.*}}<4 x float>
34 declare float @expf(float) nounwind readnone
35 define void @exp_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
37 %cmp6 = icmp sgt i32 %n, 0
38 br i1 %cmp6, label %for.body, label %for.end
40 for.body: ; preds = %entry, %for.body
41 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
42 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
43 %0 = load float, ptr %arrayidx, align 4
44 %call = tail call float @expf(float %0) nounwind readnone
45 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
46 store float %call, ptr %arrayidx2, align 4
47 %indvars.iv.next = add i64 %indvars.iv, 1
48 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
49 %exitcond = icmp eq i32 %lftr.wideiv, %n
50 br i1 %exitcond, label %for.end, label %for.body
52 for.end: ; preds = %for.body, %entry
56 ;CHECK-LABEL: @log_f32(
57 ;CHECK: vlogf{{.*}}<4 x float>
59 declare float @logf(float) nounwind readnone
60 define void @log_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
62 %cmp6 = icmp sgt i32 %n, 0
63 br i1 %cmp6, label %for.body, label %for.end
65 for.body: ; preds = %entry, %for.body
66 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
67 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
68 %0 = load float, ptr %arrayidx, align 4
69 %call = tail call float @logf(float %0) nounwind readnone
70 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
71 store float %call, ptr %arrayidx2, align 4
72 %indvars.iv.next = add i64 %indvars.iv, 1
73 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
74 %exitcond = icmp eq i32 %lftr.wideiv, %n
75 br i1 %exitcond, label %for.end, label %for.body
77 for.end: ; preds = %for.body, %entry
81 ; For abs instruction we'll generate vector intrinsic, as it's cheaper than a lib call.
82 ;CHECK-LABEL: @fabs_f32(
83 ;CHECK: fabs{{.*}}<4 x float>
85 declare float @fabsf(float) nounwind readnone
86 define void @fabs_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
88 %cmp6 = icmp sgt i32 %n, 0
89 br i1 %cmp6, label %for.body, label %for.end
91 for.body: ; preds = %entry, %for.body
92 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
93 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
94 %0 = load float, ptr %arrayidx, align 4
95 %call = tail call float @fabsf(float %0) nounwind readnone
96 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
97 store float %call, ptr %arrayidx2, align 4
98 %indvars.iv.next = add i64 %indvars.iv, 1
99 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
100 %exitcond = icmp eq i32 %lftr.wideiv, %n
101 br i1 %exitcond, label %for.end, label %for.body
103 for.end: ; preds = %for.body, %entry
107 ; Test that we can vectorize an intrinsic into a vector call.
108 ;CHECK-LABEL: @exp_f32_intrin(
109 ;CHECK: vexpf{{.*}}<4 x float>
111 declare float @llvm.exp.f32(float) nounwind readnone
112 define void @exp_f32_intrin(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
114 %cmp6 = icmp sgt i32 %n, 0
115 br i1 %cmp6, label %for.body, label %for.end
117 for.body: ; preds = %entry, %for.body
118 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
119 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
120 %0 = load float, ptr %arrayidx, align 4
121 %call = tail call float @llvm.exp.f32(float %0) nounwind readnone
122 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
123 store float %call, ptr %arrayidx2, align 4
124 %indvars.iv.next = add i64 %indvars.iv, 1
125 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
126 %exitcond = icmp eq i32 %lftr.wideiv, %n
127 br i1 %exitcond, label %for.end, label %for.body
129 for.end: ; preds = %for.body, %entry
133 ; Test that we don't vectorize arbitrary functions.
134 ;CHECK-LABEL: @foo_f32(
135 ;CHECK-NOT: foo{{.*}}<4 x float>
137 declare float @foo(float) nounwind readnone
138 define void @foo_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
140 %cmp6 = icmp sgt i32 %n, 0
141 br i1 %cmp6, label %for.body, label %for.end
143 for.body: ; preds = %entry, %for.body
144 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
145 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
146 %0 = load float, ptr %arrayidx, align 4
147 %call = tail call float @foo(float %0) nounwind readnone
148 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
149 store float %call, ptr %arrayidx2, align 4
150 %indvars.iv.next = add i64 %indvars.iv, 1
151 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
152 %exitcond = icmp eq i32 %lftr.wideiv, %n
153 br i1 %exitcond, label %for.end, label %for.body
155 for.end: ; preds = %for.body, %entry
159 ; Test that we don't vectorize calls with nobuiltin attribute.
160 ;CHECK-LABEL: @sqrt_f32_nobuiltin(
161 ;CHECK-NOT: vsqrtf{{.*}}<4 x float>
163 define void @sqrt_f32_nobuiltin(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
165 %cmp6 = icmp sgt i32 %n, 0
166 br i1 %cmp6, label %for.body, label %for.end
168 for.body: ; preds = %entry, %for.body
169 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
170 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
171 %0 = load float, ptr %arrayidx, align 4
172 %call = tail call float @sqrtf(float %0) nounwind readnone nobuiltin
173 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
174 store float %call, ptr %arrayidx2, align 4
175 %indvars.iv.next = add i64 %indvars.iv, 1
176 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
177 %exitcond = icmp eq i32 %lftr.wideiv, %n
178 br i1 %exitcond, label %for.end, label %for.body
180 for.end: ; preds = %for.body, %entry
184 ;CHECK-LABEL: @ceil_f32(
185 ;CHECK: vceilf{{.*}}<4 x float>
187 declare float @ceilf(float) nounwind readnone
188 define void @ceil_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
190 %cmp6 = icmp sgt i32 %n, 0
191 br i1 %cmp6, label %for.body, label %for.end
193 for.body: ; preds = %entry, %for.body
194 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
195 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
196 %0 = load float, ptr %arrayidx, align 4
197 %call = tail call float @ceilf(float %0) nounwind readnone
198 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
199 store float %call, ptr %arrayidx2, align 4
200 %indvars.iv.next = add i64 %indvars.iv, 1
201 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
202 %exitcond = icmp eq i32 %lftr.wideiv, %n
203 br i1 %exitcond, label %for.end, label %for.body
205 for.end: ; preds = %for.body, %entry
209 ;CHECK-LABEL: @floor_f32(
210 ;CHECK: vfloorf{{.*}}<4 x float>
212 declare float @floorf(float) nounwind readnone
213 define void @floor_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
215 %cmp6 = icmp sgt i32 %n, 0
216 br i1 %cmp6, label %for.body, label %for.end
218 for.body: ; preds = %entry, %for.body
219 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
220 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
221 %0 = load float, ptr %arrayidx, align 4
222 %call = tail call float @floorf(float %0) nounwind readnone
223 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
224 store float %call, ptr %arrayidx2, align 4
225 %indvars.iv.next = add i64 %indvars.iv, 1
226 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
227 %exitcond = icmp eq i32 %lftr.wideiv, %n
228 br i1 %exitcond, label %for.end, label %for.body
230 for.end: ; preds = %for.body, %entry
234 ;CHECK-LABEL: @expm1_f32(
235 ;CHECK: vexpm1f{{.*}}<4 x float>
237 declare float @expm1f(float) nounwind readnone
238 define void @expm1_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
240 %cmp6 = icmp sgt i32 %n, 0
241 br i1 %cmp6, label %for.body, label %for.end
243 for.body: ; preds = %entry, %for.body
244 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
245 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
246 %0 = load float, ptr %arrayidx, align 4
247 %call = tail call float @expm1f(float %0) nounwind readnone
248 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
249 store float %call, ptr %arrayidx2, align 4
250 %indvars.iv.next = add i64 %indvars.iv, 1
251 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
252 %exitcond = icmp eq i32 %lftr.wideiv, %n
253 br i1 %exitcond, label %for.end, label %for.body
255 for.end: ; preds = %for.body, %entry
259 ;CHECK-LABEL: @log1p_f32(
260 ;CHECK: vlog1pf{{.*}}<4 x float>
262 declare float @log1pf(float) nounwind readnone
263 define void @log1p_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
265 %cmp6 = icmp sgt i32 %n, 0
266 br i1 %cmp6, label %for.body, label %for.end
268 for.body: ; preds = %entry, %for.body
269 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
270 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
271 %0 = load float, ptr %arrayidx, align 4
272 %call = tail call float @log1pf(float %0) nounwind readnone
273 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
274 store float %call, ptr %arrayidx2, align 4
275 %indvars.iv.next = add i64 %indvars.iv, 1
276 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
277 %exitcond = icmp eq i32 %lftr.wideiv, %n
278 br i1 %exitcond, label %for.end, label %for.body
280 for.end: ; preds = %for.body, %entry
284 ;CHECK-LABEL: @log10_f32(
285 ;CHECK: vlog10f{{.*}}<4 x float>
287 declare float @log10f(float) nounwind readnone
288 define void @log10_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
290 %cmp6 = icmp sgt i32 %n, 0
291 br i1 %cmp6, label %for.body, label %for.end
293 for.body: ; preds = %entry, %for.body
294 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
295 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
296 %0 = load float, ptr %arrayidx, align 4
297 %call = tail call float @log10f(float %0) nounwind readnone
298 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
299 store float %call, ptr %arrayidx2, align 4
300 %indvars.iv.next = add i64 %indvars.iv, 1
301 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
302 %exitcond = icmp eq i32 %lftr.wideiv, %n
303 br i1 %exitcond, label %for.end, label %for.body
305 for.end: ; preds = %for.body, %entry
309 ;CHECK-LABEL: @logb_f32(
310 ;CHECK: vlogbf{{.*}}<4 x float>
312 declare float @logbf(float) nounwind readnone
313 define void @logb_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
315 %cmp6 = icmp sgt i32 %n, 0
316 br i1 %cmp6, label %for.body, label %for.end
318 for.body: ; preds = %entry, %for.body
319 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
320 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
321 %0 = load float, ptr %arrayidx, align 4
322 %call = tail call float @logbf(float %0) nounwind readnone
323 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
324 store float %call, ptr %arrayidx2, align 4
325 %indvars.iv.next = add i64 %indvars.iv, 1
326 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
327 %exitcond = icmp eq i32 %lftr.wideiv, %n
328 br i1 %exitcond, label %for.end, label %for.body
330 for.end: ; preds = %for.body, %entry
334 ;CHECK-LABEL: @sin_f32(
335 ;CHECK: vsinf{{.*}}<4 x float>
337 declare float @sinf(float) nounwind readnone
338 define void @sin_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
340 %cmp6 = icmp sgt i32 %n, 0
341 br i1 %cmp6, label %for.body, label %for.end
343 for.body: ; preds = %entry, %for.body
344 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
345 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
346 %0 = load float, ptr %arrayidx, align 4
347 %call = tail call float @sinf(float %0) nounwind readnone
348 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
349 store float %call, ptr %arrayidx2, align 4
350 %indvars.iv.next = add i64 %indvars.iv, 1
351 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
352 %exitcond = icmp eq i32 %lftr.wideiv, %n
353 br i1 %exitcond, label %for.end, label %for.body
355 for.end: ; preds = %for.body, %entry
359 ;CHECK-LABEL: @cos_f32(
360 ;CHECK: vcosf{{.*}}<4 x float>
362 declare float @cosf(float) nounwind readnone
363 define void @cos_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
365 %cmp6 = icmp sgt i32 %n, 0
366 br i1 %cmp6, label %for.body, label %for.end
368 for.body: ; preds = %entry, %for.body
369 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
370 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
371 %0 = load float, ptr %arrayidx, align 4
372 %call = tail call float @cosf(float %0) nounwind readnone
373 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
374 store float %call, ptr %arrayidx2, align 4
375 %indvars.iv.next = add i64 %indvars.iv, 1
376 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
377 %exitcond = icmp eq i32 %lftr.wideiv, %n
378 br i1 %exitcond, label %for.end, label %for.body
380 for.end: ; preds = %for.body, %entry
384 ;CHECK-LABEL: @tan_f32(
385 ;CHECK: vtanf{{.*}}<4 x float>
387 declare float @tanf(float) nounwind readnone
388 define void @tan_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
390 %cmp6 = icmp sgt i32 %n, 0
391 br i1 %cmp6, label %for.body, label %for.end
393 for.body: ; preds = %entry, %for.body
394 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
395 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
396 %0 = load float, ptr %arrayidx, align 4
397 %call = tail call float @tanf(float %0) nounwind readnone
398 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
399 store float %call, ptr %arrayidx2, align 4
400 %indvars.iv.next = add i64 %indvars.iv, 1
401 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
402 %exitcond = icmp eq i32 %lftr.wideiv, %n
403 br i1 %exitcond, label %for.end, label %for.body
405 for.end: ; preds = %for.body, %entry
409 ;CHECK-LABEL: @tan_f32_intrinsic(
410 ;CHECK: vtanf{{.*}}<4 x float>
412 declare float @llvm.tan.f32(float) nounwind readnone
413 define void @tan_f32_intrinsic(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
415 %cmp6 = icmp sgt i32 %n, 0
416 br i1 %cmp6, label %for.body, label %for.end
418 for.body: ; preds = %entry, %for.body
419 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
420 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
421 %0 = load float, ptr %arrayidx, align 4
422 %call = tail call float @llvm.tan.f32(float %0) nounwind readnone
423 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
424 store float %call, ptr %arrayidx2, align 4
425 %indvars.iv.next = add i64 %indvars.iv, 1
426 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
427 %exitcond = icmp eq i32 %lftr.wideiv, %n
428 br i1 %exitcond, label %for.end, label %for.body
430 for.end: ; preds = %for.body, %entry
434 ;CHECK-LABEL: @asin_f32(
435 ;CHECK: vasinf{{.*}}<4 x float>
437 declare float @asinf(float) nounwind readnone
438 define void @asin_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
440 %cmp6 = icmp sgt i32 %n, 0
441 br i1 %cmp6, label %for.body, label %for.end
443 for.body: ; preds = %entry, %for.body
444 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
445 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
446 %0 = load float, ptr %arrayidx, align 4
447 %call = tail call float @asinf(float %0) nounwind readnone
448 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
449 store float %call, ptr %arrayidx2, align 4
450 %indvars.iv.next = add i64 %indvars.iv, 1
451 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
452 %exitcond = icmp eq i32 %lftr.wideiv, %n
453 br i1 %exitcond, label %for.end, label %for.body
455 for.end: ; preds = %for.body, %entry
459 ;CHECK-LABEL: @acos_f32(
460 ;CHECK: vacosf{{.*}}<4 x float>
462 declare float @acosf(float) nounwind readnone
463 define void @acos_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
465 %cmp6 = icmp sgt i32 %n, 0
466 br i1 %cmp6, label %for.body, label %for.end
468 for.body: ; preds = %entry, %for.body
469 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
470 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
471 %0 = load float, ptr %arrayidx, align 4
472 %call = tail call float @acosf(float %0) nounwind readnone
473 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
474 store float %call, ptr %arrayidx2, align 4
475 %indvars.iv.next = add i64 %indvars.iv, 1
476 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
477 %exitcond = icmp eq i32 %lftr.wideiv, %n
478 br i1 %exitcond, label %for.end, label %for.body
480 for.end: ; preds = %for.body, %entry
484 ;CHECK-LABEL: @atan_f32(
485 ;CHECK: vatanf{{.*}}<4 x float>
487 declare float @atanf(float) nounwind readnone
488 define void @atan_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
490 %cmp6 = icmp sgt i32 %n, 0
491 br i1 %cmp6, label %for.body, label %for.end
493 for.body: ; preds = %entry, %for.body
494 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
495 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
496 %0 = load float, ptr %arrayidx, align 4
497 %call = tail call float @atanf(float %0) nounwind readnone
498 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
499 store float %call, ptr %arrayidx2, align 4
500 %indvars.iv.next = add i64 %indvars.iv, 1
501 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
502 %exitcond = icmp eq i32 %lftr.wideiv, %n
503 br i1 %exitcond, label %for.end, label %for.body
505 for.end: ; preds = %for.body, %entry
509 ;CHECK-LABEL: @sinh_f32(
510 ;CHECK: vsinhf{{.*}}<4 x float>
512 declare float @sinhf(float) nounwind readnone
513 define void @sinh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
515 %cmp6 = icmp sgt i32 %n, 0
516 br i1 %cmp6, label %for.body, label %for.end
518 for.body: ; preds = %entry, %for.body
519 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
520 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
521 %0 = load float, ptr %arrayidx, align 4
522 %call = tail call float @sinhf(float %0) nounwind readnone
523 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
524 store float %call, ptr %arrayidx2, align 4
525 %indvars.iv.next = add i64 %indvars.iv, 1
526 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
527 %exitcond = icmp eq i32 %lftr.wideiv, %n
528 br i1 %exitcond, label %for.end, label %for.body
530 for.end: ; preds = %for.body, %entry
534 ;CHECK-LABEL: @cosh_f32(
535 ;CHECK: vcoshf{{.*}}<4 x float>
537 declare float @coshf(float) nounwind readnone
538 define void @cosh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
540 %cmp6 = icmp sgt i32 %n, 0
541 br i1 %cmp6, label %for.body, label %for.end
543 for.body: ; preds = %entry, %for.body
544 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
545 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
546 %0 = load float, ptr %arrayidx, align 4
547 %call = tail call float @coshf(float %0) nounwind readnone
548 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
549 store float %call, ptr %arrayidx2, align 4
550 %indvars.iv.next = add i64 %indvars.iv, 1
551 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
552 %exitcond = icmp eq i32 %lftr.wideiv, %n
553 br i1 %exitcond, label %for.end, label %for.body
555 for.end: ; preds = %for.body, %entry
559 ;CHECK-LABEL: @tanh_f32(
560 ;CHECK: vtanhf{{.*}}<4 x float>
562 declare float @tanhf(float) nounwind readnone
563 define void @tanh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
565 %cmp6 = icmp sgt i32 %n, 0
566 br i1 %cmp6, label %for.body, label %for.end
568 for.body: ; preds = %entry, %for.body
569 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
570 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
571 %0 = load float, ptr %arrayidx, align 4
572 %call = tail call float @tanhf(float %0) nounwind readnone
573 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
574 store float %call, ptr %arrayidx2, align 4
575 %indvars.iv.next = add i64 %indvars.iv, 1
576 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
577 %exitcond = icmp eq i32 %lftr.wideiv, %n
578 br i1 %exitcond, label %for.end, label %for.body
580 for.end: ; preds = %for.body, %entry
584 ;CHECK-LABEL: @asinh_f32(
585 ;CHECK: vasinhf{{.*}}<4 x float>
587 declare float @asinhf(float) nounwind readnone
588 define void @asinh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
590 %cmp6 = icmp sgt i32 %n, 0
591 br i1 %cmp6, label %for.body, label %for.end
593 for.body: ; preds = %entry, %for.body
594 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
595 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
596 %0 = load float, ptr %arrayidx, align 4
597 %call = tail call float @asinhf(float %0) nounwind readnone
598 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
599 store float %call, ptr %arrayidx2, align 4
600 %indvars.iv.next = add i64 %indvars.iv, 1
601 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
602 %exitcond = icmp eq i32 %lftr.wideiv, %n
603 br i1 %exitcond, label %for.end, label %for.body
605 for.end: ; preds = %for.body, %entry
609 ;CHECK-LABEL: @acosh_f32(
610 ;CHECK: vacoshf{{.*}}<4 x float>
612 declare float @acoshf(float) nounwind readnone
613 define void @acosh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
615 %cmp6 = icmp sgt i32 %n, 0
616 br i1 %cmp6, label %for.body, label %for.end
618 for.body: ; preds = %entry, %for.body
619 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
620 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
621 %0 = load float, ptr %arrayidx, align 4
622 %call = tail call float @acoshf(float %0) nounwind readnone
623 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
624 store float %call, ptr %arrayidx2, align 4
625 %indvars.iv.next = add i64 %indvars.iv, 1
626 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
627 %exitcond = icmp eq i32 %lftr.wideiv, %n
628 br i1 %exitcond, label %for.end, label %for.body
630 for.end: ; preds = %for.body, %entry
634 ;CHECK-LABEL: @atanh_f32(
635 ;CHECK: vatanhf{{.*}}<4 x float>
637 declare float @atanhf(float) nounwind readnone
638 define void @atanh_f32(i32 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable {
640 %cmp6 = icmp sgt i32 %n, 0
641 br i1 %cmp6, label %for.body, label %for.end
643 for.body: ; preds = %entry, %for.body
644 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
645 %arrayidx = getelementptr inbounds float, ptr %y, i64 %indvars.iv
646 %0 = load float, ptr %arrayidx, align 4
647 %call = tail call float @atanhf(float %0) nounwind readnone
648 %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %indvars.iv
649 store float %call, ptr %arrayidx2, align 4
650 %indvars.iv.next = add i64 %indvars.iv, 1
651 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
652 %exitcond = icmp eq i32 %lftr.wideiv, %n
653 br i1 %exitcond, label %for.end, label %for.body
655 for.end: ; preds = %for.body, %entry