We no longer need to declare LLVM intrinsics in .ll files as the intrinsics are populated automatically in the module. Remove the declarations from tests to reduce test noise and size. This came from a suggestion on PR #190786.
1552 lines
40 KiB
LLVM
1552 lines
40 KiB
LLVM
; RUN: opt -vector-library=MASSV -mtriple=powerpc64le-unknown-linux-gnu -passes=inject-tli-mappings,loop-vectorize -force-vector-interleave=1 -S < %s | FileCheck %s
|
|
; 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
|
|
|
|
declare double @cbrt(double)
|
|
declare float @cbrtf(float)
|
|
|
|
declare double @pow(double, double)
|
|
declare float @powf(float, float)
|
|
|
|
declare double @sqrt(double)
|
|
declare float @sqrtf(float)
|
|
|
|
declare double @exp(double)
|
|
declare float @expf(float)
|
|
|
|
declare double @exp2(double)
|
|
declare float @exp2f(float)
|
|
|
|
declare double @expm1(double)
|
|
declare float @expm1f(float)
|
|
|
|
declare double @log(double)
|
|
declare float @logf(float)
|
|
|
|
declare double @log1p(double)
|
|
declare float @log1pf(float)
|
|
|
|
declare double @log10(double)
|
|
declare float @log10f(float)
|
|
|
|
declare double @log2(double)
|
|
declare float @log2f(float)
|
|
|
|
declare double @sin(double)
|
|
declare float @sinf(float)
|
|
|
|
declare double @cos(double)
|
|
declare float @cosf(float)
|
|
|
|
declare double @tan(double)
|
|
declare float @tanf(float)
|
|
|
|
declare double @asin(double)
|
|
declare float @asinf(float)
|
|
|
|
declare double @acos(double)
|
|
declare float @acosf(float)
|
|
|
|
declare double @atan(double)
|
|
declare float @atanf(float)
|
|
|
|
declare double @atan2(double, double)
|
|
declare float @atan2f(float, float)
|
|
|
|
declare double @sinh(double)
|
|
declare float @sinhf(float)
|
|
|
|
declare double @cosh(double)
|
|
declare float @coshf(float)
|
|
|
|
declare double @tanh(double)
|
|
declare float @tanhf(float)
|
|
|
|
declare double @asinh(double)
|
|
declare float @asinhf(float)
|
|
|
|
declare double @acosh(double)
|
|
declare float @acoshf(float)
|
|
|
|
declare double @atanh(double)
|
|
declare float @atanhf(float)
|
|
|
|
define void @cbrt_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cbrt_f64(
|
|
; CHECK: __cbrtd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @cbrt(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cbrt_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cbrt_f32(
|
|
; CHECK: __cbrtf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @cbrtf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @pow_f64(ptr nocapture %varray, ptr nocapture readonly %exp) {
|
|
; CHECK-LABEL: @pow_f64(
|
|
; CHECK: __powd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv
|
|
%tmp1 = load double, ptr %arrayidx, align 4
|
|
%tmp2 = tail call double @pow(double %conv, double %tmp1)
|
|
%arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %tmp2, ptr %arrayidx2, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @pow_f64_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {
|
|
; CHECK-LABEL: @pow_f64_intrinsic(
|
|
; CHECK: __powd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv
|
|
%tmp1 = load double, ptr %arrayidx, align 4
|
|
%tmp2 = tail call double @llvm.pow.f64(double %conv, double %tmp1)
|
|
%arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %tmp2, ptr %arrayidx2, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {
|
|
; CHECK-LABEL: @pow_f32(
|
|
; CHECK: __powf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv
|
|
%tmp1 = load float, ptr %arrayidx, align 4
|
|
%tmp2 = tail call float @powf(float %conv, float %tmp1)
|
|
%arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %tmp2, ptr %arrayidx2, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @pow_f32_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {
|
|
; CHECK-LABEL: @pow_f32_intrinsic(
|
|
; CHECK: __powf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv
|
|
%tmp1 = load float, ptr %arrayidx, align 4
|
|
%tmp2 = tail call float @llvm.pow.f32(float %conv, float %tmp1)
|
|
%arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %tmp2, ptr %arrayidx2, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sqrt_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sqrt_f64(
|
|
; CHECK-NOT: __sqrtd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @sqrt(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sqrt_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sqrt_f32(
|
|
; CHECK-NOT: __sqrtf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @sqrtf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp_f64(
|
|
; CHECK: __expd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @exp(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp_f64_intrinsic(
|
|
; CHECK: __expd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.exp.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp_f32(
|
|
; CHECK: __expf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @expf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp_f32_intrinsic(
|
|
; CHECK: __expf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.exp.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp2_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp2_f64(
|
|
; CHECK: __exp2d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @exp2(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp2_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp2_f64_intrinsic(
|
|
; CHECK: __exp2d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.exp2.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp2_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp2_f32(
|
|
; CHECK: __exp2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @exp2f(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @exp2_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @exp2_f32_intrinsic(
|
|
; CHECK: __exp2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.exp2.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @expm1_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @expm1_f64(
|
|
; CHECK: __expm1d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @expm1(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @expm1_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @expm1_f32(
|
|
; CHECK: __expm1f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @expm1f(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log_f64(
|
|
; CHECK: __logd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @log(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log_f64_intrinsic(
|
|
; CHECK: __logd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.log.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log_f32(
|
|
; CHECK: __logf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @logf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log_f32_intrinsic(
|
|
; CHECK: __logf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.log.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log1p_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log1p_f64(
|
|
; CHECK: __log1pd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @log1p(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log1p_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log1p_f32(
|
|
; CHECK: __log1pf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @log1pf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log10_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log10_f64(
|
|
; CHECK: __log10d2(<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @log10(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log10_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log10_f64_intrinsic(
|
|
; CHECK: __log10d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.log10.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log10_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log10_f32(
|
|
; CHECK: __log10f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @log10f(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log10_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log10_f32_intrinsic(
|
|
; CHECK: __log10f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.log10.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log2_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log2_f64(
|
|
; CHECK: __log2d2(<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @log2(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log2_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log2_f64_intrinsic(
|
|
; CHECK: __log2d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.log2.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log2_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log2_f32(
|
|
; CHECK: __log2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @log2f(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @log2_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @log2_f32_intrinsic(
|
|
; CHECK: __log2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.log2.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sin_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sin_f64(
|
|
; CHECK: __sind2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @sin(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sin_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sin_f64_intrinsic(
|
|
; CHECK: __sind2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.sin.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sin_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sin_f32(
|
|
; CHECK: __sinf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @sinf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sin_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sin_f32_intrinsic(
|
|
; CHECK: __sinf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.sin.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cos_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cos_f64(
|
|
; CHECK: __cosd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @cos(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cos_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cos_f64_intrinsic(
|
|
; CHECK: [[TMP5:%.*]] = call <2 x double> @__cosd2(<2 x double> [[TMP4:%.*]])
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.cos.f64(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cos_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cos_f32(
|
|
; CHECK: __cosf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @cosf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cos_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cos_f32_intrinsic(
|
|
; CHECK: __cosf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.cos.f32(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @tan_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @tan_f64(
|
|
; CHECK: __tand2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @tan(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @tan_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @tan_f32(
|
|
; CHECK: __tanf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @tanf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @asin_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @asin_f64(
|
|
; CHECK: __asind2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @asin(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @asin_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @asin_f32(
|
|
; CHECK: __asinf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @asinf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @acos_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @acos_f64(
|
|
; CHECK: __acosd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @acos(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @acos_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @acos_f32(
|
|
; CHECK: __acosf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @acosf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan_f64(
|
|
; CHECK: __atand2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @atan(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan_f32(
|
|
; CHECK: __atanf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @atanf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan2_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan2_f64(
|
|
; CHECK: __atan2d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @atan2(double %conv, double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan2_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan2_f32(
|
|
; CHECK: __atan2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @atan2f(float %conv, float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan2_f64_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan2_f64_intrinsic(
|
|
; CHECK: __atan2d2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @llvm.atan2.f64(double %conv, double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atan2_f32_intrinsic(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atan2_f32_intrinsic(
|
|
; CHECK: __atan2f4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @llvm.atan2.f32(float %conv, float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sinh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sinh_f64(
|
|
; CHECK: __sinhd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @sinh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @sinh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @sinh_f32(
|
|
; CHECK: __sinhf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @sinhf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cosh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cosh_f64(
|
|
; CHECK: __coshd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @cosh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @cosh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @cosh_f32(
|
|
; CHECK: __coshf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @coshf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @tanh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @tanh_f64(
|
|
; CHECK: __tanhd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @tanh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @tanh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @tanh_f32(
|
|
; CHECK: __tanhf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @tanhf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @asinh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @asinh_f64(
|
|
; CHECK: __asinhd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @asinh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @asinh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @asinh_f32(
|
|
; CHECK: __asinhf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @asinhf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @acosh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @acosh_f64(
|
|
; CHECK: __acoshd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @acosh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @acosh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @acosh_f32(
|
|
; CHECK: __acoshf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @acoshf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atanh_f64(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atanh_f64(
|
|
; CHECK: __atanhd2{{.*}}<2 x double>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to double
|
|
%call = tail call double @atanh(double %conv)
|
|
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv
|
|
store double %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
define void @atanh_f32(ptr nocapture %varray) {
|
|
; CHECK-LABEL: @atanh_f32(
|
|
; CHECK: __atanhf4{{.*}}<4 x float>
|
|
; CHECK: ret void
|
|
;
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
|
|
%tmp = trunc i64 %iv to i32
|
|
%conv = sitofp i32 %tmp to float
|
|
%call = tail call float @atanhf(float %conv)
|
|
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv
|
|
store float %call, ptr %arrayidx, align 4
|
|
%iv.next = add nuw nsw i64 %iv, 1
|
|
%exitcond = icmp eq i64 %iv.next, 1000
|
|
br i1 %exitcond, label %for.end, label %for.body
|
|
|
|
for.end:
|
|
ret void
|
|
}
|