1 ; RUN: opt < %s -vector-library=Darwin_libsystem_m -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 = "arm64-apple-darwin"
6 declare float @expf(float) nounwind readnone
7 define void @expf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
8 ; CHECK-LABEL: @expf_v4f32(
9 ; CHECK: call <4 x float> @_simd_exp_f4(
16 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
17 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
18 %lv = load float, ptr %gep.y, align 4
19 %call = tail call float @expf(float %lv)
20 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
21 store float %call, ptr %gep.x, align 4
22 %iv.next = add i64 %iv, 1
23 %exitcond = icmp eq i64 %iv.next, %n
24 br i1 %exitcond, label %for.end, label %for.body
30 declare double @exp(double) nounwind readnone
31 define void @exp_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
32 ; CHECK-LABEL: @exp_v2f64(
33 ; CHECK: call <2 x double> @_simd_exp_d2(
40 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
41 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
42 %lv = load double, ptr %gep.y, align 4
43 %call = tail call double @exp(double %lv)
44 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
45 store double %call, ptr %gep.x, align 4
46 %iv.next = add i64 %iv, 1
47 %exitcond = icmp eq i64 %iv.next, %n
48 br i1 %exitcond, label %for.end, label %for.body
54 declare float @acosf(float) nounwind readnone
55 define void @acos_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
56 ; CHECK-LABEL: @acos_v4f32(
57 ; CHECK: call <4 x float> @_simd_acos_f4(
64 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
65 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
66 %lv = load float, ptr %gep.y, align 4
67 %call = tail call float @acosf(float %lv)
68 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
69 store float %call, ptr %gep.x, align 4
70 %iv.next = add i64 %iv, 1
71 %exitcond = icmp eq i64 %iv.next, %n
72 br i1 %exitcond, label %for.end, label %for.body
78 declare double @acos(double) nounwind readnone
79 define void @acos_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
80 ; CHECK-LABEL: @acos_v2f64(
81 ; CHECK: call <2 x double> @_simd_acos_d2(
88 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
89 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
90 %lv = load double, ptr %gep.y, align 4
91 %call = tail call double @acos(double %lv)
92 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
93 store double %call, ptr %gep.x, align 4
94 %iv.next = add i64 %iv, 1
95 %exitcond = icmp eq i64 %iv.next, %n
96 br i1 %exitcond, label %for.end, label %for.body
102 declare float @asinf(float) nounwind readnone
103 define void @asinf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
104 ; CHECK-LABEL: @asinf_v4f32(
105 ; CHECK: call <4 x float> @_simd_asin_f4(
112 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
113 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
114 %lv = load float, ptr %gep.y, align 4
115 %call = tail call float @asinf(float %lv)
116 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
117 store float %call, ptr %gep.x, align 4
118 %iv.next = add i64 %iv, 1
119 %exitcond = icmp eq i64 %iv.next, %n
120 br i1 %exitcond, label %for.end, label %for.body
126 declare double @asin(double) nounwind readnone
127 define void @asin_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
128 ; CHECK-LABEL: @asin_v2f64(
129 ; CHECK: call <2 x double> @_simd_asin_d2(
136 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
137 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
138 %lv = load double, ptr %gep.y, align 4
139 %call = tail call double @asin(double %lv)
140 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
141 store double %call, ptr %gep.x, align 4
142 %iv.next = add i64 %iv, 1
143 %exitcond = icmp eq i64 %iv.next, %n
144 br i1 %exitcond, label %for.end, label %for.body
150 declare float @atanf(float) nounwind readnone
151 define void @atanf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
152 ; CHECK-LABEL: @atanf_v4f32(
153 ; CHECK: call <4 x float> @_simd_atan_f4(
160 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
161 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
162 %lv = load float, ptr %gep.y, align 4
163 %call = tail call float @atanf(float %lv)
164 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
165 store float %call, ptr %gep.x, align 4
166 %iv.next = add i64 %iv, 1
167 %exitcond = icmp eq i64 %iv.next, %n
168 br i1 %exitcond, label %for.end, label %for.body
174 declare double @atan(double) nounwind readnone
175 define void @atan_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
176 ; CHECK-LABEL: @atan_v2f64(
177 ; CHECK: call <2 x double> @_simd_atan_d2(
184 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
185 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
186 %lv = load double, ptr %gep.y, align 4
187 %call = tail call double @atan(double %lv)
188 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
189 store double %call, ptr %gep.x, align 4
190 %iv.next = add i64 %iv, 1
191 %exitcond = icmp eq i64 %iv.next, %n
192 br i1 %exitcond, label %for.end, label %for.body
198 declare float @atan2f(float, float) nounwind readnone
199 define void @atan2f_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
200 ; CHECK-LABEL: @atan2f_v4f32(
201 ; CHECK: call <4 x float> @_simd_atan2_f4(
208 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
209 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
210 %lv = load float, ptr %gep.y, align 4
211 %call = tail call float @atan2f(float %lv, float %lv)
212 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
213 store float %call, ptr %gep.x, align 4
214 %iv.next = add i64 %iv, 1
215 %exitcond = icmp eq i64 %iv.next, %n
216 br i1 %exitcond, label %for.end, label %for.body
222 declare double @atan2(double, double) nounwind readnone
223 define void @atan2_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
224 ; CHECK-LABEL: @atan2_v2f64(
225 ; CHECK: call <2 x double> @_simd_atan2_d2(
232 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
233 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
234 %lv = load double, ptr %gep.y, align 4
235 %call = tail call double @atan2(double %lv, double %lv)
236 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
237 store double %call, ptr %gep.x, align 4
238 %iv.next = add i64 %iv, 1
239 %exitcond = icmp eq i64 %iv.next, %n
240 br i1 %exitcond, label %for.end, label %for.body
246 declare float @cosf(float) nounwind readnone
247 define void @cosf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
248 ; CHECK-LABEL: @cosf_v4f32(
249 ; CHECK: call <4 x float> @_simd_cos_f4(
256 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
257 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
258 %lv = load float, ptr %gep.y, align 4
259 %call = tail call float @cosf(float %lv)
260 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
261 store float %call, ptr %gep.x, align 4
262 %iv.next = add i64 %iv, 1
263 %exitcond = icmp eq i64 %iv.next, %n
264 br i1 %exitcond, label %for.end, label %for.body
270 declare double @cos(double) nounwind readnone
271 define void @cos_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
272 ; CHECK-LABEL: @cos_v2f64(
273 ; CHECK: call <2 x double> @_simd_cos_d2(
280 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
281 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
282 %lv = load double, ptr %gep.y, align 4
283 %call = tail call double @cos(double %lv)
284 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
285 store double %call, ptr %gep.x, align 4
286 %iv.next = add i64 %iv, 1
287 %exitcond = icmp eq i64 %iv.next, %n
288 br i1 %exitcond, label %for.end, label %for.body
294 declare float @sinf(float) nounwind readnone
295 define void @sinf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
296 ; CHECK-LABEL: @sinf_v4f32(
297 ; CHECK: call <4 x float> @_simd_sin_f4(
304 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
305 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
306 %lv = load float, ptr %gep.y, align 4
307 %call = tail call float @sinf(float %lv)
308 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
309 store float %call, ptr %gep.x, align 4
310 %iv.next = add i64 %iv, 1
311 %exitcond = icmp eq i64 %iv.next, %n
312 br i1 %exitcond, label %for.end, label %for.body
318 declare double @sin(double) nounwind readnone
319 define void @sin_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
320 ; CHECK-LABEL: @sin_v2f64(
321 ; CHECK: call <2 x double> @_simd_sin_d2(
328 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
329 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
330 %lv = load double, ptr %gep.y, align 4
331 %call = tail call double @sin(double %lv)
332 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
333 store double %call, ptr %gep.x, align 4
334 %iv.next = add i64 %iv, 1
335 %exitcond = icmp eq i64 %iv.next, %n
336 br i1 %exitcond, label %for.end, label %for.body
342 declare float @tanf(float) nounwind readnone
343 define void @tanf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
344 ; CHECK-LABEL: @tanf_v4f32(
345 ; CHECK: call <4 x float> @_simd_tan_f4(
352 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
353 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
354 %lv = load float, ptr %gep.y, align 4
355 %call = tail call float @tanf(float %lv)
356 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
357 store float %call, ptr %gep.x, align 4
358 %iv.next = add i64 %iv, 1
359 %exitcond = icmp eq i64 %iv.next, %n
360 br i1 %exitcond, label %for.end, label %for.body
366 declare double @tan(double) nounwind readnone
367 define void @tan_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
368 ; CHECK-LABEL: @tan_v2f64(
369 ; CHECK: call <2 x double> @_simd_tan_d2(
376 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
377 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
378 %lv = load double, ptr %gep.y, align 4
379 %call = tail call double @tan(double %lv)
380 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
381 store double %call, ptr %gep.x, align 4
382 %iv.next = add i64 %iv, 1
383 %exitcond = icmp eq i64 %iv.next, %n
384 br i1 %exitcond, label %for.end, label %for.body
390 declare float @llvm.tan.f32(float) nounwind readnone
391 define void @tan_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
392 ; CHECK-LABEL: @tan_v4f32_intrinsic(
393 ; CHECK: call <4 x float> @_simd_tan_f4(<4 x float>
400 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
401 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
402 %lv = load float, ptr %gep.y, align 4
403 %call = tail call float @llvm.tan.f32(float %lv)
404 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
405 store float %call, ptr %gep.x, align 4
406 %iv.next = add i64 %iv, 1
407 %exitcond = icmp eq i64 %iv.next, %n
408 br i1 %exitcond, label %for.end, label %for.body
414 declare double @llvm.tan.f64(double) nounwind readnone
415 define void @tan_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
416 ; CHECK-LABEL: @tan_v2f64_intrinsic(
417 ; CHECK: call <2 x double> @_simd_tan_d2(<2 x double>
424 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
425 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
426 %lv = load double, ptr %gep.y, align 4
427 %call = tail call double @llvm.tan.f64(double %lv)
428 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
429 store double %call, ptr %gep.x, align 4
430 %iv.next = add i64 %iv, 1
431 %exitcond = icmp eq i64 %iv.next, %n
432 br i1 %exitcond, label %for.end, label %for.body
438 declare float @llvm.acos.f32(float) nounwind readnone
439 define void @acos_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
440 ; CHECK-LABEL: @acos_v4f32_intrinsic(
441 ; CHECK: call <4 x float> @_simd_acos_f4(<4 x float>
448 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
449 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
450 %lv = load float, ptr %gep.y, align 4
451 %call = tail call float @llvm.acos.f32(float %lv)
452 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
453 store float %call, ptr %gep.x, align 4
454 %iv.next = add i64 %iv, 1
455 %exitcond = icmp eq i64 %iv.next, %n
456 br i1 %exitcond, label %for.end, label %for.body
462 declare double @llvm.acos.f64(double) nounwind readnone
463 define void @acos_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
464 ; CHECK-LABEL: @acos_v2f64_intrinsic(
465 ; CHECK: call <2 x double> @_simd_acos_d2(<2 x double>
472 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
473 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
474 %lv = load double, ptr %gep.y, align 4
475 %call = tail call double @llvm.acos.f64(double %lv)
476 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
477 store double %call, ptr %gep.x, align 4
478 %iv.next = add i64 %iv, 1
479 %exitcond = icmp eq i64 %iv.next, %n
480 br i1 %exitcond, label %for.end, label %for.body
486 declare float @llvm.asin.f32(float) nounwind readnone
487 define void @asin_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
488 ; CHECK-LABEL: @asin_v4f32_intrinsic(
489 ; CHECK: call <4 x float> @_simd_asin_f4(<4 x float>
496 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
497 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
498 %lv = load float, ptr %gep.y, align 4
499 %call = tail call float @llvm.asin.f32(float %lv)
500 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
501 store float %call, ptr %gep.x, align 4
502 %iv.next = add i64 %iv, 1
503 %exitcond = icmp eq i64 %iv.next, %n
504 br i1 %exitcond, label %for.end, label %for.body
510 declare double @llvm.asin.f64(double) nounwind readnone
511 define void @asin_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
512 ; CHECK-LABEL: @asin_v2f64_intrinsic(
513 ; CHECK: call <2 x double> @_simd_asin_d2(<2 x double>
520 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
521 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
522 %lv = load double, ptr %gep.y, align 4
523 %call = tail call double @llvm.asin.f64(double %lv)
524 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
525 store double %call, ptr %gep.x, align 4
526 %iv.next = add i64 %iv, 1
527 %exitcond = icmp eq i64 %iv.next, %n
528 br i1 %exitcond, label %for.end, label %for.body
534 declare float @llvm.atan.f32(float) nounwind readnone
535 define void @atan_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
536 ; CHECK-LABEL: @atan_v4f32_intrinsic(
537 ; CHECK: call <4 x float> @_simd_atan_f4(<4 x float>
544 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
545 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
546 %lv = load float, ptr %gep.y, align 4
547 %call = tail call float @llvm.atan.f32(float %lv)
548 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
549 store float %call, ptr %gep.x, align 4
550 %iv.next = add i64 %iv, 1
551 %exitcond = icmp eq i64 %iv.next, %n
552 br i1 %exitcond, label %for.end, label %for.body
558 declare double @llvm.atan.f64(double) nounwind readnone
559 define void @atan_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
560 ; CHECK-LABEL: @atan_v2f64_intrinsic(
561 ; CHECK: call <2 x double> @_simd_atan_d2(<2 x double>
568 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
569 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
570 %lv = load double, ptr %gep.y, align 4
571 %call = tail call double @llvm.atan.f64(double %lv)
572 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
573 store double %call, ptr %gep.x, align 4
574 %iv.next = add i64 %iv, 1
575 %exitcond = icmp eq i64 %iv.next, %n
576 br i1 %exitcond, label %for.end, label %for.body
582 declare float @llvm.atan2.f32(float, float) nounwind readnone
583 define void @atan2_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
584 ; CHECK-LABEL: @atan2_v4f32_intrinsic(
585 ; CHECK: call <4 x float> @_simd_atan2_f4(<4 x float>
592 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
593 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
594 %lv = load float, ptr %gep.y, align 4
595 %call = tail call float @llvm.atan2.f32(float %lv, float %lv)
596 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
597 store float %call, ptr %gep.x, align 4
598 %iv.next = add i64 %iv, 1
599 %exitcond = icmp eq i64 %iv.next, %n
600 br i1 %exitcond, label %for.end, label %for.body
606 declare double @llvm.atan2.f64(double, double) nounwind readnone
607 define void @atan2_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
608 ; CHECK-LABEL: @atan2_v2f64_intrinsic(
609 ; CHECK: call <2 x double> @_simd_atan2_d2(<2 x double>
616 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
617 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
618 %lv = load double, ptr %gep.y, align 4
619 %call = tail call double @llvm.atan2.f64(double %lv, double %lv)
620 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
621 store double %call, ptr %gep.x, align 4
622 %iv.next = add i64 %iv, 1
623 %exitcond = icmp eq i64 %iv.next, %n
624 br i1 %exitcond, label %for.end, label %for.body
630 declare float @llvm.cosh.f32(float) nounwind readnone
631 define void @cosh_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
632 ; CHECK-LABEL: @cosh_v4f32_intrinsic(
633 ; CHECK: call <4 x float> @_simd_cosh_f4(<4 x float>
640 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
641 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
642 %lv = load float, ptr %gep.y, align 4
643 %call = tail call float @llvm.cosh.f32(float %lv)
644 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
645 store float %call, ptr %gep.x, align 4
646 %iv.next = add i64 %iv, 1
647 %exitcond = icmp eq i64 %iv.next, %n
648 br i1 %exitcond, label %for.end, label %for.body
654 declare double @llvm.cosh.f64(double) nounwind readnone
655 define void @cosh_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
656 ; CHECK-LABEL: @cosh_v2f64_intrinsic(
657 ; CHECK: call <2 x double> @_simd_cosh_d2(<2 x double>
664 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
665 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
666 %lv = load double, ptr %gep.y, align 4
667 %call = tail call double @llvm.cosh.f64(double %lv)
668 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
669 store double %call, ptr %gep.x, align 4
670 %iv.next = add i64 %iv, 1
671 %exitcond = icmp eq i64 %iv.next, %n
672 br i1 %exitcond, label %for.end, label %for.body
678 declare float @llvm.sinh.f32(float) nounwind readnone
679 define void @sinh_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
680 ; CHECK-LABEL: @sinh_v4f32_intrinsic(
681 ; CHECK: call <4 x float> @_simd_sinh_f4(<4 x float>
688 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
689 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
690 %lv = load float, ptr %gep.y, align 4
691 %call = tail call float @llvm.sinh.f32(float %lv)
692 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
693 store float %call, ptr %gep.x, align 4
694 %iv.next = add i64 %iv, 1
695 %exitcond = icmp eq i64 %iv.next, %n
696 br i1 %exitcond, label %for.end, label %for.body
702 declare double @llvm.sinh.f64(double) nounwind readnone
703 define void @sinh_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
704 ; CHECK-LABEL: @sinh_v2f64_intrinsic(
705 ; CHECK: call <2 x double> @_simd_sinh_d2(<2 x double>
712 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
713 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
714 %lv = load double, ptr %gep.y, align 4
715 %call = tail call double @llvm.sinh.f64(double %lv)
716 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
717 store double %call, ptr %gep.x, align 4
718 %iv.next = add i64 %iv, 1
719 %exitcond = icmp eq i64 %iv.next, %n
720 br i1 %exitcond, label %for.end, label %for.body
726 declare float @llvm.tanh.f32(float) nounwind readnone
727 define void @tanh_v4f32_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
728 ; CHECK-LABEL: @tanh_v4f32_intrinsic(
729 ; CHECK: call <4 x float> @_simd_tanh_f4(<4 x float>
736 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
737 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
738 %lv = load float, ptr %gep.y, align 4
739 %call = tail call float @llvm.tanh.f32(float %lv)
740 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
741 store float %call, ptr %gep.x, align 4
742 %iv.next = add i64 %iv, 1
743 %exitcond = icmp eq i64 %iv.next, %n
744 br i1 %exitcond, label %for.end, label %for.body
750 declare double @llvm.tanh.f64(double) nounwind readnone
751 define void @tanh_v2f64_intrinsic(i64 %n, ptr noalias %y, ptr noalias %x) {
752 ; CHECK-LABEL: @tanh_v2f64_intrinsic(
753 ; CHECK: call <2 x double> @_simd_tanh_d2(<2 x double>
760 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
761 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
762 %lv = load double, ptr %gep.y, align 4
763 %call = tail call double @llvm.tanh.f64(double %lv)
764 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
765 store double %call, ptr %gep.x, align 4
766 %iv.next = add i64 %iv, 1
767 %exitcond = icmp eq i64 %iv.next, %n
768 br i1 %exitcond, label %for.end, label %for.body
775 declare float @cbrtf(float) nounwind readnone
776 define void @cbrtf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
777 ; CHECK-LABEL: @cbrtf_v4f32(
778 ; CHECK: call <4 x float> @_simd_cbrt_f4(
785 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
786 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
787 %lv = load float, ptr %gep.y, align 4
788 %call = tail call float @cbrtf(float %lv)
789 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
790 store float %call, ptr %gep.x, align 4
791 %iv.next = add i64 %iv, 1
792 %exitcond = icmp eq i64 %iv.next, %n
793 br i1 %exitcond, label %for.end, label %for.body
799 declare double @cbrt(double) nounwind readnone
800 define void @cbrt_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
801 ; CHECK-LABEL: @cbrt_v2f64(
802 ; CHECK: call <2 x double> @_simd_cbrt_d2(
809 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
810 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
811 %lv = load double, ptr %gep.y, align 4
812 %call = tail call double @cbrt(double %lv)
813 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
814 store double %call, ptr %gep.x, align 4
815 %iv.next = add i64 %iv, 1
816 %exitcond = icmp eq i64 %iv.next, %n
817 br i1 %exitcond, label %for.end, label %for.body
823 declare float @erff(float) nounwind readnone
824 define void @erff_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
825 ; CHECK-LABEL: @erff_v4f32(
826 ; CHECK: call <4 x float> @_simd_erf_f4(
833 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
834 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
835 %lv = load float, ptr %gep.y, align 4
836 %call = tail call float @erff(float %lv)
837 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
838 store float %call, ptr %gep.x, align 4
839 %iv.next = add i64 %iv, 1
840 %exitcond = icmp eq i64 %iv.next, %n
841 br i1 %exitcond, label %for.end, label %for.body
847 declare double @erf(double) nounwind readnone
848 define void @erf_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
849 ; CHECK-LABEL: @erf_v2f64(
850 ; CHECK: call <2 x double> @_simd_erf_d2(
857 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
858 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
859 %lv = load double, ptr %gep.y, align 4
860 %call = tail call double @erf(double %lv)
861 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
862 store double %call, ptr %gep.x, align 4
863 %iv.next = add i64 %iv, 1
864 %exitcond = icmp eq i64 %iv.next, %n
865 br i1 %exitcond, label %for.end, label %for.body
871 declare float @powf(float, float) nounwind readnone
872 define void @powf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
873 ; CHECK-LABEL: @powf_v4f32(
874 ; CHECK: call <4 x float> @_simd_pow_f4(
881 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
882 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
883 %lv = load float, ptr %gep.y, align 4
884 %call = tail call float @powf(float %lv, float %lv)
885 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
886 store float %call, ptr %gep.x, align 4
887 %iv.next = add i64 %iv, 1
888 %exitcond = icmp eq i64 %iv.next, %n
889 br i1 %exitcond, label %for.end, label %for.body
895 declare double @pow(double, double) nounwind readnone
896 define void @pow_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
897 ; CHECK-LABEL: @pow_v2f64(
898 ; CHECK: call <2 x double> @_simd_pow_d2(
905 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
906 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
907 %lv = load double, ptr %gep.y, align 4
908 %call = tail call double @pow(double %lv, double %lv)
909 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
910 store double %call, ptr %gep.x, align 4
911 %iv.next = add i64 %iv, 1
912 %exitcond = icmp eq i64 %iv.next, %n
913 br i1 %exitcond, label %for.end, label %for.body
919 declare float @sinhf(float) nounwind readnone
920 define void @sinhf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
921 ; CHECK-LABEL: @sinhf_v4f32(
922 ; CHECK: call <4 x float> @_simd_sinh_f4(
929 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
930 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
931 %lv = load float, ptr %gep.y, align 4
932 %call = tail call float @sinhf(float %lv)
933 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
934 store float %call, ptr %gep.x, align 4
935 %iv.next = add i64 %iv, 1
936 %exitcond = icmp eq i64 %iv.next, %n
937 br i1 %exitcond, label %for.end, label %for.body
943 declare double @sinh(double) nounwind readnone
944 define void @sinh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
945 ; CHECK-LABEL: @sinh_v2f64(
946 ; CHECK: call <2 x double> @_simd_sinh_d2(
953 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
954 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
955 %lv = load double, ptr %gep.y, align 4
956 %call = tail call double @sinh(double %lv)
957 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
958 store double %call, ptr %gep.x, align 4
959 %iv.next = add i64 %iv, 1
960 %exitcond = icmp eq i64 %iv.next, %n
961 br i1 %exitcond, label %for.end, label %for.body
967 declare float @coshf(float) nounwind readnone
968 define void @coshf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
969 ; CHECK-LABEL: @coshf_v4f32(
970 ; CHECK: call <4 x float> @_simd_cosh_f4(
977 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
978 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
979 %lv = load float, ptr %gep.y, align 4
980 %call = tail call float @coshf(float %lv)
981 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
982 store float %call, ptr %gep.x, align 4
983 %iv.next = add i64 %iv, 1
984 %exitcond = icmp eq i64 %iv.next, %n
985 br i1 %exitcond, label %for.end, label %for.body
991 declare double @cosh(double) nounwind readnone
992 define void @cosh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
993 ; CHECK-LABEL: @cosh_v2f64(
994 ; CHECK: call <2 x double> @_simd_cosh_d2(
1001 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1002 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
1003 %lv = load double, ptr %gep.y, align 4
1004 %call = tail call double @cosh(double %lv)
1005 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
1006 store double %call, ptr %gep.x, align 4
1007 %iv.next = add i64 %iv, 1
1008 %exitcond = icmp eq i64 %iv.next, %n
1009 br i1 %exitcond, label %for.end, label %for.body
1015 declare float @tanhf(float) nounwind readnone
1016 define void @tanhf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
1017 ; CHECK-LABEL: @tanhf_v4f32(
1018 ; CHECK: call <4 x float> @_simd_tanh_f4(
1025 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1026 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
1027 %lv = load float, ptr %gep.y, align 4
1028 %call = tail call float @tanhf(float %lv)
1029 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
1030 store float %call, ptr %gep.x, align 4
1031 %iv.next = add i64 %iv, 1
1032 %exitcond = icmp eq i64 %iv.next, %n
1033 br i1 %exitcond, label %for.end, label %for.body
1039 declare double @tanh(double) nounwind readnone
1040 define void @tanh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
1041 ; CHECK-LABEL: @tanh_v2f64(
1042 ; CHECK: call <2 x double> @_simd_tanh_d2(
1049 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1050 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
1051 %lv = load double, ptr %gep.y, align 4
1052 %call = tail call double @tanh(double %lv)
1053 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
1054 store double %call, ptr %gep.x, align 4
1055 %iv.next = add i64 %iv, 1
1056 %exitcond = icmp eq i64 %iv.next, %n
1057 br i1 %exitcond, label %for.end, label %for.body
1063 declare float @asinhf(float) nounwind readnone
1064 define void @asinhf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
1065 ; CHECK-LABEL: @asinhf_v4f32(
1066 ; CHECK: call <4 x float> @_simd_asinh_f4(
1073 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1074 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
1075 %lv = load float, ptr %gep.y, align 4
1076 %call = tail call float @asinhf(float %lv)
1077 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
1078 store float %call, ptr %gep.x, align 4
1079 %iv.next = add i64 %iv, 1
1080 %exitcond = icmp eq i64 %iv.next, %n
1081 br i1 %exitcond, label %for.end, label %for.body
1087 declare double @asinh(double) nounwind readnone
1088 define void @asinh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
1089 ; CHECK-LABEL: @asinh_v2f64(
1090 ; CHECK: call <2 x double> @_simd_asinh_d2(
1097 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1098 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
1099 %lv = load double, ptr %gep.y, align 4
1100 %call = tail call double @asinh(double %lv)
1101 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
1102 store double %call, ptr %gep.x, align 4
1103 %iv.next = add i64 %iv, 1
1104 %exitcond = icmp eq i64 %iv.next, %n
1105 br i1 %exitcond, label %for.end, label %for.body
1111 declare float @acoshf(float) nounwind readnone
1112 define void @acoshf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
1113 ; CHECK-LABEL: @acoshf_v4f32(
1114 ; CHECK: call <4 x float> @_simd_acosh_f4(
1121 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1122 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
1123 %lv = load float, ptr %gep.y, align 4
1124 %call = tail call float @acoshf(float %lv)
1125 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
1126 store float %call, ptr %gep.x, align 4
1127 %iv.next = add i64 %iv, 1
1128 %exitcond = icmp eq i64 %iv.next, %n
1129 br i1 %exitcond, label %for.end, label %for.body
1135 declare double @acosh(double) nounwind readnone
1136 define void @acosh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
1137 ; CHECK-LABEL: @acosh_v2f64(
1138 ; CHECK: call <2 x double> @_simd_acosh_d2(
1145 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1146 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
1147 %lv = load double, ptr %gep.y, align 4
1148 %call = tail call double @acosh(double %lv)
1149 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
1150 store double %call, ptr %gep.x, align 4
1151 %iv.next = add i64 %iv, 1
1152 %exitcond = icmp eq i64 %iv.next, %n
1153 br i1 %exitcond, label %for.end, label %for.body
1159 declare float @atanhf(float) nounwind readnone
1160 define void @atanhf_v4f32(i64 %n, ptr noalias %y, ptr noalias %x) {
1161 ; CHECK-LABEL: @atanhf_v4f32(
1162 ; CHECK: call <4 x float> @_simd_atanh_f4(
1169 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1170 %gep.y = getelementptr inbounds float, ptr %y, i64 %iv
1171 %lv = load float, ptr %gep.y, align 4
1172 %call = tail call float @atanhf(float %lv)
1173 %gep.x = getelementptr inbounds float, ptr %x, i64 %iv
1174 store float %call, ptr %gep.x, align 4
1175 %iv.next = add i64 %iv, 1
1176 %exitcond = icmp eq i64 %iv.next, %n
1177 br i1 %exitcond, label %for.end, label %for.body
1183 declare double @atanh(double) nounwind readnone
1184 define void @atanh_v2f64(i64 %n, ptr noalias %y, ptr noalias %x) {
1185 ; CHECK-LABEL: @atanh_v2f64(
1186 ; CHECK: call <2 x double> @_simd_atanh_d2(
1193 %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ]
1194 %gep.y = getelementptr inbounds double, ptr %y, i64 %iv
1195 %lv = load double, ptr %gep.y, align 4
1196 %call = tail call double @atanh(double %lv)
1197 %gep.x = getelementptr inbounds double, ptr %x, i64 %iv
1198 store double %call, ptr %gep.x, align 4
1199 %iv.next = add i64 %iv, 1
1200 %exitcond = icmp eq i64 %iv.next, %n
1201 br i1 %exitcond, label %for.end, label %for.body