1; RUN: opt -vector-library=MASSV -inject-tli-mappings -loop-vectorize -force-vector-interleave=1 -mattr=-altivec -S < %s | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-n32:64" 4target triple = "powerpc64le-unknown-linux-gnu" 5 6declare double @cbrt(double) #0 7declare float @cbrtf(float) #0 8 9declare double @atanh(double) #0 10declare float @atanhf(float) #0 11 12; MASSV is unsupported for AltiVec. 13; Check that massv entries are not generated. 14define void @cbrt_f64(double* nocapture %varray) { 15; CHECK-LABEL: @cbrt_f64( 16; CHECK-NOT: __cbrtd2_massv{{.*}}<2 x double> 17; CHECK: ret void 18; 19entry: 20 br label %for.body 21 22for.body: 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 32 33for.end: 34 ret void 35} 36 37define void @cbrt_f32(float* nocapture %varray) { 38; CHECK-LABEL: @cbrt_f32( 39; CHECK-NOT: __cbrtf4_massv{{.*}}<4 x float> 40; CHECK: ret void 41; 42entry: 43 br label %for.body 44 45for.body: 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 55 56for.end: 57 ret void 58} 59 60define void @atanh_f64(double* nocapture %varray) { 61; CHECK-LABEL: @atanh_f64( 62; CHECK-NOT: __atanhd2_massv{{.*}}<2 x double> 63; CHECK: ret void 64; 65entry: 66 br label %for.body 67 68for.body: 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 78 79for.end: 80 ret void 81} 82 83define void @atanh_f32(float* nocapture %varray) { 84; CHECK-LABEL: @atanh_f32( 85; CHECK-NOT: __atanhf4_massv{{.*}}<2 x double> 86; CHECK: ret void 87; 88entry: 89 br label %for.body 90 91for.body: 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 101 102for.end: 103 ret void 104} 105 106attributes #0 = { nounwind } 107