brintos

brintos / llvm-project-archived public Read only

0
0
Text · 25.5 KiB · 2e78e36 Raw
886 lines · plain
1; RUN: opt -vector-library=SVML -passes=inject-tli-mappings,loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -mattr=avx -S < %s | FileCheck %s2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6declare double @sin(double) #07declare float @sinf(float) #08declare double @llvm.sin.f64(double) #09declare float @llvm.sin.f32(float) #010 11declare double @cos(double) #012declare float @cosf(float) #013declare double @llvm.cos.f64(double) #014declare float @llvm.cos.f32(float) #015 16declare double @pow(double, double) #017declare float @powf(float, float) #018declare double @llvm.pow.f64(double, double) #019declare float @llvm.pow.f32(float, float) #020 21declare double @exp(double) #022declare float @expf(float) #023declare double @llvm.exp.f64(double) #024declare float @llvm.exp.f32(float) #025 26declare double @log(double) #027declare float @logf(float) #028declare double @llvm.log.f64(double) #029declare float @llvm.log.f32(float) #030 31declare double @log2(double) #032declare float @log2f(float) #033declare double @llvm.log2.f64(double) #034declare float @llvm.log2.f32(float) #035 36declare double @log10(double) #037declare float @log10f(float) #038declare double @llvm.log10.f64(double) #039declare float @llvm.log10.f32(float) #040 41declare double @sqrt(double) #042declare float @sqrtf(float) #043 44declare double @exp2(double) #045declare float @exp2f(float) #046declare double @llvm.exp2.f64(double) #047declare float @llvm.exp2.f32(float) #048 49define void @sin_f64(ptr nocapture %varray) {50; CHECK-LABEL: @sin_f64(51; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_sin4(<4 x double> [[TMP4:%.*]])52; CHECK:    ret void53;54entry:55  br label %for.body56 57for.body:58  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]59  %tmp = trunc i64 %iv to i3260  %conv = sitofp i32 %tmp to double61  %call = tail call double @sin(double %conv)62  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv63  store double %call, ptr %arrayidx, align 464  %iv.next = add nuw nsw i64 %iv, 165  %exitcond = icmp eq i64 %iv.next, 100066  br i1 %exitcond, label %for.end, label %for.body67 68for.end:69  ret void70}71 72define void @sin_f32(ptr nocapture %varray) {73; CHECK-LABEL: @sin_f32(74; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_sinf4(<4 x float> [[TMP4:%.*]])75; CHECK:    ret void76;77entry:78  br label %for.body79 80for.body:81  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]82  %tmp = trunc i64 %iv to i3283  %conv = sitofp i32 %tmp to float84  %call = tail call float @sinf(float %conv)85  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv86  store float %call, ptr %arrayidx, align 487  %iv.next = add nuw nsw i64 %iv, 188  %exitcond = icmp eq i64 %iv.next, 100089  br i1 %exitcond, label %for.end, label %for.body90 91for.end:92  ret void93}94 95define void @sin_f64_intrinsic(ptr nocapture %varray) {96; CHECK-LABEL: @sin_f64_intrinsic(97; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_sin4(<4 x double> [[TMP4:%.*]])98; CHECK:    ret void99;100entry:101  br label %for.body102 103for.body:104  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]105  %tmp = trunc i64 %iv to i32106  %conv = sitofp i32 %tmp to double107  %call = tail call double @llvm.sin.f64(double %conv)108  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv109  store double %call, ptr %arrayidx, align 4110  %iv.next = add nuw nsw i64 %iv, 1111  %exitcond = icmp eq i64 %iv.next, 1000112  br i1 %exitcond, label %for.end, label %for.body113 114for.end:115  ret void116}117 118define void @sin_f32_intrinsic(ptr nocapture %varray) {119; CHECK-LABEL: @sin_f32_intrinsic(120; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_sinf4(<4 x float> [[TMP4:%.*]])121; CHECK:    ret void122;123entry:124  br label %for.body125 126for.body:127  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]128  %tmp = trunc i64 %iv to i32129  %conv = sitofp i32 %tmp to float130  %call = tail call float @llvm.sin.f32(float %conv)131  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv132  store float %call, ptr %arrayidx, align 4133  %iv.next = add nuw nsw i64 %iv, 1134  %exitcond = icmp eq i64 %iv.next, 1000135  br i1 %exitcond, label %for.end, label %for.body136 137for.end:138  ret void139}140 141define void @cos_f64(ptr nocapture %varray) {142; CHECK-LABEL: @cos_f64(143; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_cos4(<4 x double> [[TMP4:%.*]])144; CHECK:    ret void145;146entry:147  br label %for.body148 149for.body:150  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]151  %tmp = trunc i64 %iv to i32152  %conv = sitofp i32 %tmp to double153  %call = tail call double @cos(double %conv)154  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv155  store double %call, ptr %arrayidx, align 4156  %iv.next = add nuw nsw i64 %iv, 1157  %exitcond = icmp eq i64 %iv.next, 1000158  br i1 %exitcond, label %for.end, label %for.body159 160for.end:161  ret void162}163 164define void @cos_f32(ptr nocapture %varray) {165; CHECK-LABEL: @cos_f32(166; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_cosf4(<4 x float> [[TMP4:%.*]])167; CHECK:    ret void168;169entry:170  br label %for.body171 172for.body:173  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]174  %tmp = trunc i64 %iv to i32175  %conv = sitofp i32 %tmp to float176  %call = tail call float @cosf(float %conv)177  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv178  store float %call, ptr %arrayidx, align 4179  %iv.next = add nuw nsw i64 %iv, 1180  %exitcond = icmp eq i64 %iv.next, 1000181  br i1 %exitcond, label %for.end, label %for.body182 183for.end:184  ret void185}186 187define void @cos_f64_intrinsic(ptr nocapture %varray) {188; CHECK-LABEL: @cos_f64_intrinsic(189; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_cos4(<4 x double> [[TMP4:%.*]])190; CHECK:    ret void191;192entry:193  br label %for.body194 195for.body:196  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]197  %tmp = trunc i64 %iv to i32198  %conv = sitofp i32 %tmp to double199  %call = tail call double @llvm.cos.f64(double %conv)200  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv201  store double %call, ptr %arrayidx, align 4202  %iv.next = add nuw nsw i64 %iv, 1203  %exitcond = icmp eq i64 %iv.next, 1000204  br i1 %exitcond, label %for.end, label %for.body205 206for.end:207  ret void208}209 210define void @cos_f32_intrinsic(ptr nocapture %varray) {211; CHECK-LABEL: @cos_f32_intrinsic(212; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_cosf4(<4 x float> [[TMP4:%.*]])213; CHECK:    ret void214;215entry:216  br label %for.body217 218for.body:219  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]220  %tmp = trunc i64 %iv to i32221  %conv = sitofp i32 %tmp to float222  %call = tail call float @llvm.cos.f32(float %conv)223  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv224  store float %call, ptr %arrayidx, align 4225  %iv.next = add nuw nsw i64 %iv, 1226  %exitcond = icmp eq i64 %iv.next, 1000227  br i1 %exitcond, label %for.end, label %for.body228 229for.end:230  ret void231}232 233define void @tan_f64_intrinsic(ptr nocapture %varray) {234; CHECK-LABEL: @tan_f64_intrinsic(235; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_tan4(<4 x double> [[TMP4:%.*]])236; CHECK:    ret void237;238entry:239  br label %for.body240 241for.body:242  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]243  %tmp = trunc i64 %iv to i32244  %conv = sitofp i32 %tmp to double245  %call = tail call double @llvm.tan.f64(double %conv)246  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv247  store double %call, ptr %arrayidx, align 4248  %iv.next = add nuw nsw i64 %iv, 1249  %exitcond = icmp eq i64 %iv.next, 1000250  br i1 %exitcond, label %for.end, label %for.body251 252for.end:253  ret void254}255 256define void @tan_f32_intrinsic(ptr nocapture %varray) {257; CHECK-LABEL: @tan_f32_intrinsic(258; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_tanf4(<4 x float> [[TMP4:%.*]])259; CHECK:    ret void260;261entry:262  br label %for.body263 264for.body:265  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]266  %tmp = trunc i64 %iv to i32267  %conv = sitofp i32 %tmp to float268  %call = tail call float @llvm.tan.f32(float %conv)269  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv270  store float %call, ptr %arrayidx, align 4271  %iv.next = add nuw nsw i64 %iv, 1272  %exitcond = icmp eq i64 %iv.next, 1000273  br i1 %exitcond, label %for.end, label %for.body274 275for.end:276  ret void277}278 279define void @pow_f64(ptr nocapture %varray, ptr nocapture readonly %exp) {280; CHECK-LABEL: @pow_f64(281; CHECK:    [[TMP8:%.*]] = call <4 x double> @__svml_pow4(<4 x double> [[TMP4:%.*]], <4 x double> [[WIDE_LOAD:%.*]])282; CHECK:    ret void283;284entry:285  br label %for.body286 287for.body:288  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]289  %tmp = trunc i64 %iv to i32290  %conv = sitofp i32 %tmp to double291  %arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv292  %tmp1 = load double, ptr %arrayidx, align 4293  %tmp2 = tail call double @pow(double %conv, double %tmp1)294  %arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv295  store double %tmp2, ptr %arrayidx2, align 4296  %iv.next = add nuw nsw i64 %iv, 1297  %exitcond = icmp eq i64 %iv.next, 1000298  br i1 %exitcond, label %for.end, label %for.body299 300for.end:301  ret void302}303 304define void @pow_f64_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {305; CHECK-LABEL: @pow_f64_intrinsic(306; CHECK:    [[TMP8:%.*]] = call <4 x double> @__svml_pow4(<4 x double> [[TMP4:%.*]], <4 x double> [[WIDE_LOAD:%.*]])307; CHECK:    ret void308;309entry:310  br label %for.body311 312for.body:313  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]314  %tmp = trunc i64 %iv to i32315  %conv = sitofp i32 %tmp to double316  %arrayidx = getelementptr inbounds double, ptr %exp, i64 %iv317  %tmp1 = load double, ptr %arrayidx, align 4318  %tmp2 = tail call double @llvm.pow.f64(double %conv, double %tmp1)319  %arrayidx2 = getelementptr inbounds double, ptr %varray, i64 %iv320  store double %tmp2, ptr %arrayidx2, align 4321  %iv.next = add nuw nsw i64 %iv, 1322  %exitcond = icmp eq i64 %iv.next, 1000323  br i1 %exitcond, label %for.end, label %for.body324 325for.end:326  ret void327}328 329define void @pow_f32(ptr nocapture %varray, ptr nocapture readonly %exp) {330; CHECK-LABEL: @pow_f32(331; CHECK:    [[TMP8:%.*]] = call <4 x float> @__svml_powf4(<4 x float> [[TMP4:%.*]], <4 x float> [[WIDE_LOAD:%.*]])332; CHECK:    ret void333;334entry:335  br label %for.body336 337for.body:338  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]339  %tmp = trunc i64 %iv to i32340  %conv = sitofp i32 %tmp to float341  %arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv342  %tmp1 = load float, ptr %arrayidx, align 4343  %tmp2 = tail call float @powf(float %conv, float %tmp1)344  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv345  store float %tmp2, ptr %arrayidx2, align 4346  %iv.next = add nuw nsw i64 %iv, 1347  %exitcond = icmp eq i64 %iv.next, 1000348  br i1 %exitcond, label %for.end, label %for.body349 350for.end:351  ret void352}353 354define void @pow_f32_intrinsic(ptr nocapture %varray, ptr nocapture readonly %exp) {355; CHECK-LABEL: @pow_f32_intrinsic(356; CHECK:    [[TMP8:%.*]] = call <4 x float> @__svml_powf4(<4 x float> [[TMP4:%.*]], <4 x float> [[WIDE_LOAD:%.*]])357; CHECK:    ret void358;359entry:360  br label %for.body361 362for.body:363  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]364  %tmp = trunc i64 %iv to i32365  %conv = sitofp i32 %tmp to float366  %arrayidx = getelementptr inbounds float, ptr %exp, i64 %iv367  %tmp1 = load float, ptr %arrayidx, align 4368  %tmp2 = tail call float @llvm.pow.f32(float %conv, float %tmp1)369  %arrayidx2 = getelementptr inbounds float, ptr %varray, i64 %iv370  store float %tmp2, ptr %arrayidx2, align 4371  %iv.next = add nuw nsw i64 %iv, 1372  %exitcond = icmp eq i64 %iv.next, 1000373  br i1 %exitcond, label %for.end, label %for.body374 375for.end:376  ret void377}378 379define void @exp_f64(ptr nocapture %varray) {380; CHECK-LABEL: @exp_f64(381; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_exp4(<4 x double> [[TMP4:%.*]])382; CHECK:    ret void383;384entry:385  br label %for.body386 387for.body:388  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]389  %tmp = trunc i64 %iv to i32390  %conv = sitofp i32 %tmp to double391  %call = tail call double @exp(double %conv)392  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv393  store double %call, ptr %arrayidx, align 4394  %iv.next = add nuw nsw i64 %iv, 1395  %exitcond = icmp eq i64 %iv.next, 1000396  br i1 %exitcond, label %for.end, label %for.body397 398for.end:399  ret void400}401 402define void @exp_f32(ptr nocapture %varray) {403; CHECK-LABEL: @exp_f32(404; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_expf4(<4 x float> [[TMP4:%.*]])405; CHECK:    ret void406;407entry:408  br label %for.body409 410for.body:411  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]412  %tmp = trunc i64 %iv to i32413  %conv = sitofp i32 %tmp to float414  %call = tail call float @expf(float %conv)415  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv416  store float %call, ptr %arrayidx, align 4417  %iv.next = add nuw nsw i64 %iv, 1418  %exitcond = icmp eq i64 %iv.next, 1000419  br i1 %exitcond, label %for.end, label %for.body420 421for.end:422  ret void423}424 425define void @exp_f64_intrinsic(ptr nocapture %varray) {426; CHECK-LABEL: @exp_f64_intrinsic(427; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_exp4(<4 x double> [[TMP4:%.*]])428; CHECK:    ret void429;430entry:431  br label %for.body432 433for.body:434  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]435  %tmp = trunc i64 %iv to i32436  %conv = sitofp i32 %tmp to double437  %call = tail call double @llvm.exp.f64(double %conv)438  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv439  store double %call, ptr %arrayidx, align 4440  %iv.next = add nuw nsw i64 %iv, 1441  %exitcond = icmp eq i64 %iv.next, 1000442  br i1 %exitcond, label %for.end, label %for.body443 444for.end:445  ret void446}447 448define void @exp_f32_intrinsic(ptr nocapture %varray) {449; CHECK-LABEL: @exp_f32_intrinsic(450; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_expf4(<4 x float> [[TMP4:%.*]])451; CHECK:    ret void452;453entry:454  br label %for.body455 456for.body:457  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]458  %tmp = trunc i64 %iv to i32459  %conv = sitofp i32 %tmp to float460  %call = tail call float @llvm.exp.f32(float %conv)461  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv462  store float %call, ptr %arrayidx, align 4463  %iv.next = add nuw nsw i64 %iv, 1464  %exitcond = icmp eq i64 %iv.next, 1000465  br i1 %exitcond, label %for.end, label %for.body466 467for.end:468  ret void469}470 471define void @log_f64(ptr nocapture %varray) {472; CHECK-LABEL: @log_f64(473; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log4(<4 x double> [[TMP4:%.*]])474; CHECK:    ret void475;476entry:477  br label %for.body478 479for.body:480  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]481  %tmp = trunc i64 %iv to i32482  %conv = sitofp i32 %tmp to double483  %call = tail call double @log(double %conv)484  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv485  store double %call, ptr %arrayidx, align 4486  %iv.next = add nuw nsw i64 %iv, 1487  %exitcond = icmp eq i64 %iv.next, 1000488  br i1 %exitcond, label %for.end, label %for.body489 490for.end:491  ret void492}493 494define void @log_f32(ptr nocapture %varray) {495; CHECK-LABEL: @log_f32(496; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_logf4(<4 x float> [[TMP4:%.*]])497; CHECK:    ret void498;499entry:500  br label %for.body501 502for.body:503  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]504  %tmp = trunc i64 %iv to i32505  %conv = sitofp i32 %tmp to float506  %call = tail call float @logf(float %conv)507  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv508  store float %call, ptr %arrayidx, align 4509  %iv.next = add nuw nsw i64 %iv, 1510  %exitcond = icmp eq i64 %iv.next, 1000511  br i1 %exitcond, label %for.end, label %for.body512 513for.end:514  ret void515}516 517define void @log_f64_intrinsic(ptr nocapture %varray) {518; CHECK-LABEL: @log_f64_intrinsic(519; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log4(<4 x double> [[TMP4:%.*]])520; CHECK:    ret void521;522entry:523  br label %for.body524 525for.body:526  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]527  %tmp = trunc i64 %iv to i32528  %conv = sitofp i32 %tmp to double529  %call = tail call double @llvm.log.f64(double %conv)530  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv531  store double %call, ptr %arrayidx, align 4532  %iv.next = add nuw nsw i64 %iv, 1533  %exitcond = icmp eq i64 %iv.next, 1000534  br i1 %exitcond, label %for.end, label %for.body535 536for.end:537  ret void538}539 540define void @log_f32_intrinsic(ptr nocapture %varray) {541; CHECK-LABEL: @log_f32_intrinsic(542; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_logf4(<4 x float> [[TMP4:%.*]])543; CHECK:    ret void544;545entry:546  br label %for.body547 548for.body:549  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]550  %tmp = trunc i64 %iv to i32551  %conv = sitofp i32 %tmp to float552  %call = tail call float @llvm.log.f32(float %conv)553  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv554  store float %call, ptr %arrayidx, align 4555  %iv.next = add nuw nsw i64 %iv, 1556  %exitcond = icmp eq i64 %iv.next, 1000557  br i1 %exitcond, label %for.end, label %for.body558 559for.end:560  ret void561}562 563define void @log2_f64(ptr nocapture %varray) {564; CHECK-LABEL: @log2_f64(565; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log24(<4 x double> [[TMP4:%.*]])566; CHECK:    ret void567;568entry:569  br label %for.body570 571for.body:572  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]573  %tmp = trunc i64 %iv to i32574  %conv = sitofp i32 %tmp to double575  %call = tail call double @log2(double %conv)576  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv577  store double %call, ptr %arrayidx, align 4578  %iv.next = add nuw nsw i64 %iv, 1579  %exitcond = icmp eq i64 %iv.next, 1000580  br i1 %exitcond, label %for.end, label %for.body581 582for.end:583  ret void584}585 586define void @log2_f32(ptr nocapture %varray) {587; CHECK-LABEL: @log2_f32(588; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_log2f4(<4 x float> [[TMP4:%.*]])589; CHECK:    ret void590;591entry:592  br label %for.body593 594for.body:595  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]596  %tmp = trunc i64 %iv to i32597  %conv = sitofp i32 %tmp to float598  %call = tail call float @log2f(float %conv)599  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv600  store float %call, ptr %arrayidx, align 4601  %iv.next = add nuw nsw i64 %iv, 1602  %exitcond = icmp eq i64 %iv.next, 1000603  br i1 %exitcond, label %for.end, label %for.body604 605for.end:606  ret void607}608 609define void @log2_f64_intrinsic(ptr nocapture %varray) {610; CHECK-LABEL: @log2_f64_intrinsic(611; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log24(<4 x double> [[TMP4:%.*]])612; CHECK:    ret void613;614entry:615  br label %for.body616 617for.body:618  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]619  %tmp = trunc i64 %iv to i32620  %conv = sitofp i32 %tmp to double621  %call = tail call double @llvm.log2.f64(double %conv)622  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv623  store double %call, ptr %arrayidx, align 4624  %iv.next = add nuw nsw i64 %iv, 1625  %exitcond = icmp eq i64 %iv.next, 1000626  br i1 %exitcond, label %for.end, label %for.body627 628for.end:629  ret void630}631 632define void @log2_f32_intrinsic(ptr nocapture %varray) {633; CHECK-LABEL: @log2_f32_intrinsic(634; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_log2f4(<4 x float> [[TMP4:%.*]])635; CHECK:    ret void636;637entry:638  br label %for.body639 640for.body:641  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]642  %tmp = trunc i64 %iv to i32643  %conv = sitofp i32 %tmp to float644  %call = tail call float @llvm.log2.f32(float %conv)645  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv646  store float %call, ptr %arrayidx, align 4647  %iv.next = add nuw nsw i64 %iv, 1648  %exitcond = icmp eq i64 %iv.next, 1000649  br i1 %exitcond, label %for.end, label %for.body650 651for.end:652  ret void653}654 655define void @log10_f64(ptr nocapture %varray) {656; CHECK-LABEL: @log10_f64(657; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log104(<4 x double> [[TMP4:%.*]])658; CHECK:    ret void659;660entry:661  br label %for.body662 663for.body:664  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]665  %tmp = trunc i64 %iv to i32666  %conv = sitofp i32 %tmp to double667  %call = tail call double @log10(double %conv)668  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv669  store double %call, ptr %arrayidx, align 4670  %iv.next = add nuw nsw i64 %iv, 1671  %exitcond = icmp eq i64 %iv.next, 1000672  br i1 %exitcond, label %for.end, label %for.body673 674for.end:675  ret void676}677 678define void @log10_f32(ptr nocapture %varray) {679; CHECK-LABEL: @log10_f32(680; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_log10f4(<4 x float> [[TMP4:%.*]])681; CHECK:    ret void682;683entry:684  br label %for.body685 686for.body:687  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]688  %tmp = trunc i64 %iv to i32689  %conv = sitofp i32 %tmp to float690  %call = tail call float @log10f(float %conv)691  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv692  store float %call, ptr %arrayidx, align 4693  %iv.next = add nuw nsw i64 %iv, 1694  %exitcond = icmp eq i64 %iv.next, 1000695  br i1 %exitcond, label %for.end, label %for.body696 697for.end:698  ret void699}700 701define void @log10_f64_intrinsic(ptr nocapture %varray) {702; CHECK-LABEL: @log10_f64_intrinsic(703; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_log104(<4 x double> [[TMP4:%.*]])704; CHECK:    ret void705;706entry:707  br label %for.body708 709for.body:710  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]711  %tmp = trunc i64 %iv to i32712  %conv = sitofp i32 %tmp to double713  %call = tail call double @llvm.log10.f64(double %conv)714  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv715  store double %call, ptr %arrayidx, align 4716  %iv.next = add nuw nsw i64 %iv, 1717  %exitcond = icmp eq i64 %iv.next, 1000718  br i1 %exitcond, label %for.end, label %for.body719 720for.end:721  ret void722}723 724define void @log10_f32_intrinsic(ptr nocapture %varray) {725; CHECK-LABEL: @log10_f32_intrinsic(726; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_log10f4(<4 x float> [[TMP4:%.*]])727; CHECK:    ret void728;729entry:730  br label %for.body731 732for.body:733  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]734  %tmp = trunc i64 %iv to i32735  %conv = sitofp i32 %tmp to float736  %call = tail call float @llvm.log10.f32(float %conv)737  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv738  store float %call, ptr %arrayidx, align 4739  %iv.next = add nuw nsw i64 %iv, 1740  %exitcond = icmp eq i64 %iv.next, 1000741  br i1 %exitcond, label %for.end, label %for.body742 743for.end:744  ret void745}746 747define void @sqrt_f64(ptr nocapture %varray) {748; CHECK-LABEL: @sqrt_f64(749; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_sqrt4(<4 x double> [[TMP4:%.*]])750; CHECK:    ret void751;752entry:753  br label %for.body754 755for.body:756  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]757  %tmp = trunc i64 %iv to i32758  %conv = sitofp i32 %tmp to double759  %call = tail call double @sqrt(double %conv)760  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv761  store double %call, ptr %arrayidx, align 4762  %iv.next = add nuw nsw i64 %iv, 1763  %exitcond = icmp eq i64 %iv.next, 1000764  br i1 %exitcond, label %for.end, label %for.body765 766for.end:767  ret void768}769 770define void @sqrt_f32(ptr nocapture %varray) {771; CHECK-LABEL: @sqrt_f32(772; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_sqrtf4(<4 x float> [[TMP4:%.*]])773; CHECK:    ret void774;775entry:776  br label %for.body777 778for.body:779  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]780  %tmp = trunc i64 %iv to i32781  %conv = sitofp i32 %tmp to float782  %call = tail call float @sqrtf(float %conv)783  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv784  store float %call, ptr %arrayidx, align 4785  %iv.next = add nuw nsw i64 %iv, 1786  %exitcond = icmp eq i64 %iv.next, 1000787  br i1 %exitcond, label %for.end, label %for.body788 789for.end:790  ret void791}792 793define void @exp2_f64(ptr nocapture %varray) {794; CHECK-LABEL: @exp2_f64(795; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_exp24(<4 x double> [[TMP4:%.*]])796; CHECK:    ret void797;798entry:799  br label %for.body800 801for.body:802  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]803  %tmp = trunc i64 %iv to i32804  %conv = sitofp i32 %tmp to double805  %call = tail call double @exp2(double %conv)806  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv807  store double %call, ptr %arrayidx, align 4808  %iv.next = add nuw nsw i64 %iv, 1809  %exitcond = icmp eq i64 %iv.next, 1000810  br i1 %exitcond, label %for.end, label %for.body811 812for.end:813  ret void814}815 816define void @exp2_f32(ptr nocapture %varray) {817; CHECK-LABEL: @exp2_f32(818; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_exp2f4(<4 x float> [[TMP4:%.*]])819; CHECK:    ret void820;821entry:822  br label %for.body823 824for.body:825  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]826  %tmp = trunc i64 %iv to i32827  %conv = sitofp i32 %tmp to float828  %call = tail call float @exp2f(float %conv)829  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv830  store float %call, ptr %arrayidx, align 4831  %iv.next = add nuw nsw i64 %iv, 1832  %exitcond = icmp eq i64 %iv.next, 1000833  br i1 %exitcond, label %for.end, label %for.body834 835for.end:836  ret void837}838 839define void @exp2_f64_intrinsic(ptr nocapture %varray) {840; CHECK-LABEL: @exp2_f64_intrinsic(841; CHECK:    [[TMP5:%.*]] = call <4 x double> @__svml_exp24(<4 x double> [[TMP4:%.*]])842; CHECK:    ret void843;844entry:845  br label %for.body846 847for.body:848  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]849  %tmp = trunc i64 %iv to i32850  %conv = sitofp i32 %tmp to double851  %call = tail call double @llvm.exp2.f64(double %conv)852  %arrayidx = getelementptr inbounds double, ptr %varray, i64 %iv853  store double %call, ptr %arrayidx, align 4854  %iv.next = add nuw nsw i64 %iv, 1855  %exitcond = icmp eq i64 %iv.next, 1000856  br i1 %exitcond, label %for.end, label %for.body857 858for.end:859  ret void860}861 862define void @exp2_f32_intrinsic(ptr nocapture %varray) {863; CHECK-LABEL: @exp2_f32_intrinsic(864; CHECK:    [[TMP5:%.*]] = call <4 x float> @__svml_exp2f4(<4 x float> [[TMP4:%.*]])865; CHECK:    ret void866;867entry:868  br label %for.body869 870for.body:871  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]872  %tmp = trunc i64 %iv to i32873  %conv = sitofp i32 %tmp to float874  %call = tail call float @llvm.exp2.f32(float %conv)875  %arrayidx = getelementptr inbounds float, ptr %varray, i64 %iv876  store float %call, ptr %arrayidx, align 4877  %iv.next = add nuw nsw i64 %iv, 1878  %exitcond = icmp eq i64 %iv.next, 1000879  br i1 %exitcond, label %for.end, label %for.body880 881for.end:882  ret void883}884 885attributes #0 = { nounwind readnone }886