1 ; RUN: opt -vector-library=MASSV -loop-vectorize -force-vector-interleave=1 -mattr=-altivec -S < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-n32:64"
4 target triple = "powerpc64le-unknown-linux-gnu"
6 declare double @cbrt(double) #0
7 declare float @cbrtf(float) #0
9 declare double @atanh(double) #0
10 declare float @atanhf(float) #0
12 ; MASSV is unsupported for AltiVec.
13 ; Check that massv entries are not generated.
14 define void @cbrt_f64(double* nocapture %varray) {
15 ; CHECK-LABEL: @cbrt_f64(
16 ; CHECK-NOT: __cbrtd2_massv{{.*}}<2 x double>
23 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
24 %tmp = trunc i64 %iv to i32
25 %conv = sitofp i32 %tmp to double
26 %call = tail call double @cbrt(double %conv)
27 %arrayidx = getelementptr inbounds double, double* %varray, i64 %iv
28 store double %call, double* %arrayidx, align 4
29 %iv.next = add nuw nsw i64 %iv, 1
30 %exitcond = icmp eq i64 %iv.next, 1000
31 br i1 %exitcond, label %for.end, label %for.body
37 define void @cbrt_f32(float* nocapture %varray) {
38 ; CHECK-LABEL: @cbrt_f32(
39 ; CHECK-NOT: __cbrtf4_massv{{.*}}<4 x float>
46 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
47 %tmp = trunc i64 %iv to i32
48 %conv = sitofp i32 %tmp to float
49 %call = tail call float @cbrtf(float %conv)
50 %arrayidx = getelementptr inbounds float, float* %varray, i64 %iv
51 store float %call, float* %arrayidx, align 4
52 %iv.next = add nuw nsw i64 %iv, 1
53 %exitcond = icmp eq i64 %iv.next, 1000
54 br i1 %exitcond, label %for.end, label %for.body
60 define void @atanh_f64(double* nocapture %varray) {
61 ; CHECK-LABEL: @atanh_f64(
62 ; CHECK-NOT: __atanhd2_massv{{.*}}<2 x double>
69 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
70 %tmp = trunc i64 %iv to i32
71 %conv = sitofp i32 %tmp to double
72 %call = tail call double @atanh(double %conv)
73 %arrayidx = getelementptr inbounds double, double* %varray, i64 %iv
74 store double %call, double* %arrayidx, align 4
75 %iv.next = add nuw nsw i64 %iv, 1
76 %exitcond = icmp eq i64 %iv.next, 1000
77 br i1 %exitcond, label %for.end, label %for.body
83 define void @atanh_f32(float* nocapture %varray) {
84 ; CHECK-LABEL: @atanh_f32(
85 ; CHECK-NOT: __atanhf4_massv{{.*}}<2 x double>
92 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
93 %tmp = trunc i64 %iv to i32
94 %conv = sitofp i32 %tmp to float
95 %call = tail call float @atanhf(float %conv)
96 %arrayidx = getelementptr inbounds float, float* %varray, i64 %iv
97 store float %call, float* %arrayidx, align 4
98 %iv.next = add nuw nsw i64 %iv, 1
99 %exitcond = icmp eq i64 %iv.next, 1000
100 br i1 %exitcond, label %for.end, label %for.body
106 attributes #0 = { nounwind }