xref: /llvm-project/llvm/test/Transforms/LoopVectorize/PowerPC/massv-calls.ll (revision 818d715989a82a54bac038b9c293e34dbea45f5c)
1; RUN: opt -vector-library=MASSV -mtriple=powerpc64le-unknown-linux-gnu -passes=inject-tli-mappings,loop-vectorize -force-vector-interleave=1 -S < %s | FileCheck %s
2; RUN: opt -vector-library=MASSV -vec-extabi -mattr=+altivec -mcpu=ppc64 -mtriple=powerpc64-ibm-aix-xcoff -passes=inject-tli-mappings,loop-vectorize -force-vector-interleave=1 -S < %s | FileCheck %s
3
4declare double @cbrt(double) #0
5declare float @cbrtf(float) #0
6
7declare double @pow(double, double) #0
8declare double @llvm.pow.f64(double, double) #0
9declare float @powf(float, float) #0
10declare float @llvm.pow.f32(float, float) #0
11
12declare double @sqrt(double) #0
13declare float @sqrtf(float) #0
14
15declare double @exp(double) #0
16declare double @llvm.exp.f64(double) #0
17declare float @expf(float) #0
18declare float @llvm.exp.f32(float) #0
19
20declare double @exp2(double) #0
21declare double @llvm.exp2.f64(double) #0
22declare float @exp2f(float) #0
23declare float @llvm.exp2.f32(float) #0
24
25declare double @expm1(double) #0
26declare float @expm1f(float) #0
27
28declare double @log(double) #0
29declare double @llvm.log.f64(double) #0
30declare float @logf(float) #0
31declare float @llvm.log.f32(float) #0
32
33declare double @log1p(double) #0
34declare float @log1pf(float) #0
35
36declare double @log10(double) #0
37declare double @llvm.log10.f64(double) #0
38declare float @log10f(float) #0
39declare float @llvm.log10.f32(float) #0
40
41declare double @log2(double) #0
42declare double @llvm.log2.f64(double) #0
43declare float @log2f(float) #0
44declare float @llvm.log2.f32(float) #0
45
46declare double @sin(double) #0
47declare double @llvm.sin.f64(double) #0
48declare float @sinf(float) #0
49declare float @llvm.sin.f32(float) #0
50
51declare double @cos(double) #0
52declare double @llvm.cos.f64(double) #0
53declare float @cosf(float) #0
54declare float @llvm.cos.f32(float) #0
55
56declare double @tan(double) #0
57declare float @tanf(float) #0
58
59declare double @asin(double) #0
60declare float @asinf(float) #0
61
62declare double @acos(double) #0
63declare float @acosf(float) #0
64
65declare double @atan(double) #0
66declare float @atanf(float) #0
67
68declare double @atan2(double, double) #0
69declare float @atan2f(float, float) #0
70
71declare double @sinh(double) #0
72declare float @sinhf(float) #0
73
74declare double @cosh(double) #0
75declare float @coshf(float) #0
76
77declare double @tanh(double) #0
78declare float @tanhf(float) #0
79
80declare double @asinh(double) #0
81declare float @asinhf(float) #0
82
83declare double @acosh(double) #0
84declare float @acoshf(float) #0
85
86declare double @atanh(double) #0
87declare float @atanhf(float) #0
88
89define void @cbrt_f64(ptr nocapture %varray) {
90; CHECK-LABEL: @cbrt_f64(
91; CHECK: __cbrtd2{{.*}}<2 x double>
92; CHECK: ret void
93;
94entry:
95  br label %for.body
96
97for.body:
98  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
99  %tmp = trunc i64 %iv to i32
100  %conv = sitofp i32 %tmp to double
101  %call = tail call double @cbrt(double %conv)
102  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
103  store double %call, ptr %arrayidx, align 4
104  %iv.next = add nuw nsw i64 %iv, 1
105  %exitcond = icmp eq i64 %iv.next, 1000
106  br i1 %exitcond, label %for.end, label %for.body
107
108for.end:
109  ret void
110}
111
112define void @cbrt_f32(ptr nocapture %varray) {
113; CHECK-LABEL: @cbrt_f32(
114; CHECK: __cbrtf4{{.*}}<4 x float>
115; CHECK: ret void
116;
117entry:
118  br label %for.body
119
120for.body:
121  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
122  %tmp = trunc i64 %iv to i32
123  %conv = sitofp i32 %tmp to float
124  %call = tail call float @cbrtf(float %conv)
125  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
126  store float %call, ptr %arrayidx, align 4
127  %iv.next = add nuw nsw i64 %iv, 1
128  %exitcond = icmp eq i64 %iv.next, 1000
129  br i1 %exitcond, label %for.end, label %for.body
130
131for.end:
132  ret void
133}
134
135define void @pow_f64(ptr nocapture %varray, ptr nocapture readonly %exp) {
136; CHECK-LABEL: @pow_f64(
137; CHECK:  __powd2{{.*}}<2 x double>
138; CHECK:  ret void
139;
140entry:
141  br label %for.body
142
143for.body:
144  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
145  %tmp = trunc i64 %iv to i32
146  %conv = sitofp i32 %tmp to double
147  %arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv
148  %tmp1 = load double, ptr %arrayidx, align 4
149  %tmp2 = tail call double @pow(double %conv, double %tmp1)
150  %arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv
151  store double %tmp2, ptr %arrayidx2, align 4
152  %iv.next = add nuw nsw i64 %iv, 1
153  %exitcond = icmp eq i64 %iv.next, 1000
154  br i1 %exitcond, label %for.end, label %for.body
155
156for.end:
157  ret void
158}
159
160define void @pow_f64_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {
161; CHECK-LABEL: @pow_f64_intrinsic(
162; CHECK: __powd2{{.*}}<2 x double>
163; CHECK: ret void
164;
165entry:
166  br label %for.body
167
168for.body:
169  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
170  %tmp = trunc i64 %iv to i32
171  %conv = sitofp i32 %tmp to double
172  %arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv
173  %tmp1 = load double, ptr %arrayidx, align 4
174  %tmp2 = tail call double @llvm.pow.f64(double %conv, double %tmp1)
175  %arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv
176  store double %tmp2, ptr %arrayidx2, align 4
177  %iv.next = add nuw nsw i64 %iv, 1
178  %exitcond = icmp eq i64 %iv.next, 1000
179  br i1 %exitcond, label %for.end, label %for.body
180
181for.end:
182  ret void
183}
184
185define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {
186; CHECK-LABEL: @pow_f32(
187; CHECK: __powf4{{.*}}<4 x float>
188; CHECK: ret void
189;
190entry:
191  br label %for.body
192
193for.body:
194  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
195  %tmp = trunc i64 %iv to i32
196  %conv = sitofp i32 %tmp to float
197  %arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv
198  %tmp1 = load float, ptr %arrayidx, align 4
199  %tmp2 = tail call float @powf(float %conv, float %tmp1)
200  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv
201  store float %tmp2, ptr %arrayidx2, align 4
202  %iv.next = add nuw nsw i64 %iv, 1
203  %exitcond = icmp eq i64 %iv.next, 1000
204  br i1 %exitcond, label %for.end, label %for.body
205
206for.end:
207  ret void
208}
209
210define void @pow_f32_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {
211; CHECK-LABEL: @pow_f32_intrinsic(
212; CHECK: __powf4{{.*}}<4 x float>
213; CHECK: ret void
214;
215entry:
216  br label %for.body
217
218for.body:
219  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
220  %tmp = trunc i64 %iv to i32
221  %conv = sitofp i32 %tmp to float
222  %arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv
223  %tmp1 = load float, ptr %arrayidx, align 4
224  %tmp2 = tail call float @llvm.pow.f32(float %conv, float %tmp1)
225  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv
226  store float %tmp2, ptr %arrayidx2, align 4
227  %iv.next = add nuw nsw i64 %iv, 1
228  %exitcond = icmp eq i64 %iv.next, 1000
229  br i1 %exitcond, label %for.end, label %for.body
230
231for.end:
232  ret void
233}
234
235define void @sqrt_f64(ptr nocapture %varray) {
236; CHECK-LABEL: @sqrt_f64(
237; CHECK-NOT: __sqrtd2{{.*}}<2 x double>
238; CHECK: ret void
239;
240entry:
241  br label %for.body
242
243for.body:
244  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
245  %tmp = trunc i64 %iv to i32
246  %conv = sitofp i32 %tmp to double
247  %call = tail call double @sqrt(double %conv)
248  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
249  store double %call, ptr %arrayidx, align 4
250  %iv.next = add nuw nsw i64 %iv, 1
251  %exitcond = icmp eq i64 %iv.next, 1000
252  br i1 %exitcond, label %for.end, label %for.body
253
254for.end:
255  ret void
256}
257
258define void @sqrt_f32(ptr nocapture %varray) {
259; CHECK-LABEL: @sqrt_f32(
260; CHECK-NOT: __sqrtf4{{.*}}<4 x float>
261; CHECK: ret void
262;
263entry:
264  br label %for.body
265
266for.body:
267  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
268  %tmp = trunc i64 %iv to i32
269  %conv = sitofp i32 %tmp to float
270  %call = tail call float @sqrtf(float %conv)
271  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
272  store float %call, ptr %arrayidx, align 4
273  %iv.next = add nuw nsw i64 %iv, 1
274  %exitcond = icmp eq i64 %iv.next, 1000
275  br i1 %exitcond, label %for.end, label %for.body
276
277for.end:
278  ret void
279}
280
281define void @exp_f64(ptr nocapture %varray) {
282; CHECK-LABEL: @exp_f64(
283; CHECK: __expd2{{.*}}<2 x double>
284; CHECK: ret void
285;
286entry:
287  br label %for.body
288
289for.body:
290  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
291  %tmp = trunc i64 %iv to i32
292  %conv = sitofp i32 %tmp to double
293  %call = tail call double @exp(double %conv)
294  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
295  store double %call, ptr %arrayidx, align 4
296  %iv.next = add nuw nsw i64 %iv, 1
297  %exitcond = icmp eq i64 %iv.next, 1000
298  br i1 %exitcond, label %for.end, label %for.body
299
300for.end:
301  ret void
302}
303
304define void @exp_f64_intrinsic(ptr nocapture %varray) {
305; CHECK-LABEL: @exp_f64_intrinsic(
306; CHECK: __expd2{{.*}}<2 x double>
307; CHECK: ret void
308;
309entry:
310  br label %for.body
311
312for.body:
313  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
314  %tmp = trunc i64 %iv to i32
315  %conv = sitofp i32 %tmp to double
316  %call = tail call double @llvm.exp.f64(double %conv)
317  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
318  store double %call, ptr %arrayidx, align 4
319  %iv.next = add nuw nsw i64 %iv, 1
320  %exitcond = icmp eq i64 %iv.next, 1000
321  br i1 %exitcond, label %for.end, label %for.body
322
323for.end:
324  ret void
325}
326
327define void @exp_f32(ptr nocapture %varray) {
328; CHECK-LABEL: @exp_f32(
329; CHECK: __expf4{{.*}}<4 x float>
330; CHECK: ret void
331;
332entry:
333  br label %for.body
334
335for.body:
336  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
337  %tmp = trunc i64 %iv to i32
338  %conv = sitofp i32 %tmp to float
339  %call = tail call float @expf(float %conv)
340  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
341  store float %call, ptr %arrayidx, align 4
342  %iv.next = add nuw nsw i64 %iv, 1
343  %exitcond = icmp eq i64 %iv.next, 1000
344  br i1 %exitcond, label %for.end, label %for.body
345
346for.end:
347  ret void
348}
349
350define void @exp_f32_intrinsic(ptr nocapture %varray) {
351; CHECK-LABEL: @exp_f32_intrinsic(
352; CHECK: __expf4{{.*}}<4 x float>
353; CHECK: ret void
354;
355entry:
356  br label %for.body
357
358for.body:
359  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
360  %tmp = trunc i64 %iv to i32
361  %conv = sitofp i32 %tmp to float
362  %call = tail call float @llvm.exp.f32(float %conv)
363  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
364  store float %call, ptr %arrayidx, align 4
365  %iv.next = add nuw nsw i64 %iv, 1
366  %exitcond = icmp eq i64 %iv.next, 1000
367  br i1 %exitcond, label %for.end, label %for.body
368
369for.end:
370  ret void
371}
372
373define void @exp2_f64(ptr nocapture %varray) {
374; CHECK-LABEL: @exp2_f64(
375; CHECK: __exp2d2{{.*}}<2 x double>
376; CHECK:  ret void
377;
378entry:
379  br label %for.body
380
381for.body:
382  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
383  %tmp = trunc i64 %iv to i32
384  %conv = sitofp i32 %tmp to double
385  %call = tail call double @exp2(double %conv)
386  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
387  store double %call, ptr %arrayidx, align 4
388  %iv.next = add nuw nsw i64 %iv, 1
389  %exitcond = icmp eq i64 %iv.next, 1000
390  br i1 %exitcond, label %for.end, label %for.body
391
392for.end:
393  ret void
394}
395
396define void @exp2_f64_intrinsic(ptr nocapture %varray) {
397; CHECK-LABEL: @exp2_f64_intrinsic(
398; CHECK: __exp2d2{{.*}}<2 x double>
399; CHECK: ret void
400;
401entry:
402  br label %for.body
403
404for.body:
405  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
406  %tmp = trunc i64 %iv to i32
407  %conv = sitofp i32 %tmp to double
408  %call = tail call double @llvm.exp2.f64(double %conv)
409  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
410  store double %call, ptr %arrayidx, align 4
411  %iv.next = add nuw nsw i64 %iv, 1
412  %exitcond = icmp eq i64 %iv.next, 1000
413  br i1 %exitcond, label %for.end, label %for.body
414
415for.end:
416  ret void
417}
418
419define void @exp2_f32(ptr nocapture %varray) {
420; CHECK-LABEL: @exp2_f32(
421; CHECK: __exp2f4{{.*}}<4 x float>
422; CHECK: ret void
423;
424entry:
425  br label %for.body
426
427for.body:
428  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
429  %tmp = trunc i64 %iv to i32
430  %conv = sitofp i32 %tmp to float
431  %call = tail call float @exp2f(float %conv)
432  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
433  store float %call, ptr %arrayidx, align 4
434  %iv.next = add nuw nsw i64 %iv, 1
435  %exitcond = icmp eq i64 %iv.next, 1000
436  br i1 %exitcond, label %for.end, label %for.body
437
438for.end:
439  ret void
440}
441
442define void @exp2_f32_intrinsic(ptr nocapture %varray) {
443; CHECK-LABEL: @exp2_f32_intrinsic(
444; CHECK: __exp2f4{{.*}}<4 x float>
445; CHECK: ret void
446;
447entry:
448  br label %for.body
449
450for.body:
451  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
452  %tmp = trunc i64 %iv to i32
453  %conv = sitofp i32 %tmp to float
454  %call = tail call float @llvm.exp2.f32(float %conv)
455  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
456  store float %call, ptr %arrayidx, align 4
457  %iv.next = add nuw nsw i64 %iv, 1
458  %exitcond = icmp eq i64 %iv.next, 1000
459  br i1 %exitcond, label %for.end, label %for.body
460
461for.end:
462  ret void
463}
464
465define void @expm1_f64(ptr nocapture %varray) {
466; CHECK-LABEL: @expm1_f64(
467; CHECK: __expm1d2{{.*}}<2 x double>
468; CHECK:  ret void
469;
470entry:
471  br label %for.body
472
473for.body:
474  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
475  %tmp = trunc i64 %iv to i32
476  %conv = sitofp i32 %tmp to double
477  %call = tail call double @expm1(double %conv)
478  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
479  store double %call, ptr %arrayidx, align 4
480  %iv.next = add nuw nsw i64 %iv, 1
481  %exitcond = icmp eq i64 %iv.next, 1000
482  br i1 %exitcond, label %for.end, label %for.body
483
484for.end:
485  ret void
486}
487
488define void @expm1_f32(ptr nocapture %varray) {
489; CHECK-LABEL: @expm1_f32(
490; CHECK: __expm1f4{{.*}}<4 x float>
491; CHECK: ret void
492;
493entry:
494  br label %for.body
495
496for.body:
497  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
498  %tmp = trunc i64 %iv to i32
499  %conv = sitofp i32 %tmp to float
500  %call = tail call float @expm1f(float %conv)
501  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
502  store float %call, ptr %arrayidx, align 4
503  %iv.next = add nuw nsw i64 %iv, 1
504  %exitcond = icmp eq i64 %iv.next, 1000
505  br i1 %exitcond, label %for.end, label %for.body
506
507for.end:
508  ret void
509}
510
511define void @log_f64(ptr nocapture %varray) {
512; CHECK-LABEL: @log_f64(
513; CHECK: __logd2{{.*}}<2 x double>
514; CHECK: ret void
515;
516entry:
517  br label %for.body
518
519for.body:
520  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
521  %tmp = trunc i64 %iv to i32
522  %conv = sitofp i32 %tmp to double
523  %call = tail call double @log(double %conv)
524  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
525  store double %call, ptr %arrayidx, align 4
526  %iv.next = add nuw nsw i64 %iv, 1
527  %exitcond = icmp eq i64 %iv.next, 1000
528  br i1 %exitcond, label %for.end, label %for.body
529
530for.end:
531  ret void
532}
533
534define void @log_f64_intrinsic(ptr nocapture %varray) {
535; CHECK-LABEL: @log_f64_intrinsic(
536; CHECK: __logd2{{.*}}<2 x double>
537; CHECK: ret void
538;
539entry:
540  br label %for.body
541
542for.body:
543  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
544  %tmp = trunc i64 %iv to i32
545  %conv = sitofp i32 %tmp to double
546  %call = tail call double @llvm.log.f64(double %conv)
547  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
548  store double %call, ptr %arrayidx, align 4
549  %iv.next = add nuw nsw i64 %iv, 1
550  %exitcond = icmp eq i64 %iv.next, 1000
551  br i1 %exitcond, label %for.end, label %for.body
552
553for.end:
554  ret void
555}
556
557define void @log_f32(ptr nocapture %varray) {
558; CHECK-LABEL: @log_f32(
559; CHECK: __logf4{{.*}}<4 x float>
560; CHECK: ret void
561;
562entry:
563  br label %for.body
564
565for.body:
566  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
567  %tmp = trunc i64 %iv to i32
568  %conv = sitofp i32 %tmp to float
569  %call = tail call float @logf(float %conv)
570  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
571  store float %call, ptr %arrayidx, align 4
572  %iv.next = add nuw nsw i64 %iv, 1
573  %exitcond = icmp eq i64 %iv.next, 1000
574  br i1 %exitcond, label %for.end, label %for.body
575
576for.end:
577  ret void
578}
579
580define void @log_f32_intrinsic(ptr nocapture %varray) {
581; CHECK-LABEL: @log_f32_intrinsic(
582; CHECK: __logf4{{.*}}<4 x float>
583; CHECK: ret void
584;
585entry:
586  br label %for.body
587
588for.body:
589  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
590  %tmp = trunc i64 %iv to i32
591  %conv = sitofp i32 %tmp to float
592  %call = tail call float @llvm.log.f32(float %conv)
593  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
594  store float %call, ptr %arrayidx, align 4
595  %iv.next = add nuw nsw i64 %iv, 1
596  %exitcond = icmp eq i64 %iv.next, 1000
597  br i1 %exitcond, label %for.end, label %for.body
598
599for.end:
600  ret void
601}
602
603define void @log1p_f64(ptr nocapture %varray) {
604; CHECK-LABEL: @log1p_f64(
605; CHECK: __log1pd2{{.*}}<2 x double>
606; CHECK: ret void
607;
608entry:
609  br label %for.body
610
611for.body:
612  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
613  %tmp = trunc i64 %iv to i32
614  %conv = sitofp i32 %tmp to double
615  %call = tail call double @log1p(double %conv)
616  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
617  store double %call, ptr %arrayidx, align 4
618  %iv.next = add nuw nsw i64 %iv, 1
619  %exitcond = icmp eq i64 %iv.next, 1000
620  br i1 %exitcond, label %for.end, label %for.body
621
622for.end:
623  ret void
624}
625
626define void @log1p_f32(ptr nocapture %varray) {
627; CHECK-LABEL: @log1p_f32(
628; CHECK: __log1pf4{{.*}}<4 x float>
629; CHECK: ret void
630;
631entry:
632  br label %for.body
633
634for.body:
635  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
636  %tmp = trunc i64 %iv to i32
637  %conv = sitofp i32 %tmp to float
638  %call = tail call float @log1pf(float %conv)
639  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
640  store float %call, ptr %arrayidx, align 4
641  %iv.next = add nuw nsw i64 %iv, 1
642  %exitcond = icmp eq i64 %iv.next, 1000
643  br i1 %exitcond, label %for.end, label %for.body
644
645for.end:
646  ret void
647}
648
649define void @log10_f64(ptr nocapture %varray) {
650; CHECK-LABEL: @log10_f64(
651; CHECK: __log10d2(<2 x double>
652; CHECK: ret void
653;
654entry:
655  br label %for.body
656
657for.body:
658  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
659  %tmp = trunc i64 %iv to i32
660  %conv = sitofp i32 %tmp to double
661  %call = tail call double @log10(double %conv)
662  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
663  store double %call, ptr %arrayidx, align 4
664  %iv.next = add nuw nsw i64 %iv, 1
665  %exitcond = icmp eq i64 %iv.next, 1000
666  br i1 %exitcond, label %for.end, label %for.body
667
668for.end:
669  ret void
670}
671
672define void @log10_f64_intrinsic(ptr nocapture %varray) {
673; CHECK-LABEL: @log10_f64_intrinsic(
674; CHECK: __log10d2{{.*}}<2 x double>
675; CHECK: ret void
676;
677entry:
678  br label %for.body
679
680for.body:
681  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
682  %tmp = trunc i64 %iv to i32
683  %conv = sitofp i32 %tmp to double
684  %call = tail call double @llvm.log10.f64(double %conv)
685  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
686  store double %call, ptr %arrayidx, align 4
687  %iv.next = add nuw nsw i64 %iv, 1
688  %exitcond = icmp eq i64 %iv.next, 1000
689  br i1 %exitcond, label %for.end, label %for.body
690
691for.end:
692  ret void
693}
694
695define void @log10_f32(ptr nocapture %varray) {
696; CHECK-LABEL: @log10_f32(
697; CHECK: __log10f4{{.*}}<4 x float>
698; CHECK: ret void
699;
700entry:
701  br label %for.body
702
703for.body:
704  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
705  %tmp = trunc i64 %iv to i32
706  %conv = sitofp i32 %tmp to float
707  %call = tail call float @log10f(float %conv)
708  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
709  store float %call, ptr %arrayidx, align 4
710  %iv.next = add nuw nsw i64 %iv, 1
711  %exitcond = icmp eq i64 %iv.next, 1000
712  br i1 %exitcond, label %for.end, label %for.body
713
714for.end:
715  ret void
716}
717
718define void @log10_f32_intrinsic(ptr nocapture %varray) {
719; CHECK-LABEL: @log10_f32_intrinsic(
720; CHECK: __log10f4{{.*}}<4 x float>
721; CHECK: ret void
722;
723entry:
724  br label %for.body
725
726for.body:
727  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
728  %tmp = trunc i64 %iv to i32
729  %conv = sitofp i32 %tmp to float
730  %call = tail call float @llvm.log10.f32(float %conv)
731  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
732  store float %call, ptr %arrayidx, align 4
733  %iv.next = add nuw nsw i64 %iv, 1
734  %exitcond = icmp eq i64 %iv.next, 1000
735  br i1 %exitcond, label %for.end, label %for.body
736
737for.end:
738  ret void
739}
740
741define void @log2_f64(ptr nocapture %varray) {
742; CHECK-LABEL: @log2_f64(
743; CHECK: __log2d2(<2 x double>
744; CHECK: ret void
745;
746entry:
747  br label %for.body
748
749for.body:
750  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
751  %tmp = trunc i64 %iv to i32
752  %conv = sitofp i32 %tmp to double
753  %call = tail call double @log2(double %conv)
754  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
755  store double %call, ptr %arrayidx, align 4
756  %iv.next = add nuw nsw i64 %iv, 1
757  %exitcond = icmp eq i64 %iv.next, 1000
758  br i1 %exitcond, label %for.end, label %for.body
759
760for.end:
761  ret void
762}
763
764define void @log2_f64_intrinsic(ptr nocapture %varray) {
765; CHECK-LABEL: @log2_f64_intrinsic(
766; CHECK: __log2d2{{.*}}<2 x double>
767; CHECK: ret void
768;
769entry:
770  br label %for.body
771
772for.body:
773  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
774  %tmp = trunc i64 %iv to i32
775  %conv = sitofp i32 %tmp to double
776  %call = tail call double @llvm.log2.f64(double %conv)
777  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
778  store double %call, ptr %arrayidx, align 4
779  %iv.next = add nuw nsw i64 %iv, 1
780  %exitcond = icmp eq i64 %iv.next, 1000
781  br i1 %exitcond, label %for.end, label %for.body
782
783for.end:
784  ret void
785}
786
787define void @log2_f32(ptr nocapture %varray) {
788; CHECK-LABEL: @log2_f32(
789; CHECK: __log2f4{{.*}}<4 x float>
790; CHECK: ret void
791;
792entry:
793  br label %for.body
794
795for.body:
796  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
797  %tmp = trunc i64 %iv to i32
798  %conv = sitofp i32 %tmp to float
799  %call = tail call float @log2f(float %conv)
800  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
801  store float %call, ptr %arrayidx, align 4
802  %iv.next = add nuw nsw i64 %iv, 1
803  %exitcond = icmp eq i64 %iv.next, 1000
804  br i1 %exitcond, label %for.end, label %for.body
805
806for.end:
807  ret void
808}
809
810define void @log2_f32_intrinsic(ptr nocapture %varray) {
811; CHECK-LABEL: @log2_f32_intrinsic(
812; CHECK: __log2f4{{.*}}<4 x float>
813; CHECK: ret void
814;
815entry:
816  br label %for.body
817
818for.body:
819  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
820  %tmp = trunc i64 %iv to i32
821  %conv = sitofp i32 %tmp to float
822  %call = tail call float @llvm.log2.f32(float %conv)
823  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
824  store float %call, ptr %arrayidx, align 4
825  %iv.next = add nuw nsw i64 %iv, 1
826  %exitcond = icmp eq i64 %iv.next, 1000
827  br i1 %exitcond, label %for.end, label %for.body
828
829for.end:
830  ret void
831}
832
833define void @sin_f64(ptr nocapture %varray) {
834; CHECK-LABEL: @sin_f64(
835; CHECK: __sind2{{.*}}<2 x double>
836; CHECK: ret void
837;
838entry:
839  br label %for.body
840
841for.body:
842  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
843  %tmp = trunc i64 %iv to i32
844  %conv = sitofp i32 %tmp to double
845  %call = tail call double @sin(double %conv)
846  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
847  store double %call, ptr %arrayidx, align 4
848  %iv.next = add nuw nsw i64 %iv, 1
849  %exitcond = icmp eq i64 %iv.next, 1000
850  br i1 %exitcond, label %for.end, label %for.body
851
852for.end:
853  ret void
854}
855
856define void @sin_f64_intrinsic(ptr nocapture %varray) {
857; CHECK-LABEL: @sin_f64_intrinsic(
858; CHECK: __sind2{{.*}}<2 x double>
859; CHECK: ret void
860;
861entry:
862  br label %for.body
863
864for.body:
865  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
866  %tmp = trunc i64 %iv to i32
867  %conv = sitofp i32 %tmp to double
868  %call = tail call double @llvm.sin.f64(double %conv)
869  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
870  store double %call, ptr %arrayidx, align 4
871  %iv.next = add nuw nsw i64 %iv, 1
872  %exitcond = icmp eq i64 %iv.next, 1000
873  br i1 %exitcond, label %for.end, label %for.body
874
875for.end:
876  ret void
877}
878
879define void @sin_f32(ptr nocapture %varray) {
880; CHECK-LABEL: @sin_f32(
881; CHECK: __sinf4{{.*}}<4 x float>
882; CHECK: ret void
883;
884entry:
885  br label %for.body
886
887for.body:
888  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
889  %tmp = trunc i64 %iv to i32
890  %conv = sitofp i32 %tmp to float
891  %call = tail call float @sinf(float %conv)
892  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
893  store float %call, ptr %arrayidx, align 4
894  %iv.next = add nuw nsw i64 %iv, 1
895  %exitcond = icmp eq i64 %iv.next, 1000
896  br i1 %exitcond, label %for.end, label %for.body
897
898for.end:
899  ret void
900}
901
902define void @sin_f32_intrinsic(ptr nocapture %varray) {
903; CHECK-LABEL: @sin_f32_intrinsic(
904; CHECK: __sinf4{{.*}}<4 x float>
905; CHECK: ret void
906;
907entry:
908  br label %for.body
909
910for.body:
911  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
912  %tmp = trunc i64 %iv to i32
913  %conv = sitofp i32 %tmp to float
914  %call = tail call float @llvm.sin.f32(float %conv)
915  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
916  store float %call, ptr %arrayidx, align 4
917  %iv.next = add nuw nsw i64 %iv, 1
918  %exitcond = icmp eq i64 %iv.next, 1000
919  br i1 %exitcond, label %for.end, label %for.body
920
921for.end:
922  ret void
923}
924
925define void @cos_f64(ptr nocapture %varray) {
926; CHECK-LABEL: @cos_f64(
927; CHECK: __cosd2{{.*}}<2 x double>
928; CHECK: ret void
929;
930entry:
931  br label %for.body
932
933for.body:
934  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
935  %tmp = trunc i64 %iv to i32
936  %conv = sitofp i32 %tmp to double
937  %call = tail call double @cos(double %conv)
938  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
939  store double %call, ptr %arrayidx, align 4
940  %iv.next = add nuw nsw i64 %iv, 1
941  %exitcond = icmp eq i64 %iv.next, 1000
942  br i1 %exitcond, label %for.end, label %for.body
943
944for.end:
945  ret void
946}
947
948define void @cos_f64_intrinsic(ptr nocapture %varray) {
949; CHECK-LABEL: @cos_f64_intrinsic(
950; CHECK:    [[TMP5:%.*]] = call <2 x double> @__cosd2(<2 x double> [[TMP4:%.*]])
951; CHECK:    ret void
952;
953entry:
954  br label %for.body
955
956for.body:
957  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
958  %tmp = trunc i64 %iv to i32
959  %conv = sitofp i32 %tmp to double
960  %call = tail call double @llvm.cos.f64(double %conv)
961  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
962  store double %call, ptr %arrayidx, align 4
963  %iv.next = add nuw nsw i64 %iv, 1
964  %exitcond = icmp eq i64 %iv.next, 1000
965  br i1 %exitcond, label %for.end, label %for.body
966
967for.end:
968  ret void
969}
970
971define void @cos_f32(ptr nocapture %varray) {
972; CHECK-LABEL: @cos_f32(
973; CHECK: __cosf4{{.*}}<4 x float>
974; CHECK: ret void
975;
976entry:
977  br label %for.body
978
979for.body:
980  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
981  %tmp = trunc i64 %iv to i32
982  %conv = sitofp i32 %tmp to float
983  %call = tail call float @cosf(float %conv)
984  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
985  store float %call, ptr %arrayidx, align 4
986  %iv.next = add nuw nsw i64 %iv, 1
987  %exitcond = icmp eq i64 %iv.next, 1000
988  br i1 %exitcond, label %for.end, label %for.body
989
990for.end:
991  ret void
992}
993
994define void @cos_f32_intrinsic(ptr nocapture %varray) {
995; CHECK-LABEL: @cos_f32_intrinsic(
996; CHECK: __cosf4{{.*}}<4 x float>
997; CHECK: ret void
998;
999entry:
1000  br label %for.body
1001
1002for.body:
1003  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1004  %tmp = trunc i64 %iv to i32
1005  %conv = sitofp i32 %tmp to float
1006  %call = tail call float @llvm.cos.f32(float %conv)
1007  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1008  store float %call, ptr %arrayidx, align 4
1009  %iv.next = add nuw nsw i64 %iv, 1
1010  %exitcond = icmp eq i64 %iv.next, 1000
1011  br i1 %exitcond, label %for.end, label %for.body
1012
1013for.end:
1014  ret void
1015}
1016
1017define void @tan_f64(ptr nocapture %varray) {
1018; CHECK-LABEL: @tan_f64(
1019; CHECK: __tand2{{.*}}<2 x double>
1020; CHECK: ret void
1021;
1022entry:
1023  br label %for.body
1024
1025for.body:
1026  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1027  %tmp = trunc i64 %iv to i32
1028  %conv = sitofp i32 %tmp to double
1029  %call = tail call double @tan(double %conv)
1030  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1031  store double %call, ptr %arrayidx, align 4
1032  %iv.next = add nuw nsw i64 %iv, 1
1033  %exitcond = icmp eq i64 %iv.next, 1000
1034  br i1 %exitcond, label %for.end, label %for.body
1035
1036for.end:
1037  ret void
1038}
1039
1040define void @tan_f32(ptr nocapture %varray) {
1041; CHECK-LABEL: @tan_f32(
1042; CHECK: __tanf4{{.*}}<4 x float>
1043; CHECK: ret void
1044;
1045entry:
1046  br label %for.body
1047
1048for.body:
1049  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1050  %tmp = trunc i64 %iv to i32
1051  %conv = sitofp i32 %tmp to float
1052  %call = tail call float @tanf(float %conv)
1053  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1054  store float %call, ptr %arrayidx, align 4
1055  %iv.next = add nuw nsw i64 %iv, 1
1056  %exitcond = icmp eq i64 %iv.next, 1000
1057  br i1 %exitcond, label %for.end, label %for.body
1058
1059for.end:
1060  ret void
1061}
1062
1063define void @asin_f64(ptr nocapture %varray) {
1064; CHECK-LABEL: @asin_f64(
1065; CHECK: __asind2{{.*}}<2 x double>
1066; CHECK: ret void
1067;
1068entry:
1069  br label %for.body
1070
1071for.body:
1072  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1073  %tmp = trunc i64 %iv to i32
1074  %conv = sitofp i32 %tmp to double
1075  %call = tail call double @asin(double %conv)
1076  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1077  store double %call, ptr %arrayidx, align 4
1078  %iv.next = add nuw nsw i64 %iv, 1
1079  %exitcond = icmp eq i64 %iv.next, 1000
1080  br i1 %exitcond, label %for.end, label %for.body
1081
1082for.end:
1083  ret void
1084}
1085
1086define void @asin_f32(ptr nocapture %varray) {
1087; CHECK-LABEL: @asin_f32(
1088; CHECK: __asinf4{{.*}}<4 x float>
1089; CHECK: ret void
1090;
1091entry:
1092  br label %for.body
1093
1094for.body:
1095  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1096  %tmp = trunc i64 %iv to i32
1097  %conv = sitofp i32 %tmp to float
1098  %call = tail call float @asinf(float %conv)
1099  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1100  store float %call, ptr %arrayidx, align 4
1101  %iv.next = add nuw nsw i64 %iv, 1
1102  %exitcond = icmp eq i64 %iv.next, 1000
1103  br i1 %exitcond, label %for.end, label %for.body
1104
1105for.end:
1106  ret void
1107}
1108
1109define void @acos_f64(ptr nocapture %varray) {
1110; CHECK-LABEL: @acos_f64(
1111; CHECK: __acosd2{{.*}}<2 x double>
1112; CHECK: ret void
1113;
1114entry:
1115  br label %for.body
1116
1117for.body:
1118  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1119  %tmp = trunc i64 %iv to i32
1120  %conv = sitofp i32 %tmp to double
1121  %call = tail call double @acos(double %conv)
1122  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1123  store double %call, ptr %arrayidx, align 4
1124  %iv.next = add nuw nsw i64 %iv, 1
1125  %exitcond = icmp eq i64 %iv.next, 1000
1126  br i1 %exitcond, label %for.end, label %for.body
1127
1128for.end:
1129  ret void
1130}
1131
1132define void @acos_f32(ptr nocapture %varray) {
1133; CHECK-LABEL: @acos_f32(
1134; CHECK: __acosf4{{.*}}<4 x float>
1135; CHECK: ret void
1136;
1137entry:
1138  br label %for.body
1139
1140for.body:
1141  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1142  %tmp = trunc i64 %iv to i32
1143  %conv = sitofp i32 %tmp to float
1144  %call = tail call float @acosf(float %conv)
1145  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1146  store float %call, ptr %arrayidx, align 4
1147  %iv.next = add nuw nsw i64 %iv, 1
1148  %exitcond = icmp eq i64 %iv.next, 1000
1149  br i1 %exitcond, label %for.end, label %for.body
1150
1151for.end:
1152  ret void
1153}
1154
1155define void @atan_f64(ptr nocapture %varray) {
1156; CHECK-LABEL: @atan_f64(
1157; CHECK: __atand2{{.*}}<2 x double>
1158; CHECK: ret void
1159;
1160entry:
1161  br label %for.body
1162
1163for.body:
1164  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1165  %tmp = trunc i64 %iv to i32
1166  %conv = sitofp i32 %tmp to double
1167  %call = tail call double @atan(double %conv)
1168  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1169  store double %call, ptr %arrayidx, align 4
1170  %iv.next = add nuw nsw i64 %iv, 1
1171  %exitcond = icmp eq i64 %iv.next, 1000
1172  br i1 %exitcond, label %for.end, label %for.body
1173
1174for.end:
1175  ret void
1176}
1177
1178define void @atan_f32(ptr nocapture %varray) {
1179; CHECK-LABEL: @atan_f32(
1180; CHECK: __atanf4{{.*}}<4 x float>
1181; CHECK: ret void
1182;
1183entry:
1184  br label %for.body
1185
1186for.body:
1187  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1188  %tmp = trunc i64 %iv to i32
1189  %conv = sitofp i32 %tmp to float
1190  %call = tail call float @atanf(float %conv)
1191  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1192  store float %call, ptr %arrayidx, align 4
1193  %iv.next = add nuw nsw i64 %iv, 1
1194  %exitcond = icmp eq i64 %iv.next, 1000
1195  br i1 %exitcond, label %for.end, label %for.body
1196
1197for.end:
1198  ret void
1199}
1200
1201define void @atan2_f64(ptr nocapture %varray) {
1202; CHECK-LABEL: @atan2_f64(
1203; CHECK: __atan2d2{{.*}}<2 x double>
1204; CHECK: ret void
1205;
1206entry:
1207  br label %for.body
1208
1209for.body:
1210  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1211  %tmp = trunc i64 %iv to i32
1212  %conv = sitofp i32 %tmp to double
1213  %call = tail call double @atan2(double %conv, double %conv)
1214  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1215  store double %call, ptr %arrayidx, align 4
1216  %iv.next = add nuw nsw i64 %iv, 1
1217  %exitcond = icmp eq i64 %iv.next, 1000
1218  br i1 %exitcond, label %for.end, label %for.body
1219
1220for.end:
1221  ret void
1222}
1223
1224define void @atan2_f32(ptr nocapture %varray) {
1225; CHECK-LABEL: @atan2_f32(
1226; CHECK: __atan2f4{{.*}}<4 x float>
1227; CHECK: ret void
1228;
1229entry:
1230  br label %for.body
1231
1232for.body:
1233  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1234  %tmp = trunc i64 %iv to i32
1235  %conv = sitofp i32 %tmp to float
1236  %call = tail call float @atan2f(float %conv, float %conv)
1237  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1238  store float %call, ptr %arrayidx, align 4
1239  %iv.next = add nuw nsw i64 %iv, 1
1240  %exitcond = icmp eq i64 %iv.next, 1000
1241  br i1 %exitcond, label %for.end, label %for.body
1242
1243for.end:
1244  ret void
1245}
1246
1247define void @atan2_f64_intrinsic(ptr nocapture %varray) {
1248; CHECK-LABEL: @atan2_f64_intrinsic(
1249; CHECK: __atan2d2{{.*}}<2 x double>
1250; CHECK: ret void
1251;
1252entry:
1253  br label %for.body
1254
1255for.body:
1256  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1257  %tmp = trunc i64 %iv to i32
1258  %conv = sitofp i32 %tmp to double
1259  %call = tail call double @llvm.atan2.f64(double %conv, double %conv)
1260  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1261  store double %call, ptr %arrayidx, align 4
1262  %iv.next = add nuw nsw i64 %iv, 1
1263  %exitcond = icmp eq i64 %iv.next, 1000
1264  br i1 %exitcond, label %for.end, label %for.body
1265
1266for.end:
1267  ret void
1268}
1269
1270define void @atan2_f32_intrinsic(ptr nocapture %varray) {
1271; CHECK-LABEL: @atan2_f32_intrinsic(
1272; CHECK: __atan2f4{{.*}}<4 x float>
1273; CHECK: ret void
1274;
1275entry:
1276  br label %for.body
1277
1278for.body:
1279  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1280  %tmp = trunc i64 %iv to i32
1281  %conv = sitofp i32 %tmp to float
1282  %call = tail call float @llvm.atan2.f32(float %conv, float %conv)
1283  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1284  store float %call, ptr %arrayidx, align 4
1285  %iv.next = add nuw nsw i64 %iv, 1
1286  %exitcond = icmp eq i64 %iv.next, 1000
1287  br i1 %exitcond, label %for.end, label %for.body
1288
1289for.end:
1290  ret void
1291}
1292
1293define void @sinh_f64(ptr nocapture %varray) {
1294; CHECK-LABEL: @sinh_f64(
1295; CHECK: __sinhd2{{.*}}<2 x double>
1296; CHECK: ret void
1297;
1298entry:
1299  br label %for.body
1300
1301for.body:
1302  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1303  %tmp = trunc i64 %iv to i32
1304  %conv = sitofp i32 %tmp to double
1305  %call = tail call double @sinh(double %conv)
1306  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1307  store double %call, ptr %arrayidx, align 4
1308  %iv.next = add nuw nsw i64 %iv, 1
1309  %exitcond = icmp eq i64 %iv.next, 1000
1310  br i1 %exitcond, label %for.end, label %for.body
1311
1312for.end:
1313  ret void
1314}
1315
1316define void @sinh_f32(ptr nocapture %varray) {
1317; CHECK-LABEL: @sinh_f32(
1318; CHECK: __sinhf4{{.*}}<4 x float>
1319; CHECK: ret void
1320;
1321entry:
1322  br label %for.body
1323
1324for.body:
1325  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1326  %tmp = trunc i64 %iv to i32
1327  %conv = sitofp i32 %tmp to float
1328  %call = tail call float @sinhf(float %conv)
1329  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1330  store float %call, ptr %arrayidx, align 4
1331  %iv.next = add nuw nsw i64 %iv, 1
1332  %exitcond = icmp eq i64 %iv.next, 1000
1333  br i1 %exitcond, label %for.end, label %for.body
1334
1335for.end:
1336  ret void
1337}
1338
1339define void @cosh_f64(ptr nocapture %varray) {
1340; CHECK-LABEL: @cosh_f64(
1341; CHECK: __coshd2{{.*}}<2 x double>
1342; CHECK: ret void
1343;
1344entry:
1345  br label %for.body
1346
1347for.body:
1348  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1349  %tmp = trunc i64 %iv to i32
1350  %conv = sitofp i32 %tmp to double
1351  %call = tail call double @cosh(double %conv)
1352  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1353  store double %call, ptr %arrayidx, align 4
1354  %iv.next = add nuw nsw i64 %iv, 1
1355  %exitcond = icmp eq i64 %iv.next, 1000
1356  br i1 %exitcond, label %for.end, label %for.body
1357
1358for.end:
1359  ret void
1360}
1361
1362define void @cosh_f32(ptr nocapture %varray) {
1363; CHECK-LABEL: @cosh_f32(
1364; CHECK: __coshf4{{.*}}<4 x float>
1365; CHECK: ret void
1366;
1367entry:
1368  br label %for.body
1369
1370for.body:
1371  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1372  %tmp = trunc i64 %iv to i32
1373  %conv = sitofp i32 %tmp to float
1374  %call = tail call float @coshf(float %conv)
1375  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1376  store float %call, ptr %arrayidx, align 4
1377  %iv.next = add nuw nsw i64 %iv, 1
1378  %exitcond = icmp eq i64 %iv.next, 1000
1379  br i1 %exitcond, label %for.end, label %for.body
1380
1381for.end:
1382  ret void
1383}
1384
1385define void @tanh_f64(ptr nocapture %varray) {
1386; CHECK-LABEL: @tanh_f64(
1387; CHECK: __tanhd2{{.*}}<2 x double>
1388; CHECK: ret void
1389;
1390entry:
1391  br label %for.body
1392
1393for.body:
1394  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1395  %tmp = trunc i64 %iv to i32
1396  %conv = sitofp i32 %tmp to double
1397  %call = tail call double @tanh(double %conv)
1398  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1399  store double %call, ptr %arrayidx, align 4
1400  %iv.next = add nuw nsw i64 %iv, 1
1401  %exitcond = icmp eq i64 %iv.next, 1000
1402  br i1 %exitcond, label %for.end, label %for.body
1403
1404for.end:
1405  ret void
1406}
1407
1408define void @tanh_f32(ptr nocapture %varray) {
1409; CHECK-LABEL: @tanh_f32(
1410; CHECK: __tanhf4{{.*}}<4 x float>
1411; CHECK: ret void
1412;
1413entry:
1414  br label %for.body
1415
1416for.body:
1417  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1418  %tmp = trunc i64 %iv to i32
1419  %conv = sitofp i32 %tmp to float
1420  %call = tail call float @tanhf(float %conv)
1421  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1422  store float %call, ptr %arrayidx, align 4
1423  %iv.next = add nuw nsw i64 %iv, 1
1424  %exitcond = icmp eq i64 %iv.next, 1000
1425  br i1 %exitcond, label %for.end, label %for.body
1426
1427for.end:
1428  ret void
1429}
1430
1431define void @asinh_f64(ptr nocapture %varray) {
1432; CHECK-LABEL: @asinh_f64(
1433; CHECK: __asinhd2{{.*}}<2 x double>
1434; CHECK: ret void
1435;
1436entry:
1437  br label %for.body
1438
1439for.body:
1440  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1441  %tmp = trunc i64 %iv to i32
1442  %conv = sitofp i32 %tmp to double
1443  %call = tail call double @asinh(double %conv)
1444  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1445  store double %call, ptr %arrayidx, align 4
1446  %iv.next = add nuw nsw i64 %iv, 1
1447  %exitcond = icmp eq i64 %iv.next, 1000
1448  br i1 %exitcond, label %for.end, label %for.body
1449
1450for.end:
1451  ret void
1452}
1453
1454define void @asinh_f32(ptr nocapture %varray) {
1455; CHECK-LABEL: @asinh_f32(
1456; CHECK: __asinhf4{{.*}}<4 x float>
1457; CHECK: ret void
1458;
1459entry:
1460  br label %for.body
1461
1462for.body:
1463  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1464  %tmp = trunc i64 %iv to i32
1465  %conv = sitofp i32 %tmp to float
1466  %call = tail call float @asinhf(float %conv)
1467  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1468  store float %call, ptr %arrayidx, align 4
1469  %iv.next = add nuw nsw i64 %iv, 1
1470  %exitcond = icmp eq i64 %iv.next, 1000
1471  br i1 %exitcond, label %for.end, label %for.body
1472
1473for.end:
1474  ret void
1475}
1476
1477define void @acosh_f64(ptr nocapture %varray) {
1478; CHECK-LABEL: @acosh_f64(
1479; CHECK: __acoshd2{{.*}}<2 x double>
1480; CHECK: ret void
1481;
1482entry:
1483  br label %for.body
1484
1485for.body:
1486  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1487  %tmp = trunc i64 %iv to i32
1488  %conv = sitofp i32 %tmp to double
1489  %call = tail call double @acosh(double %conv)
1490  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1491  store double %call, ptr %arrayidx, align 4
1492  %iv.next = add nuw nsw i64 %iv, 1
1493  %exitcond = icmp eq i64 %iv.next, 1000
1494  br i1 %exitcond, label %for.end, label %for.body
1495
1496for.end:
1497  ret void
1498}
1499
1500define void @acosh_f32(ptr nocapture %varray) {
1501; CHECK-LABEL: @acosh_f32(
1502; CHECK: __acoshf4{{.*}}<4 x float>
1503; CHECK: ret void
1504;
1505entry:
1506  br label %for.body
1507
1508for.body:
1509  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1510  %tmp = trunc i64 %iv to i32
1511  %conv = sitofp i32 %tmp to float
1512  %call = tail call float @acoshf(float %conv)
1513  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1514  store float %call, ptr %arrayidx, align 4
1515  %iv.next = add nuw nsw i64 %iv, 1
1516  %exitcond = icmp eq i64 %iv.next, 1000
1517  br i1 %exitcond, label %for.end, label %for.body
1518
1519for.end:
1520  ret void
1521}
1522
1523define void @atanh_f64(ptr nocapture %varray) {
1524; CHECK-LABEL: @atanh_f64(
1525; CHECK: __atanhd2{{.*}}<2 x double>
1526; CHECK: ret void
1527;
1528entry:
1529  br label %for.body
1530
1531for.body:
1532  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1533  %tmp = trunc i64 %iv to i32
1534  %conv = sitofp i32 %tmp to double
1535  %call = tail call double @atanh(double %conv)
1536  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
1537  store double %call, ptr %arrayidx, align 4
1538  %iv.next = add nuw nsw i64 %iv, 1
1539  %exitcond = icmp eq i64 %iv.next, 1000
1540  br i1 %exitcond, label %for.end, label %for.body
1541
1542for.end:
1543  ret void
1544}
1545
1546define void @atanh_f32(ptr nocapture %varray) {
1547; CHECK-LABEL: @atanh_f32(
1548; CHECK: __atanhf4{{.*}}<4 x float>
1549; CHECK: ret void
1550;
1551entry:
1552  br label %for.body
1553
1554for.body:
1555  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1556  %tmp = trunc i64 %iv to i32
1557  %conv = sitofp i32 %tmp to float
1558  %call = tail call float @atanhf(float %conv)
1559  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
1560  store float %call, ptr %arrayidx, align 4
1561  %iv.next = add nuw nsw i64 %iv, 1
1562  %exitcond = icmp eq i64 %iv.next, 1000
1563  br i1 %exitcond, label %for.end, label %for.body
1564
1565for.end:
1566  ret void
1567}
1568
1569attributes #0 = { nounwind }
1570