[llvm] b97d8b2 - [LoopVectorize][X86] Improve libmvec SSE/AVX/AVX-512 test coverage (#211863)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 04:10:28 PDT 2026


Author: Ankit Kumar Tiwari
Date: 2026-08-10T11:10:22Z
New Revision: b97d8b20b7ba2f3bb18a12974f1e97c7ec158ac3

URL: https://github.com/llvm/llvm-project/commit/b97d8b20b7ba2f3bb18a12974f1e97c7ec158ac3
DIFF: https://github.com/llvm/llvm-project/commit/b97d8b20b7ba2f3bb18a12974f1e97c7ec158ac3.diff

LOG: [LoopVectorize][X86] Improve libmvec SSE/AVX/AVX-512 test coverage (#211863)

This PR updates the libmvec loop vectorization tests to use `-force-vector-width` instead of hardcoded loop metadata.

Fixes #211532

Added: 
    

Modified: 
    llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll
    llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll

Removed: 
    llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll


################################################################################
diff  --git a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll b/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll
deleted file mode 100644
index 5f7261240e3d4..0000000000000
--- a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll
+++ /dev/null
@@ -1,480 +0,0 @@
-; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-define void @sin_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f64(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_sin(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !1
-
-for.end:
-  ret void
-}
-
-!1 = distinct !{!1, !2, !3}
-!2 = !{!"llvm.loop.vectorize.width", i32 2}
-!3 = !{!"llvm.loop.vectorize.enable"}
-
-
-define void @sin_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f32(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_sinf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !21
-
-for.end:
-  ret void
-}
-
-!21 = distinct !{!21, !22, !23}
-!22 = !{!"llvm.loop.vectorize.width", i32 8}
-!23 = !{!"llvm.loop.vectorize.enable"}
-
-define void @sin_f64_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f64_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_sin(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !31
-
-for.end:
-  ret void
-}
-
-!31 = distinct !{!31, !32, !33}
-!32 = !{!"llvm.loop.vectorize.width", i32 2}
-!33 = !{!"llvm.loop.vectorize.enable"}
-
-define void @sin_f32_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f32_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_sinf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !41
-
-for.end:
-  ret void
-}
-
-!41 = distinct !{!41, !42, !43}
-!42 = !{!"llvm.loop.vectorize.width", i32 8}
-!43 = !{!"llvm.loop.vectorize.enable"}
-
-define void @cos_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f64(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_cos(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !51
-
-for.end:
-  ret void
-}
-
-!51 = distinct !{!51, !52, !53}
-!52 = !{!"llvm.loop.vectorize.width", i32 2}
-!53 = !{!"llvm.loop.vectorize.enable"}
-
-define void @cos_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f32(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_cosf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !61
-
-for.end:
-  ret void
-}
-
-!61 = distinct !{!61, !62, !63}
-!62 = !{!"llvm.loop.vectorize.width", i32 8}
-!63 = !{!"llvm.loop.vectorize.enable"}
-
-define void @cos_f64_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f64_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_cos(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !71
-
-for.end:
-  ret void
-}
-
-!71 = distinct !{!71, !72, !73}
-!72 = !{!"llvm.loop.vectorize.width", i32 2}
-!73 = !{!"llvm.loop.vectorize.enable"}
-
-define void @cos_f32_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f32_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_cosf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !81
-
-for.end:
-  ret void
-}
-
-!81 = distinct !{!81, !82, !83}
-!82 = !{!"llvm.loop.vectorize.width", i32 8}
-!83 = !{!"llvm.loop.vectorize.enable"}
-
-
-define void @exp_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @exp_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <8 x float> @_ZGVdN8v_expf
-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, !llvm.loop !91
-
-for.end:
-  ret void
-}
-
-!91 = distinct !{!91, !92, !93}
-!92 = !{!"llvm.loop.vectorize.width", i32 8}
-!93 = !{!"llvm.loop.vectorize.enable"}
-
-define void @exp_f32_intrin(ptr nocapture %varray) {
-; CHECK-LABEL: @exp_f32_intrin
-; CHECK-LABEL: vector.body
-; CHECK: <8 x float> @_ZGVdN8v_expf
-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, !llvm.loop !101
-
-for.end:
-  ret void
-}
-
-!101 = distinct !{!101, !102, !103}
-!102 = !{!"llvm.loop.vectorize.width", i32 8}
-!103 = !{!"llvm.loop.vectorize.enable"}
-
-
-define void @log_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @log_f32
-; CHECK-LABEL: vector.body
-; CHECK: <8 x float> @_ZGVdN8v_logf
-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, !llvm.loop !111
-
-for.end:
-  ret void
-}
-
-!111 = distinct !{!111, !112, !113}
-!112 = !{!"llvm.loop.vectorize.width", i32 8}
-!113 = !{!"llvm.loop.vectorize.enable"}
-
-define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <8 x float> @_ZGVdN8vv_powf
-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
-  %tmp1 = load float, ptr %arrayidx, align 4
-  %tmp2 = tail call fast float @powf(float %conv, float %tmp1)
-  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
-  store float %tmp2, 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, !llvm.loop !121
-
-for.end:
-  ret void
-}
-
-!121 = distinct !{!121, !122, !123}
-!122 = !{!"llvm.loop.vectorize.width", i32 8}
-!123 = !{!"llvm.loop.vectorize.enable"}
-
-define void @pow_f32_intrin(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f32_intrin
-; CHECK-LABEL:    vector.body
-; CHECK: <8 x float> @_ZGVdN8vv_powf
-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
-  %tmp1 = load float, ptr %arrayidx, align 4
-  %tmp2 = tail call fast float @llvm.pow.f32(float %conv, float %tmp1)
-  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
-  store float %tmp2, 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, !llvm.loop !131
-
-for.end:
-  ret void
-}
-
-!131 = distinct !{!131, !132, !133}
-!132 = !{!"llvm.loop.vectorize.width", i32 8}
-!133 = !{!"llvm.loop.vectorize.enable"}
-
-define void @tan_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @tan_f64(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_tan(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !1
-
-for.end:
-  ret void
-}
-
-!141 = distinct !{!141, !142, !143}
-!142 = !{!"llvm.loop.vectorize.width", i32 2}
-!143 = !{!"llvm.loop.vectorize.enable"}
-
-
-define void @tan_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @tan_f32(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_tanf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !21
-
-for.end:
-  ret void
-}
-
-!151 = distinct !{!151, !152, !153}
-!152 = !{!"llvm.loop.vectorize.width", i32 8}
-!153 = !{!"llvm.loop.vectorize.enable"}
-
-define void @tan_f64_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @tan_f64_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <2 x double> @_ZGVbN2v_tan(<2 x double> [[TMP4:%.*]])
-;
-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, !llvm.loop !31
-
-for.end:
-  ret void
-}
-
-!161 = distinct !{!161, !162, !163}
-!162 = !{!"llvm.loop.vectorize.width", i32 2}
-!163 = !{!"llvm.loop.vectorize.enable"}
-
-define void @tan_f32_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @tan_f32_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <8 x float> @_ZGVdN8v_tanf(<8 x float> [[TMP4:%.*]])
-;
-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, !llvm.loop !41
-
-for.end:
-  ret void
-}
-
-
-
-!171 = distinct !{!171, !172, !173}
-!172 = !{!"llvm.loop.vectorize.width", i32 8}
-!173 = !{!"llvm.loop.vectorize.enable"}
-
-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

diff  --git a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll b/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll
index 176ce4e05299f..e495fa6676f6c 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll
@@ -1,12 +1,24 @@
-; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s
+; 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"
 
 define void @exp_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @exp_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v___expf_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @exp_f32(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF2:    [[TMP2:%.*]] = tail call fast float @__expf_finite(float [[TMP1:%.*]]) #[[ATTR0:[0-9]+]]
+; CHECK-VF2:    [[TMP4:%.*]] = tail call fast float @__expf_finite(float [[TMP3:%.*]]) #[[ATTR0]]
+;
+; CHECK-VF4-LABEL: define void @exp_f32(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF4:    [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v___expf_finite(<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_finite(<8 x float> [[TMP0:%.*]])
+;
 entry:
   br label %for.body
 
@@ -19,21 +31,32 @@ for.body:
   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, !llvm.loop !1
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!1 = distinct !{!1, !2, !3}
-!2 = !{!"llvm.loop.vectorize.width", i32 4}
-!3 = !{!"llvm.loop.vectorize.enable"}
-
 define void @exp_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @exp_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x double> @_ZGVdN4v___exp_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @exp_f64(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF2:    [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v___exp_finite(<2 x double> [[TMP0:%.*]])
+;
+; CHECK-VF4-LABEL: define void @exp_f64(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF4:    [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v___exp_finite(<4 x double> [[TMP0:%.*]])
+;
+; CHECK-VF8-LABEL: define void @exp_f64(
+; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF8:    [[TMP2:%.*]] = tail call fast double @__exp_finite(double [[TMP1:%.*]]) #[[ATTR0:[0-9]+]]
+; CHECK-VF8:    [[TMP4:%.*]] = tail call fast double @__exp_finite(double [[TMP3:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP6:%.*]] = tail call fast double @__exp_finite(double [[TMP5:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP8:%.*]] = tail call fast double @__exp_finite(double [[TMP7:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP10:%.*]] = tail call fast double @__exp_finite(double [[TMP9:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP12:%.*]] = tail call fast double @__exp_finite(double [[TMP11:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP14:%.*]] = tail call fast double @__exp_finite(double [[TMP13:%.*]]) #[[ATTR0]]
+; CHECK-VF8:    [[TMP16:%.*]] = tail call fast double @__exp_finite(double [[TMP15:%.*]]) #[[ATTR0]]
+;
 entry:
   br label %for.body
 
@@ -46,21 +69,26 @@ for.body:
   store double %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, !llvm.loop !11
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!11 = distinct !{!11, !12, !13}
-!12 = !{!"llvm.loop.vectorize.width", i32 4}
-!13 = !{!"llvm.loop.vectorize.enable"}
-
 define void @log_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @log_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v___logf_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @log_f32(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF2:    [[TMP2:%.*]] = tail call fast float @__logf_finite(float [[TMP1:%.*]]) #[[ATTR1:[0-9]+]]
+; CHECK-VF2:    [[TMP4:%.*]] = tail call fast float @__logf_finite(float [[TMP3:%.*]]) #[[ATTR1]]
+;
+; CHECK-VF4-LABEL: define void @log_f32(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF4:    [[TMP1:%.*]] = call fast <4 x float> @_ZGVbN4v___logf_finite(<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_finite(<8 x float> [[TMP0:%.*]])
+;
 entry:
   br label %for.body
 
@@ -73,21 +101,32 @@ for.body:
   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, !llvm.loop !21
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!21 = distinct !{!21, !22, !23}
-!22 = !{!"llvm.loop.vectorize.width", i32 4}
-!23 = !{!"llvm.loop.vectorize.enable"}
-
 define void @log_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @log_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x double> @_ZGVdN4v___log_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @log_f64(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF2:    [[TMP1:%.*]] = call fast <2 x double> @_ZGVbN2v___log_finite(<2 x double> [[TMP0:%.*]])
+;
+; CHECK-VF4-LABEL: define void @log_f64(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF4:    [[TMP1:%.*]] = call fast <4 x double> @_ZGVdN4v___log_finite(<4 x double> [[TMP0:%.*]])
+;
+; CHECK-VF8-LABEL: define void @log_f64(
+; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]]) {
+; CHECK-VF8:    [[TMP2:%.*]] = tail call fast double @__log_finite(double [[TMP1:%.*]]) #[[ATTR1:[0-9]+]]
+; CHECK-VF8:    [[TMP4:%.*]] = tail call fast double @__log_finite(double [[TMP3:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP6:%.*]] = tail call fast double @__log_finite(double [[TMP5:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP8:%.*]] = tail call fast double @__log_finite(double [[TMP7:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP10:%.*]] = tail call fast double @__log_finite(double [[TMP9:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP12:%.*]] = tail call fast double @__log_finite(double [[TMP11:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP14:%.*]] = tail call fast double @__log_finite(double [[TMP13:%.*]]) #[[ATTR1]]
+; CHECK-VF8:    [[TMP16:%.*]] = tail call fast double @__log_finite(double [[TMP15:%.*]]) #[[ATTR1]]
+;
 entry:
   br label %for.body
 
@@ -100,21 +139,30 @@ for.body:
   store double %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, !llvm.loop !31
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!31 = distinct !{!31, !32, !33}
-!32 = !{!"llvm.loop.vectorize.width", i32 4}
-!33 = !{!"llvm.loop.vectorize.enable"}
 
 define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4vv___powf_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @pow_f32(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF2:    [[TMP6:%.*]] = tail call fast float @__powf_finite(float [[TMP4:%.*]], float [[TMP5:%.*]]) #[[ATTR2:[0-9]+]]
+; CHECK-VF2:    [[TMP9:%.*]] = tail call fast float @__powf_finite(float [[TMP7:%.*]], float [[TMP8:%.*]]) #[[ATTR2]]
+; CHECK-VF2:    [[I2:%.*]] = tail call fast float @__powf_finite(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR2]]
+;
+; CHECK-VF4-LABEL: define void @pow_f32(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF4:    [[TMP3:%.*]] = call fast <4 x float> @_ZGVbN4vv___powf_finite(<4 x float> [[TMP1:%.*]], <4 x float> [[WIDE_LOAD:%.*]])
+; CHECK-VF4:    [[I2:%.*]] = tail call fast float @__powf_finite(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR0:[0-9]+]]
+;
+; CHECK-VF8-LABEL: define void @pow_f32(
+; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF8:    [[TMP3:%.*]] = call fast <8 x float> @_ZGVdN8vv___powf_finite(<8 x float> [[TMP1:%.*]], <8 x float> [[WIDE_LOAD:%.*]])
+; CHECK-VF8:    [[I2:%.*]] = tail call fast float @__powf_finite(float [[CONV:%.*]], float [[I1:%.*]]) #[[ATTR2:[0-9]+]]
+;
 entry:
   br label %for.body
 
@@ -123,27 +171,41 @@ for.body:
   %tmp = trunc i64 %indvars.iv to i32
   %conv = sitofp i32 %tmp to float
   %arrayidx = getelementptr inbounds float, ptr %exp, i64 %indvars.iv
-  %tmp1 = load float, ptr %arrayidx, align 4
-  %tmp2 = tail call fast float @__powf_finite(float %conv, float %tmp1)
+  %i1 = load float, ptr %arrayidx, align 4
+  %i2 = tail call fast float @__powf_finite(float %conv, float %i1)
   %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %indvars.iv
-  store float %tmp2, ptr %arrayidx2, align 4
+  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, !llvm.loop !41
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!41 = distinct !{!41, !42, !43}
-!42 = !{!"llvm.loop.vectorize.width", i32 4}
-!43 = !{!"llvm.loop.vectorize.enable"}
-
 define void @pow_f64(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x double> @_ZGVdN4vv___pow_finite
-; CHECK: ret
+; CHECK-VF2-LABEL: define void @pow_f64(
+; CHECK-VF2-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF2:    [[TMP3:%.*]] = call fast <2 x double> @_ZGVbN2vv___pow_finite(<2 x double> [[TMP1:%.*]], <2 x double> [[WIDE_LOAD:%.*]])
+; CHECK-VF2:    [[I2:%.*]] = tail call fast double @__pow_finite(double [[CONV:%.*]], double [[I1:%.*]]) #[[ATTR3:[0-9]+]]
+;
+; CHECK-VF4-LABEL: define void @pow_f64(
+; CHECK-VF4-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF4:    [[TMP3:%.*]] = call fast <4 x double> @_ZGVdN4vv___pow_finite(<4 x double> [[TMP1:%.*]], <4 x double> [[WIDE_LOAD:%.*]])
+; CHECK-VF4:    [[I2:%.*]] = tail call fast double @__pow_finite(double [[CONV:%.*]], double [[I1:%.*]]) #[[ATTR1:[0-9]+]]
+;
+; CHECK-VF8-LABEL: define void @pow_f64(
+; CHECK-VF8-SAME: ptr captures(none) [[VARRAY:%.*]], ptr readonly captures(none) [[EXP:%.*]]) {
+; CHECK-VF8:    [[TMP6:%.*]] = tail call fast double @__pow_finite(double [[TMP4:%.*]], double [[TMP5:%.*]]) #[[ATTR3:[0-9]+]]
+; CHECK-VF8:    [[TMP9:%.*]] = tail call fast double @__pow_finite(double [[TMP7:%.*]], double [[TMP8:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP12:%.*]] = tail call fast double @__pow_finite(double [[TMP10:%.*]], double [[TMP11:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP15:%.*]] = tail call fast double @__pow_finite(double [[TMP13:%.*]], double [[TMP14:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP18:%.*]] = tail call fast double @__pow_finite(double [[TMP16:%.*]], double [[TMP17:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP21:%.*]] = tail call fast double @__pow_finite(double [[TMP19:%.*]], double [[TMP20:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP24:%.*]] = tail call fast double @__pow_finite(double [[TMP22:%.*]], double [[TMP23:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[TMP27:%.*]] = tail call fast double @__pow_finite(double [[TMP25:%.*]], double [[TMP26:%.*]]) #[[ATTR3]]
+; CHECK-VF8:    [[I2:%.*]] = tail call fast double @__pow_finite(double [[CONV:%.*]], double [[I1:%.*]]) #[[ATTR3]]
+;
 entry:
   br label %for.body
 
@@ -152,22 +214,18 @@ for.body:
   %tmp = trunc i64 %indvars.iv to i32
   %conv = sitofp i32 %tmp to double
   %arrayidx = getelementptr inbounds double, ptr %exp, i64 %indvars.iv
-  %tmp1 = load double, ptr %arrayidx, align 4
-  %tmp2 = tail call fast double @__pow_finite(double %conv, double %tmp1)
+  %i1 = load double, ptr %arrayidx, align 4
+  %i2 = tail call fast double @__pow_finite(double %conv, double %i1)
   %arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %indvars.iv
-  store double %tmp2, ptr %arrayidx2, align 4
+  store double %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, !llvm.loop !51
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!51 = distinct !{!51, !52, !53}
-!52 = !{!"llvm.loop.vectorize.width", i32 4}
-!53 = !{!"llvm.loop.vectorize.enable"}
-
 declare float @__expf_finite(float) #0
 declare double @__exp_finite(double) #0
 declare float @__logf_finite(float) #0

diff  --git a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll b/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll
index be9d90a71eb33..84cab4bc95901 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll
@@ -1,12 +1,53 @@
-; RUN: opt -vector-library=LIBMVEC -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s
+; 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-LABEL: @sin_f64(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x double> @_ZGVdN4v_sin(<4 x double> [[TMP4:%.*]])
+; 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
@@ -20,21 +61,24 @@ for.body:
   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, !llvm.loop !1
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!1 = distinct !{!1, !2, !3}
-!2 = !{!"llvm.loop.vectorize.width", i32 4}
-!3 = !{!"llvm.loop.vectorize.enable"}
-
-
 define void @sin_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f32(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x float> @_ZGVbN4v_sinf(<4 x float> [[TMP4:%.*]])
+; 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
@@ -48,20 +92,24 @@ for.body:
   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, !llvm.loop !21
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!21 = distinct !{!21, !22, !23}
-!22 = !{!"llvm.loop.vectorize.width", i32 4}
-!23 = !{!"llvm.loop.vectorize.enable"}
-
 define void @sin_f64_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f64_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x double> @_ZGVdN4v_sin(<4 x double> [[TMP4:%.*]])
+; 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
@@ -75,20 +123,24 @@ for.body:
   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, !llvm.loop !31
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!31 = distinct !{!31, !32, !33}
-!32 = !{!"llvm.loop.vectorize.width", i32 4}
-!33 = !{!"llvm.loop.vectorize.enable"}
-
 define void @sin_f32_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @sin_f32_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x float> @_ZGVbN4v_sinf(<4 x float> [[TMP4:%.*]])
+; 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
@@ -102,20 +154,24 @@ for.body:
   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, !llvm.loop !41
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!41 = distinct !{!41, !42, !43}
-!42 = !{!"llvm.loop.vectorize.width", i32 4}
-!43 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cos_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f64(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x double> @_ZGVdN4v_cos(<4 x double> [[TMP4:%.*]])
+; 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
@@ -129,20 +185,24 @@ for.body:
   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, !llvm.loop !51
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!51 = distinct !{!51, !52, !53}
-!52 = !{!"llvm.loop.vectorize.width", i32 4}
-!53 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cos_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f32(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x float> @_ZGVbN4v_cosf(<4 x float> [[TMP4:%.*]])
+; 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
@@ -156,20 +216,24 @@ for.body:
   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, !llvm.loop !61
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!61 = distinct !{!61, !62, !63}
-!62 = !{!"llvm.loop.vectorize.width", i32 4}
-!63 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cos_f64_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f64_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x double> @_ZGVdN4v_cos(<4 x double> [[TMP4:%.*]])
+; 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
@@ -183,20 +247,24 @@ for.body:
   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, !llvm.loop !71
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!71 = distinct !{!71, !72, !73}
-!72 = !{!"llvm.loop.vectorize.width", i32 4}
-!73 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cos_f32_intrinsic(ptr nocapture %varray) {
-; CHECK-LABEL: @cos_f32_intrinsic(
-; CHECK-LABEL:    vector.body
-; CHECK:    [[TMP5:%.*]] = call <4 x float> @_ZGVbN4v_cosf(<4 x float> [[TMP4:%.*]])
+; 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
@@ -210,21 +278,149 @@ for.body:
   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, !llvm.loop !81
+  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
 }
 
-!81 = distinct !{!81, !82, !83}
-!82 = !{!"llvm.loop.vectorize.width", i32 4}
-!83 = !{!"llvm.loop.vectorize.enable"}
+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-LABEL: @exp_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_expf
+; 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
 
@@ -237,20 +433,25 @@ for.body:
   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, !llvm.loop !91
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!91 = distinct !{!91, !92, !93}
-!92 = !{!"llvm.loop.vectorize.width", i32 4}
-!93 = !{!"llvm.loop.vectorize.enable"}
-
 define void @exp_f32_intrin(ptr nocapture %varray) {
-; CHECK-LABEL: @exp_f32_intrin
-; CHECK-LABEL: vector.body
-; CHECK: <4 x float> @_ZGVbN4v_expf
+; 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
 
@@ -263,21 +464,25 @@ for.body:
   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, !llvm.loop !101
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!101 = distinct !{!101, !102, !103}
-!102 = !{!"llvm.loop.vectorize.width", i32 4}
-!103 = !{!"llvm.loop.vectorize.enable"}
-
-
 define void @log_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @log_f32
-; CHECK-LABEL: vector.body
-; CHECK: <4 x float> @_ZGVbN4v_logf
+; 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
 
@@ -290,20 +495,28 @@ for.body:
   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, !llvm.loop !111
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!111 = distinct !{!111, !112, !113}
-!112 = !{!"llvm.loop.vectorize.width", i32 4}
-!113 = !{!"llvm.loop.vectorize.enable"}
-
 define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4vv_powf
+; 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
 
@@ -312,26 +525,34 @@ for.body:
   %tmp = trunc i64 %indvars.iv to i32
   %conv = sitofp i32 %tmp to float
   %arrayidx = getelementptr inbounds float, ptr %exp, i64 %indvars.iv
-  %tmp1 = load float, ptr %arrayidx, align 4
-  %tmp2 = tail call fast float @powf(float %conv, float %tmp1)
+  %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 %tmp2, ptr %arrayidx2, align 4
+  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, !llvm.loop !121
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!121 = distinct !{!121, !122, !123}
-!122 = !{!"llvm.loop.vectorize.width", i32 4}
-!123 = !{!"llvm.loop.vectorize.enable"}
-
 define void @pow_f32_intrin(ptr nocapture %varray, ptr nocapture readonly %exp) {
-; CHECK-LABEL: @pow_f32_intrin
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4vv_powf
+; 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
 
@@ -340,47 +561,32 @@ for.body:
   %tmp = trunc i64 %indvars.iv to i32
   %conv = sitofp i32 %tmp to float
   %arrayidx = getelementptr inbounds float, ptr %exp, i64 %indvars.iv
-  %tmp1 = load float, ptr %arrayidx, align 4
-  %tmp2 = tail call fast float @llvm.pow.f32(float %conv, float %tmp1)
+  %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 %tmp2, ptr %arrayidx2, align 4
+  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, !llvm.loop !131
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!131 = distinct !{!131, !132, !133}
-!132 = !{!"llvm.loop.vectorize.width", i32 4}
-!133 = !{!"llvm.loop.vectorize.enable"}
-
-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 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
-
 define void @erf_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @erf_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_erff
+; 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
 
@@ -393,20 +599,26 @@ for.body:
   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, !llvm.loop !134
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!134 = distinct !{!134, !135, !136}
-!135 = !{!"llvm.loop.vectorize.width", i32 4}
-!136 = !{!"llvm.loop.vectorize.enable"}
-
 define void @erfc_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @erfc_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_erfcf
+; 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
 
@@ -419,20 +631,26 @@ for.body:
   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, !llvm.loop !137
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!137 = distinct !{!137, !138, !139}
-!138 = !{!"llvm.loop.vectorize.width", i32 4}
-!139 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cbrt_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @cbrt_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_cbrtf
+; 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
 
@@ -445,20 +663,26 @@ for.body:
   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, !llvm.loop !140
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!140 = distinct !{!140, !141, !142}
-!141 = !{!"llvm.loop.vectorize.width", i32 4}
-!142 = !{!"llvm.loop.vectorize.enable"}
-
 define void @expm1_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @expm1_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_expm1f
+; 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
 
@@ -471,20 +695,26 @@ for.body:
   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, !llvm.loop !143
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!143 = distinct !{!143, !144, !145}
-!144 = !{!"llvm.loop.vectorize.width", i32 4}
-!145 = !{!"llvm.loop.vectorize.enable"}
-
 define void @log1p_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @log1p_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_log1pf
+; 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
 
@@ -497,20 +727,26 @@ for.body:
   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, !llvm.loop !146
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!146 = distinct !{!146, !147, !148}
-!147 = !{!"llvm.loop.vectorize.width", i32 4}
-!148 = !{!"llvm.loop.vectorize.enable"}
-
 define void @asinh_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @asinh_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_asinhf
+; 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
 
@@ -523,20 +759,26 @@ for.body:
   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, !llvm.loop !149
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!149 = distinct !{!149, !150, !151}
-!150 = !{!"llvm.loop.vectorize.width", i32 4}
-!151 = !{!"llvm.loop.vectorize.enable"}
-
 define void @acosh_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @acosh_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_acoshf
+; 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
 
@@ -549,20 +791,26 @@ for.body:
   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, !llvm.loop !152
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!152 = distinct !{!152, !153, !154}
-!153 = !{!"llvm.loop.vectorize.width", i32 4}
-!154 = !{!"llvm.loop.vectorize.enable"}
-
 define void @atanh_f32(ptr nocapture %varray) {
-; CHECK-LABEL: @atanh_f32
-; CHECK-LABEL:    vector.body
-; CHECK: <4 x float> @_ZGVbN4v_atanhf
+; 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
 
@@ -575,32 +823,32 @@ for.body:
   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, !llvm.loop !155
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!155 = distinct !{!155, !156, !157}
-!156 = !{!"llvm.loop.vectorize.width", i32 4}
-!157 = !{!"llvm.loop.vectorize.enable"}
-
-
-
-; GLIBC 2.35 libmvec functions, f64 (no corresponding LLVM intrinsic)
-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 @erf_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @erf_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_erf
+; 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
 
@@ -613,20 +861,32 @@ for.body:
   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, !llvm.loop !158
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!158 = distinct !{!158, !159, !160}
-!159 = !{!"llvm.loop.vectorize.width", i32 2}
-!160 = !{!"llvm.loop.vectorize.enable"}
-
 define void @erfc_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @erfc_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_erfc
+; 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
 
@@ -639,20 +899,32 @@ for.body:
   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, !llvm.loop !161
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!161 = distinct !{!161, !162, !163}
-!162 = !{!"llvm.loop.vectorize.width", i32 2}
-!163 = !{!"llvm.loop.vectorize.enable"}
-
 define void @cbrt_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @cbrt_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_cbrt
+; 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
 
@@ -665,20 +937,32 @@ for.body:
   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, !llvm.loop !164
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!164 = distinct !{!164, !165, !166}
-!165 = !{!"llvm.loop.vectorize.width", i32 2}
-!166 = !{!"llvm.loop.vectorize.enable"}
-
 define void @expm1_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @expm1_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_expm1
+; 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
 
@@ -691,20 +975,32 @@ for.body:
   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, !llvm.loop !167
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!167 = distinct !{!167, !168, !169}
-!168 = !{!"llvm.loop.vectorize.width", i32 2}
-!169 = !{!"llvm.loop.vectorize.enable"}
-
 define void @log1p_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @log1p_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_log1p
+; 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
 
@@ -717,20 +1013,32 @@ for.body:
   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, !llvm.loop !170
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!170 = distinct !{!170, !171, !172}
-!171 = !{!"llvm.loop.vectorize.width", i32 2}
-!172 = !{!"llvm.loop.vectorize.enable"}
-
 define void @asinh_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @asinh_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_asinh
+; 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
 
@@ -743,20 +1051,32 @@ for.body:
   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, !llvm.loop !173
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!173 = distinct !{!173, !174, !175}
-!174 = !{!"llvm.loop.vectorize.width", i32 2}
-!175 = !{!"llvm.loop.vectorize.enable"}
-
 define void @acosh_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @acosh_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_acosh
+; 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
 
@@ -769,20 +1089,32 @@ for.body:
   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, !llvm.loop !176
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
 
-!176 = distinct !{!176, !177, !178}
-!177 = !{!"llvm.loop.vectorize.width", i32 2}
-!178 = !{!"llvm.loop.vectorize.enable"}
-
 define void @atanh_f64(ptr nocapture %varray) {
-; CHECK-LABEL: @atanh_f64
-; CHECK-LABEL:    vector.body
-; CHECK: <2 x double> @_ZGVbN2v_atanh
+; 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
 
@@ -795,13 +1127,8 @@ for.body:
   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, !llvm.loop !179
+  br i1 %exitcond, label %for.end, label %for.body
 
 for.end:
   ret void
 }
-
-!179 = distinct !{!179, !180, !181}
-!180 = !{!"llvm.loop.vectorize.width", i32 2}
-!181 = !{!"llvm.loop.vectorize.enable"}
-


        


More information about the llvm-commits mailing list