blob: 84cab4bc9590176bf53cbd18bca2540da91e678f [file]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --filter "call.*@" --version 6
; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -S < %s | FileCheck %s --check-prefixes=CHECK-VF2
; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -S < %s | FileCheck %s --check-prefixes=CHECK-VF4
; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -force-vector-width=8 -force-vector-interleave=1 -S < %s | FileCheck %s --check-prefixes=CHECK-VF8
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
attributes #0 = { nounwind readnone }
declare double @sin(double) #0
declare float @sinf(float) #0
declare double @cos(double) #0
declare float @cosf(float) #0
declare double @tan(double) #0
declare float @tanf(float) #0
declare float @expf(float) #0
declare float @powf(float, float) #0
declare float @logf(float) #0
; GLIBC 2.35 libmvec functions (no corresponding LLVM intrinsic)
declare float @erff(float) #0
declare float @erfcf(float) #0
declare float @cbrtf(float) #0
declare float @expm1f(float) #0
declare float @log1pf(float) #0
declare float @asinhf(float) #0
declare float @acoshf(float) #0
declare float @atanhf(float) #0
declare double @erf(double) #0
declare double @erfc(double) #0
declare double @cbrt(double) #0
declare double @expm1(double) #0
declare double @log1p(double) #0
declare double @asinh(double) #0
declare double @acosh(double) #0
declare double @atanh(double) #0
define void @sin_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @sin_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_sin(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @sin_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_sin(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @sin_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.sin.v8f64(<8 x double> [[TMP0:%.*]])
;
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_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @sin_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.sin.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @sin_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_sinf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @sin_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_sinf(<8 x float> [[TMP0:%.*]])
;
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_f64_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @sin_f64_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_sin(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @sin_f64_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_sin(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @sin_f64_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.sin.v8f64(<8 x double> [[TMP0:%.*]])
;
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_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @sin_f32_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.sin.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @sin_f32_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_sinf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @sin_f32_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_sinf(<8 x float> [[TMP0:%.*]])
;
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-VF2-LABEL: define void @cos_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_cos(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @cos_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_cos(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cos_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.cos.v8f64(<8 x double> [[TMP0:%.*]])
;
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_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @cos_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.cos.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @cos_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_cosf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cos_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_cosf(<8 x float> [[TMP0:%.*]])
;
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_f64_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @cos_f64_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_cos(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @cos_f64_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_cos(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cos_f64_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.cos.v8f64(<8 x double> [[TMP0:%.*]])
;
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_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @cos_f32_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.cos.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @cos_f32_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_cosf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cos_f32_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_cosf(<8 x float> [[TMP0:%.*]])
;
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-VF2-LABEL: define void @tan_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_tan(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @tan_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_tan(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @tan_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.tan.v8f64(<8 x double> [[TMP0:%.*]])
;
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-VF2-LABEL: define void @tan_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.tan.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @tan_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_tanf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @tan_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_tanf(<8 x float> [[TMP0:%.*]])
;
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 @tan_f64_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @tan_f64_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x double> @_ZGVbN2v_tan(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @tan_f64_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x double> @_ZGVdN4v_tan(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @tan_f64_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x double> @llvm.tan.v8f64(<8 x double> [[TMP0:%.*]])
;
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.tan.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 @tan_f32_intrinsic(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @tan_f32_intrinsic(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call <2 x float> @llvm.tan.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @tan_f32_intrinsic(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call <4 x float> @_ZGVbN4v_tanf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @tan_f32_intrinsic(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call <8 x float> @_ZGVdN8v_tanf(<8 x float> [[TMP0:%.*]])
;
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.tan.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 @exp_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @exp_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x float> @llvm.exp.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @exp_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_expf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @exp_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_expf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @expf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @exp_f32_intrin(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @exp_f32_intrin(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x float> @llvm.exp.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @exp_f32_intrin(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_expf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @exp_f32_intrin(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_expf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @llvm.exp.f32(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @log_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @log_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x float> @llvm.log.v2f32(<2 x float> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @log_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_logf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @log_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_logf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @logf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.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-VF2-LABEL: define void @pow_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF2: [[TMP4:%.*]] = call fast <2 x float> @llvm.pow.v2f32(<2 x float> [[TMP2:%.*]], <2 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF2: [[I2:%.*]] = tail call fast float @powf(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR3:[0-9]+]]
;
; CHECK-VF4-LABEL: define void @pow_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF4: [[TMP4:%.*]] = call fast <4 x float> @_ZGVbN4vv_powf(<4 x float> [[TMP2:%.*]], <4 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF4: [[I2:%.*]] = tail call fast float @powf(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR3:[0-9]+]]
;
; CHECK-VF8-LABEL: define void @pow_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF8: [[TMP4:%.*]] = call fast <8 x float> @_ZGVdN8vv_powf(<8 x float> [[TMP2:%.*]], <8 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF8: [[I2:%.*]] = tail call fast float @powf(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR3:[0-9]+]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%arrayidx = getelementptr inbounds float, ptr %exp, i64 %indvars.iv
%i1 = load float, ptr %arrayidx, align 4
%i2 = tail call fast float @powf(float %conv, float %i1)
%arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %i2, ptr %arrayidx2, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @pow_f32_intrin(ptr nocapture %varray, ptr nocapture readonly %exp) {
; CHECK-VF2-LABEL: define void @pow_f32_intrin(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF2: [[TMP4:%.*]] = call fast <2 x float> @llvm.pow.v2f32(<2 x float> [[TMP2:%.*]], <2 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF2: [[I2:%.*]] = tail call fast float @llvm.pow.f32(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR4:[0-9]+]]
;
; CHECK-VF4-LABEL: define void @pow_f32_intrin(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF4: [[TMP4:%.*]] = call fast <4 x float> @_ZGVbN4vv_powf(<4 x float> [[TMP2:%.*]], <4 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF4: [[I2:%.*]] = tail call fast float @llvm.pow.f32(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR4:[0-9]+]]
;
; CHECK-VF8-LABEL: define void @pow_f32_intrin(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
; CHECK-VF8: [[TMP4:%.*]] = call fast <8 x float> @_ZGVdN8vv_powf(<8 x float> [[TMP2:%.*]], <8 x float> [[WIDE_LOAD:%.*]])
; CHECK-VF8: [[I2:%.*]] = tail call fast float @llvm.pow.f32(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR4:[0-9]+]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%arrayidx = getelementptr inbounds float, ptr %exp, i64 %indvars.iv
%i1 = load float, ptr %arrayidx, align 4
%i2 = tail call fast float @llvm.pow.f32(float %conv, float %i1)
%arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %i2, ptr %arrayidx2, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @erf_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @erf_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @erff(float [[TMP1:%.*]]) #[[ATTR5:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @erff(float [[TMP3:%.*]]) #[[ATTR5]]
;
; CHECK-VF4-LABEL: define void @erf_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_erff(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @erf_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_erff(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @erff(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @erfc_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @erfc_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @erfcf(float [[TMP1:%.*]]) #[[ATTR6:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @erfcf(float [[TMP3:%.*]]) #[[ATTR6]]
;
; CHECK-VF4-LABEL: define void @erfc_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_erfcf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @erfc_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_erfcf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @erfcf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @cbrt_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @cbrt_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @cbrtf(float [[TMP1:%.*]]) #[[ATTR7:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @cbrtf(float [[TMP3:%.*]]) #[[ATTR7]]
;
; CHECK-VF4-LABEL: define void @cbrt_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_cbrtf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cbrt_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_cbrtf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @cbrtf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @expm1_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @expm1_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @expm1f(float [[TMP1:%.*]]) #[[ATTR8:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @expm1f(float [[TMP3:%.*]]) #[[ATTR8]]
;
; CHECK-VF4-LABEL: define void @expm1_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_expm1f(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @expm1_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_expm1f(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @expm1f(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @log1p_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @log1p_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @log1pf(float [[TMP1:%.*]]) #[[ATTR9:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @log1pf(float [[TMP3:%.*]]) #[[ATTR9]]
;
; CHECK-VF4-LABEL: define void @log1p_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_log1pf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @log1p_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_log1pf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @log1pf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @asinh_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @asinh_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @asinhf(float [[TMP1:%.*]]) #[[ATTR10:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @asinhf(float [[TMP3:%.*]]) #[[ATTR10]]
;
; CHECK-VF4-LABEL: define void @asinh_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_asinhf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @asinh_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_asinhf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @asinhf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @acosh_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @acosh_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @acoshf(float [[TMP1:%.*]]) #[[ATTR11:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @acoshf(float [[TMP3:%.*]]) #[[ATTR11]]
;
; CHECK-VF4-LABEL: define void @acosh_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_acoshf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @acosh_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_acoshf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @acoshf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @atanh_f32(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @atanh_f32(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP2:%.*]] = tail call fast float @atanhf(float [[TMP1:%.*]]) #[[ATTR12:[0-9]+]]
; CHECK-VF2: [[TMP4:%.*]] = tail call fast float @atanhf(float [[TMP3:%.*]]) #[[ATTR12]]
;
; CHECK-VF4-LABEL: define void @atanh_f32(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v_atanhf(<4 x float> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @atanh_f32(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP1:%.*]] = call fast <8 x float> @_ZGVdN8v_atanhf(<8 x float> [[TMP0:%.*]])
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to float
%call = tail call fast float @atanhf(float %conv)
%arrayidx = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
store float %call, ptr %arrayidx, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @erf_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @erf_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_erf(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @erf_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_erf(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @erf_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @erf(double [[TMP1:%.*]]) #[[ATTR5:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @erf(double [[TMP3:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @erf(double [[TMP5:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @erf(double [[TMP7:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @erf(double [[TMP9:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @erf(double [[TMP11:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @erf(double [[TMP13:%.*]]) #[[ATTR5]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @erf(double [[TMP15:%.*]]) #[[ATTR5]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @erf(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @erfc_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @erfc_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_erfc(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @erfc_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_erfc(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @erfc_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @erfc(double [[TMP1:%.*]]) #[[ATTR6:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @erfc(double [[TMP3:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @erfc(double [[TMP5:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @erfc(double [[TMP7:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @erfc(double [[TMP9:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @erfc(double [[TMP11:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @erfc(double [[TMP13:%.*]]) #[[ATTR6]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @erfc(double [[TMP15:%.*]]) #[[ATTR6]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @erfc(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @cbrt_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @cbrt_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_cbrt(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @cbrt_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_cbrt(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @cbrt_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @cbrt(double [[TMP1:%.*]]) #[[ATTR7:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @cbrt(double [[TMP3:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @cbrt(double [[TMP5:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @cbrt(double [[TMP7:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @cbrt(double [[TMP9:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @cbrt(double [[TMP11:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @cbrt(double [[TMP13:%.*]]) #[[ATTR7]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @cbrt(double [[TMP15:%.*]]) #[[ATTR7]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @cbrt(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @expm1_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @expm1_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_expm1(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @expm1_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_expm1(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @expm1_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @expm1(double [[TMP1:%.*]]) #[[ATTR8:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @expm1(double [[TMP3:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @expm1(double [[TMP5:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @expm1(double [[TMP7:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @expm1(double [[TMP9:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @expm1(double [[TMP11:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @expm1(double [[TMP13:%.*]]) #[[ATTR8]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @expm1(double [[TMP15:%.*]]) #[[ATTR8]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @expm1(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @log1p_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @log1p_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_log1p(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @log1p_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_log1p(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @log1p_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @log1p(double [[TMP1:%.*]]) #[[ATTR9:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @log1p(double [[TMP3:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @log1p(double [[TMP5:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @log1p(double [[TMP7:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @log1p(double [[TMP9:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @log1p(double [[TMP11:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @log1p(double [[TMP13:%.*]]) #[[ATTR9]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @log1p(double [[TMP15:%.*]]) #[[ATTR9]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @log1p(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @asinh_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @asinh_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_asinh(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @asinh_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_asinh(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @asinh_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @asinh(double [[TMP1:%.*]]) #[[ATTR10:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @asinh(double [[TMP3:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @asinh(double [[TMP5:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @asinh(double [[TMP7:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @asinh(double [[TMP9:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @asinh(double [[TMP11:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @asinh(double [[TMP13:%.*]]) #[[ATTR10]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @asinh(double [[TMP15:%.*]]) #[[ATTR10]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @asinh(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @acosh_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @acosh_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_acosh(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @acosh_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_acosh(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @acosh_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @acosh(double [[TMP1:%.*]]) #[[ATTR11:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @acosh(double [[TMP3:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @acosh(double [[TMP5:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @acosh(double [[TMP7:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @acosh(double [[TMP9:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @acosh(double [[TMP11:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @acosh(double [[TMP13:%.*]]) #[[ATTR11]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @acosh(double [[TMP15:%.*]]) #[[ATTR11]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @acosh(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define void @atanh_f64(ptr nocapture %varray) {
; CHECK-VF2-LABEL: define void @atanh_f64(
; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF2: [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v_atanh(<2 x double> [[TMP0:%.*]])
;
; CHECK-VF4-LABEL: define void @atanh_f64(
; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF4: [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v_atanh(<4 x double> [[TMP0:%.*]])
;
; CHECK-VF8-LABEL: define void @atanh_f64(
; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
; CHECK-VF8: [[TMP2:%.*]] = tail call fast double @atanh(double [[TMP1:%.*]]) #[[ATTR12:[0-9]+]]
; CHECK-VF8: [[TMP4:%.*]] = tail call fast double @atanh(double [[TMP3:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP6:%.*]] = tail call fast double @atanh(double [[TMP5:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP8:%.*]] = tail call fast double @atanh(double [[TMP7:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP10:%.*]] = tail call fast double @atanh(double [[TMP9:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP12:%.*]] = tail call fast double @atanh(double [[TMP11:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP14:%.*]] = tail call fast double @atanh(double [[TMP13:%.*]]) #[[ATTR12]]
; CHECK-VF8: [[TMP16:%.*]] = tail call fast double @atanh(double [[TMP15:%.*]]) #[[ATTR12]]
;
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%tmp = trunc i64 %indvars.iv to i32
%conv = sitofp i32 %tmp to double
%call = tail call fast double @atanh(double %conv)
%arrayidx = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
store double %call, ptr %arrayidx, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 1000
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}