Home | History | Annotate | Download | only in X86
      1 ; RUN: opt < %s  -loop-vectorize -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx -S -debug-only=loop-vectorize 2>&1 | FileCheck %s
      2 ; REQUIRES: asserts
      3 
      4 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"
      5 target triple = "x86_64-apple-macosx10.8.0"
      6 
      7 
      8 ; CHECK: cost of 20 for VF 2 For instruction:   %conv = uitofp i64 %tmp to double
      9 ; CHECK: cost of 40 for VF 4 For instruction:   %conv = uitofp i64 %tmp to double
     10 define void @uint64_to_double_cost(i64* noalias nocapture %a, double* noalias nocapture readonly %b) nounwind {
     11 entry:
     12   br label %for.body
     13 for.body:
     14   %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
     15   %arrayidx = getelementptr inbounds i64, i64* %a, i64 %indvars.iv
     16   %tmp = load i64, i64* %arrayidx, align 4
     17   %conv = uitofp i64 %tmp to double
     18   %arrayidx2 = getelementptr inbounds double, double* %b, i64 %indvars.iv
     19   store double %conv, double* %arrayidx2, align 4
     20   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
     21   %exitcond = icmp eq i64 %indvars.iv.next, 256
     22   br i1 %exitcond, label %for.end, label %for.body
     23 
     24 for.end:
     25   ret void
     26 }
     27