Home | History | Annotate | Download | only in X86
      1 ; RUN: opt < %s -vector-library=Accelerate -loop-vectorize -S | FileCheck %s
      2 
      3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
      4 target triple = "x86_64-unknown-linux-gnu"
      5 
      6 ;CHECK-LABEL: @sqrt_f32(
      7 ;CHECK: vsqrtf{{.*}}<4 x float>
      8 ;CHECK: ret void
      9 declare float @sqrtf(float) nounwind readnone
     10 define void @sqrt_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
     11 entry:
     12   %cmp6 = icmp sgt i32 %n, 0
     13   br i1 %cmp6, label %for.body, label %for.end
     14 
     15 for.body:                                         ; preds = %entry, %for.body
     16   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
     17   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
     18   %0 = load float, float* %arrayidx, align 4
     19   %call = tail call float @sqrtf(float %0) nounwind readnone
     20   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
     21   store float %call, float* %arrayidx2, align 4
     22   %indvars.iv.next = add i64 %indvars.iv, 1
     23   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
     24   %exitcond = icmp eq i32 %lftr.wideiv, %n
     25   br i1 %exitcond, label %for.end, label %for.body
     26 
     27 for.end:                                          ; preds = %for.body, %entry
     28   ret void
     29 }
     30 
     31 ;CHECK-LABEL: @exp_f32(
     32 ;CHECK: vexpf{{.*}}<4 x float>
     33 ;CHECK: ret void
     34 declare float @expf(float) nounwind readnone
     35 define void @exp_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
     36 entry:
     37   %cmp6 = icmp sgt i32 %n, 0
     38   br i1 %cmp6, label %for.body, label %for.end
     39 
     40 for.body:                                         ; preds = %entry, %for.body
     41   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
     42   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
     43   %0 = load float, float* %arrayidx, align 4
     44   %call = tail call float @expf(float %0) nounwind readnone
     45   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
     46   store float %call, float* %arrayidx2, align 4
     47   %indvars.iv.next = add i64 %indvars.iv, 1
     48   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
     49   %exitcond = icmp eq i32 %lftr.wideiv, %n
     50   br i1 %exitcond, label %for.end, label %for.body
     51 
     52 for.end:                                          ; preds = %for.body, %entry
     53   ret void
     54 }
     55 
     56 ;CHECK-LABEL: @log_f32(
     57 ;CHECK: vlogf{{.*}}<4 x float>
     58 ;CHECK: ret void
     59 declare float @logf(float) nounwind readnone
     60 define void @log_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
     61 entry:
     62   %cmp6 = icmp sgt i32 %n, 0
     63   br i1 %cmp6, label %for.body, label %for.end
     64 
     65 for.body:                                         ; preds = %entry, %for.body
     66   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
     67   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
     68   %0 = load float, float* %arrayidx, align 4
     69   %call = tail call float @logf(float %0) nounwind readnone
     70   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
     71   store float %call, float* %arrayidx2, align 4
     72   %indvars.iv.next = add i64 %indvars.iv, 1
     73   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
     74   %exitcond = icmp eq i32 %lftr.wideiv, %n
     75   br i1 %exitcond, label %for.end, label %for.body
     76 
     77 for.end:                                          ; preds = %for.body, %entry
     78   ret void
     79 }
     80 
     81 ; For abs instruction we'll generate vector intrinsic, as it's cheaper than a lib call.
     82 ;CHECK-LABEL: @fabs_f32(
     83 ;CHECK: fabs{{.*}}<4 x float>
     84 ;CHECK: ret void
     85 declare float @fabsf(float) nounwind readnone
     86 define void @fabs_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
     87 entry:
     88   %cmp6 = icmp sgt i32 %n, 0
     89   br i1 %cmp6, label %for.body, label %for.end
     90 
     91 for.body:                                         ; preds = %entry, %for.body
     92   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
     93   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
     94   %0 = load float, float* %arrayidx, align 4
     95   %call = tail call float @fabsf(float %0) nounwind readnone
     96   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
     97   store float %call, float* %arrayidx2, align 4
     98   %indvars.iv.next = add i64 %indvars.iv, 1
     99   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    100   %exitcond = icmp eq i32 %lftr.wideiv, %n
    101   br i1 %exitcond, label %for.end, label %for.body
    102 
    103 for.end:                                          ; preds = %for.body, %entry
    104   ret void
    105 }
    106 
    107 ; Test that we can vectorize an intrinsic into a vector call.
    108 ;CHECK-LABEL: @exp_f32_intrin(
    109 ;CHECK: vexpf{{.*}}<4 x float>
    110 ;CHECK: ret void
    111 declare float @llvm.exp.f32(float) nounwind readnone
    112 define void @exp_f32_intrin(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    113 entry:
    114   %cmp6 = icmp sgt i32 %n, 0
    115   br i1 %cmp6, label %for.body, label %for.end
    116 
    117 for.body:                                         ; preds = %entry, %for.body
    118   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    119   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    120   %0 = load float, float* %arrayidx, align 4
    121   %call = tail call float @llvm.exp.f32(float %0) nounwind readnone
    122   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    123   store float %call, float* %arrayidx2, align 4
    124   %indvars.iv.next = add i64 %indvars.iv, 1
    125   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    126   %exitcond = icmp eq i32 %lftr.wideiv, %n
    127   br i1 %exitcond, label %for.end, label %for.body
    128 
    129 for.end:                                          ; preds = %for.body, %entry
    130   ret void
    131 }
    132 
    133 ; Test that we don't vectorize arbitrary functions.
    134 ;CHECK-LABEL: @foo_f32(
    135 ;CHECK-NOT: foo{{.*}}<4 x float>
    136 ;CHECK: ret void
    137 declare float @foo(float) nounwind readnone
    138 define void @foo_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    139 entry:
    140   %cmp6 = icmp sgt i32 %n, 0
    141   br i1 %cmp6, label %for.body, label %for.end
    142 
    143 for.body:                                         ; preds = %entry, %for.body
    144   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    145   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    146   %0 = load float, float* %arrayidx, align 4
    147   %call = tail call float @foo(float %0) nounwind readnone
    148   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    149   store float %call, float* %arrayidx2, align 4
    150   %indvars.iv.next = add i64 %indvars.iv, 1
    151   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    152   %exitcond = icmp eq i32 %lftr.wideiv, %n
    153   br i1 %exitcond, label %for.end, label %for.body
    154 
    155 for.end:                                          ; preds = %for.body, %entry
    156   ret void
    157 }
    158 
    159 ; Test that we don't vectorize calls with nobuiltin attribute.
    160 ;CHECK-LABEL: @sqrt_f32_nobuiltin(
    161 ;CHECK-NOT: vsqrtf{{.*}}<4 x float>
    162 ;CHECK: ret void
    163 define void @sqrt_f32_nobuiltin(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    164 entry:
    165   %cmp6 = icmp sgt i32 %n, 0
    166   br i1 %cmp6, label %for.body, label %for.end
    167 
    168 for.body:                                         ; preds = %entry, %for.body
    169   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    170   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    171   %0 = load float, float* %arrayidx, align 4
    172   %call = tail call float @sqrtf(float %0) nounwind readnone nobuiltin
    173   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    174   store float %call, float* %arrayidx2, align 4
    175   %indvars.iv.next = add i64 %indvars.iv, 1
    176   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    177   %exitcond = icmp eq i32 %lftr.wideiv, %n
    178   br i1 %exitcond, label %for.end, label %for.body
    179 
    180 for.end:                                          ; preds = %for.body, %entry
    181   ret void
    182 }
    183 
    184 ;CHECK-LABEL: @ceil_f32(
    185 ;CHECK: vceilf{{.*}}<4 x float>
    186 ;CHECK: ret void
    187 declare float @ceilf(float) nounwind readnone
    188 define void @ceil_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    189 entry:
    190   %cmp6 = icmp sgt i32 %n, 0
    191   br i1 %cmp6, label %for.body, label %for.end
    192 
    193 for.body:                                         ; preds = %entry, %for.body
    194   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    195   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    196   %0 = load float, float* %arrayidx, align 4
    197   %call = tail call float @ceilf(float %0) nounwind readnone
    198   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    199   store float %call, float* %arrayidx2, align 4
    200   %indvars.iv.next = add i64 %indvars.iv, 1
    201   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    202   %exitcond = icmp eq i32 %lftr.wideiv, %n
    203   br i1 %exitcond, label %for.end, label %for.body
    204 
    205 for.end:                                          ; preds = %for.body, %entry
    206   ret void
    207 }
    208 
    209 ;CHECK-LABEL: @floor_f32(
    210 ;CHECK: vfloorf{{.*}}<4 x float>
    211 ;CHECK: ret void
    212 declare float @floorf(float) nounwind readnone
    213 define void @floor_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    214 entry:
    215   %cmp6 = icmp sgt i32 %n, 0
    216   br i1 %cmp6, label %for.body, label %for.end
    217 
    218 for.body:                                         ; preds = %entry, %for.body
    219   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    220   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    221   %0 = load float, float* %arrayidx, align 4
    222   %call = tail call float @floorf(float %0) nounwind readnone
    223   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    224   store float %call, float* %arrayidx2, align 4
    225   %indvars.iv.next = add i64 %indvars.iv, 1
    226   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    227   %exitcond = icmp eq i32 %lftr.wideiv, %n
    228   br i1 %exitcond, label %for.end, label %for.body
    229 
    230 for.end:                                          ; preds = %for.body, %entry
    231   ret void
    232 }
    233 
    234 ;CHECK-LABEL: @expm1_f32(
    235 ;CHECK: vexpm1f{{.*}}<4 x float>
    236 ;CHECK: ret void
    237 declare float @expm1f(float) nounwind readnone
    238 define void @expm1_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    239 entry:
    240   %cmp6 = icmp sgt i32 %n, 0
    241   br i1 %cmp6, label %for.body, label %for.end
    242 
    243 for.body:                                         ; preds = %entry, %for.body
    244   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    245   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    246   %0 = load float, float* %arrayidx, align 4
    247   %call = tail call float @expm1f(float %0) nounwind readnone
    248   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    249   store float %call, float* %arrayidx2, align 4
    250   %indvars.iv.next = add i64 %indvars.iv, 1
    251   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    252   %exitcond = icmp eq i32 %lftr.wideiv, %n
    253   br i1 %exitcond, label %for.end, label %for.body
    254 
    255 for.end:                                          ; preds = %for.body, %entry
    256   ret void
    257 }
    258 
    259 ;CHECK-LABEL: @log1p_f32(
    260 ;CHECK: vlog1pf{{.*}}<4 x float>
    261 ;CHECK: ret void
    262 declare float @log1pf(float) nounwind readnone
    263 define void @log1p_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    264 entry:
    265   %cmp6 = icmp sgt i32 %n, 0
    266   br i1 %cmp6, label %for.body, label %for.end
    267 
    268 for.body:                                         ; preds = %entry, %for.body
    269   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    270   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    271   %0 = load float, float* %arrayidx, align 4
    272   %call = tail call float @log1pf(float %0) nounwind readnone
    273   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    274   store float %call, float* %arrayidx2, align 4
    275   %indvars.iv.next = add i64 %indvars.iv, 1
    276   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    277   %exitcond = icmp eq i32 %lftr.wideiv, %n
    278   br i1 %exitcond, label %for.end, label %for.body
    279 
    280 for.end:                                          ; preds = %for.body, %entry
    281   ret void
    282 }
    283 
    284 ;CHECK-LABEL: @log10_f32(
    285 ;CHECK: vlog10f{{.*}}<4 x float>
    286 ;CHECK: ret void
    287 declare float @log10f(float) nounwind readnone
    288 define void @log10_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    289 entry:
    290   %cmp6 = icmp sgt i32 %n, 0
    291   br i1 %cmp6, label %for.body, label %for.end
    292 
    293 for.body:                                         ; preds = %entry, %for.body
    294   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    295   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    296   %0 = load float, float* %arrayidx, align 4
    297   %call = tail call float @log10f(float %0) nounwind readnone
    298   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    299   store float %call, float* %arrayidx2, align 4
    300   %indvars.iv.next = add i64 %indvars.iv, 1
    301   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    302   %exitcond = icmp eq i32 %lftr.wideiv, %n
    303   br i1 %exitcond, label %for.end, label %for.body
    304 
    305 for.end:                                          ; preds = %for.body, %entry
    306   ret void
    307 }
    308 
    309 ;CHECK-LABEL: @logb_f32(
    310 ;CHECK: vlogbf{{.*}}<4 x float>
    311 ;CHECK: ret void
    312 declare float @logbf(float) nounwind readnone
    313 define void @logb_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    314 entry:
    315   %cmp6 = icmp sgt i32 %n, 0
    316   br i1 %cmp6, label %for.body, label %for.end
    317 
    318 for.body:                                         ; preds = %entry, %for.body
    319   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    320   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    321   %0 = load float, float* %arrayidx, align 4
    322   %call = tail call float @logbf(float %0) nounwind readnone
    323   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    324   store float %call, float* %arrayidx2, align 4
    325   %indvars.iv.next = add i64 %indvars.iv, 1
    326   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    327   %exitcond = icmp eq i32 %lftr.wideiv, %n
    328   br i1 %exitcond, label %for.end, label %for.body
    329 
    330 for.end:                                          ; preds = %for.body, %entry
    331   ret void
    332 }
    333 
    334 ;CHECK-LABEL: @sin_f32(
    335 ;CHECK: vsinf{{.*}}<4 x float>
    336 ;CHECK: ret void
    337 declare float @sinf(float) nounwind readnone
    338 define void @sin_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    339 entry:
    340   %cmp6 = icmp sgt i32 %n, 0
    341   br i1 %cmp6, label %for.body, label %for.end
    342 
    343 for.body:                                         ; preds = %entry, %for.body
    344   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    345   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    346   %0 = load float, float* %arrayidx, align 4
    347   %call = tail call float @sinf(float %0) nounwind readnone
    348   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    349   store float %call, float* %arrayidx2, align 4
    350   %indvars.iv.next = add i64 %indvars.iv, 1
    351   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    352   %exitcond = icmp eq i32 %lftr.wideiv, %n
    353   br i1 %exitcond, label %for.end, label %for.body
    354 
    355 for.end:                                          ; preds = %for.body, %entry
    356   ret void
    357 }
    358 
    359 ;CHECK-LABEL: @cos_f32(
    360 ;CHECK: vcosf{{.*}}<4 x float>
    361 ;CHECK: ret void
    362 declare float @cosf(float) nounwind readnone
    363 define void @cos_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    364 entry:
    365   %cmp6 = icmp sgt i32 %n, 0
    366   br i1 %cmp6, label %for.body, label %for.end
    367 
    368 for.body:                                         ; preds = %entry, %for.body
    369   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    370   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    371   %0 = load float, float* %arrayidx, align 4
    372   %call = tail call float @cosf(float %0) nounwind readnone
    373   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    374   store float %call, float* %arrayidx2, align 4
    375   %indvars.iv.next = add i64 %indvars.iv, 1
    376   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    377   %exitcond = icmp eq i32 %lftr.wideiv, %n
    378   br i1 %exitcond, label %for.end, label %for.body
    379 
    380 for.end:                                          ; preds = %for.body, %entry
    381   ret void
    382 }
    383 
    384 ;CHECK-LABEL: @tan_f32(
    385 ;CHECK: vtanf{{.*}}<4 x float>
    386 ;CHECK: ret void
    387 declare float @tanf(float) nounwind readnone
    388 define void @tan_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    389 entry:
    390   %cmp6 = icmp sgt i32 %n, 0
    391   br i1 %cmp6, label %for.body, label %for.end
    392 
    393 for.body:                                         ; preds = %entry, %for.body
    394   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    395   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    396   %0 = load float, float* %arrayidx, align 4
    397   %call = tail call float @tanf(float %0) nounwind readnone
    398   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    399   store float %call, float* %arrayidx2, align 4
    400   %indvars.iv.next = add i64 %indvars.iv, 1
    401   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    402   %exitcond = icmp eq i32 %lftr.wideiv, %n
    403   br i1 %exitcond, label %for.end, label %for.body
    404 
    405 for.end:                                          ; preds = %for.body, %entry
    406   ret void
    407 }
    408 
    409 ;CHECK-LABEL: @asin_f32(
    410 ;CHECK: vasinf{{.*}}<4 x float>
    411 ;CHECK: ret void
    412 declare float @asinf(float) nounwind readnone
    413 define void @asin_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    414 entry:
    415   %cmp6 = icmp sgt i32 %n, 0
    416   br i1 %cmp6, label %for.body, label %for.end
    417 
    418 for.body:                                         ; preds = %entry, %for.body
    419   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    420   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    421   %0 = load float, float* %arrayidx, align 4
    422   %call = tail call float @asinf(float %0) nounwind readnone
    423   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    424   store float %call, float* %arrayidx2, align 4
    425   %indvars.iv.next = add i64 %indvars.iv, 1
    426   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    427   %exitcond = icmp eq i32 %lftr.wideiv, %n
    428   br i1 %exitcond, label %for.end, label %for.body
    429 
    430 for.end:                                          ; preds = %for.body, %entry
    431   ret void
    432 }
    433 
    434 ;CHECK-LABEL: @acos_f32(
    435 ;CHECK: vacosf{{.*}}<4 x float>
    436 ;CHECK: ret void
    437 declare float @acosf(float) nounwind readnone
    438 define void @acos_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    439 entry:
    440   %cmp6 = icmp sgt i32 %n, 0
    441   br i1 %cmp6, label %for.body, label %for.end
    442 
    443 for.body:                                         ; preds = %entry, %for.body
    444   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    445   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    446   %0 = load float, float* %arrayidx, align 4
    447   %call = tail call float @acosf(float %0) nounwind readnone
    448   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    449   store float %call, float* %arrayidx2, align 4
    450   %indvars.iv.next = add i64 %indvars.iv, 1
    451   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    452   %exitcond = icmp eq i32 %lftr.wideiv, %n
    453   br i1 %exitcond, label %for.end, label %for.body
    454 
    455 for.end:                                          ; preds = %for.body, %entry
    456   ret void
    457 }
    458 
    459 ;CHECK-LABEL: @atan_f32(
    460 ;CHECK: vatanf{{.*}}<4 x float>
    461 ;CHECK: ret void
    462 declare float @atanf(float) nounwind readnone
    463 define void @atan_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    464 entry:
    465   %cmp6 = icmp sgt i32 %n, 0
    466   br i1 %cmp6, label %for.body, label %for.end
    467 
    468 for.body:                                         ; preds = %entry, %for.body
    469   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    470   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    471   %0 = load float, float* %arrayidx, align 4
    472   %call = tail call float @atanf(float %0) nounwind readnone
    473   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    474   store float %call, float* %arrayidx2, align 4
    475   %indvars.iv.next = add i64 %indvars.iv, 1
    476   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    477   %exitcond = icmp eq i32 %lftr.wideiv, %n
    478   br i1 %exitcond, label %for.end, label %for.body
    479 
    480 for.end:                                          ; preds = %for.body, %entry
    481   ret void
    482 }
    483 
    484 ;CHECK-LABEL: @sinh_f32(
    485 ;CHECK: vsinhf{{.*}}<4 x float>
    486 ;CHECK: ret void
    487 declare float @sinhf(float) nounwind readnone
    488 define void @sinh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    489 entry:
    490   %cmp6 = icmp sgt i32 %n, 0
    491   br i1 %cmp6, label %for.body, label %for.end
    492 
    493 for.body:                                         ; preds = %entry, %for.body
    494   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    495   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    496   %0 = load float, float* %arrayidx, align 4
    497   %call = tail call float @sinhf(float %0) nounwind readnone
    498   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    499   store float %call, float* %arrayidx2, align 4
    500   %indvars.iv.next = add i64 %indvars.iv, 1
    501   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    502   %exitcond = icmp eq i32 %lftr.wideiv, %n
    503   br i1 %exitcond, label %for.end, label %for.body
    504 
    505 for.end:                                          ; preds = %for.body, %entry
    506   ret void
    507 }
    508 
    509 ;CHECK-LABEL: @cosh_f32(
    510 ;CHECK: vcoshf{{.*}}<4 x float>
    511 ;CHECK: ret void
    512 declare float @coshf(float) nounwind readnone
    513 define void @cosh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    514 entry:
    515   %cmp6 = icmp sgt i32 %n, 0
    516   br i1 %cmp6, label %for.body, label %for.end
    517 
    518 for.body:                                         ; preds = %entry, %for.body
    519   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    520   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    521   %0 = load float, float* %arrayidx, align 4
    522   %call = tail call float @coshf(float %0) nounwind readnone
    523   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    524   store float %call, float* %arrayidx2, align 4
    525   %indvars.iv.next = add i64 %indvars.iv, 1
    526   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    527   %exitcond = icmp eq i32 %lftr.wideiv, %n
    528   br i1 %exitcond, label %for.end, label %for.body
    529 
    530 for.end:                                          ; preds = %for.body, %entry
    531   ret void
    532 }
    533 
    534 ;CHECK-LABEL: @tanh_f32(
    535 ;CHECK: vtanhf{{.*}}<4 x float>
    536 ;CHECK: ret void
    537 declare float @tanhf(float) nounwind readnone
    538 define void @tanh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    539 entry:
    540   %cmp6 = icmp sgt i32 %n, 0
    541   br i1 %cmp6, label %for.body, label %for.end
    542 
    543 for.body:                                         ; preds = %entry, %for.body
    544   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    545   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    546   %0 = load float, float* %arrayidx, align 4
    547   %call = tail call float @tanhf(float %0) nounwind readnone
    548   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    549   store float %call, float* %arrayidx2, align 4
    550   %indvars.iv.next = add i64 %indvars.iv, 1
    551   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    552   %exitcond = icmp eq i32 %lftr.wideiv, %n
    553   br i1 %exitcond, label %for.end, label %for.body
    554 
    555 for.end:                                          ; preds = %for.body, %entry
    556   ret void
    557 }
    558 
    559 ;CHECK-LABEL: @asinh_f32(
    560 ;CHECK: vasinhf{{.*}}<4 x float>
    561 ;CHECK: ret void
    562 declare float @asinhf(float) nounwind readnone
    563 define void @asinh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    564 entry:
    565   %cmp6 = icmp sgt i32 %n, 0
    566   br i1 %cmp6, label %for.body, label %for.end
    567 
    568 for.body:                                         ; preds = %entry, %for.body
    569   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    570   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    571   %0 = load float, float* %arrayidx, align 4
    572   %call = tail call float @asinhf(float %0) nounwind readnone
    573   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    574   store float %call, float* %arrayidx2, align 4
    575   %indvars.iv.next = add i64 %indvars.iv, 1
    576   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    577   %exitcond = icmp eq i32 %lftr.wideiv, %n
    578   br i1 %exitcond, label %for.end, label %for.body
    579 
    580 for.end:                                          ; preds = %for.body, %entry
    581   ret void
    582 }
    583 
    584 ;CHECK-LABEL: @acosh_f32(
    585 ;CHECK: vacoshf{{.*}}<4 x float>
    586 ;CHECK: ret void
    587 declare float @acoshf(float) nounwind readnone
    588 define void @acosh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    589 entry:
    590   %cmp6 = icmp sgt i32 %n, 0
    591   br i1 %cmp6, label %for.body, label %for.end
    592 
    593 for.body:                                         ; preds = %entry, %for.body
    594   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    595   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    596   %0 = load float, float* %arrayidx, align 4
    597   %call = tail call float @acoshf(float %0) nounwind readnone
    598   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    599   store float %call, float* %arrayidx2, align 4
    600   %indvars.iv.next = add i64 %indvars.iv, 1
    601   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    602   %exitcond = icmp eq i32 %lftr.wideiv, %n
    603   br i1 %exitcond, label %for.end, label %for.body
    604 
    605 for.end:                                          ; preds = %for.body, %entry
    606   ret void
    607 }
    608 
    609 ;CHECK-LABEL: @atanh_f32(
    610 ;CHECK: vatanhf{{.*}}<4 x float>
    611 ;CHECK: ret void
    612 declare float @atanhf(float) nounwind readnone
    613 define void @atanh_f32(i32 %n, float* noalias %y, float* noalias %x) nounwind uwtable {
    614 entry:
    615   %cmp6 = icmp sgt i32 %n, 0
    616   br i1 %cmp6, label %for.body, label %for.end
    617 
    618 for.body:                                         ; preds = %entry, %for.body
    619   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
    620   %arrayidx = getelementptr inbounds float, float* %y, i64 %indvars.iv
    621   %0 = load float, float* %arrayidx, align 4
    622   %call = tail call float @atanhf(float %0) nounwind readnone
    623   %arrayidx2 = getelementptr inbounds float, float* %x, i64 %indvars.iv
    624   store float %call, float* %arrayidx2, align 4
    625   %indvars.iv.next = add i64 %indvars.iv, 1
    626   %lftr.wideiv = trunc i64 %indvars.iv.next to i32
    627   %exitcond = icmp eq i32 %lftr.wideiv, %n
    628   br i1 %exitcond, label %for.end, label %for.body
    629 
    630 for.end:                                          ; preds = %for.body, %entry
    631   ret void
    632 }
    633