brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 8661d86 Raw
28 lines · plain
1; RUN: opt < %s -passes=loop-vectorize -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx -S -debug-only=loop-vectorize 2>&1 | FileCheck %s2; REQUIRES: asserts3 4target 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"5target triple = "x86_64-apple-macosx10.8.0"6 7 8; CHECK: cost of 4 for VF 1 For instruction:   %conv = uitofp i64 %tmp to double9; CHECK: Cost of 5 for VF 2: WIDEN-CAST ir<%conv> = uitofp ir<%tmp> to double10; CHECK: Cost of 10 for VF 4: WIDEN-CAST ir<%conv> = uitofp ir<%tmp> to double11define void @uint64_to_double_cost(ptr noalias nocapture %a, ptr noalias nocapture readonly %b) nounwind {12entry:13  br label %for.body14for.body:15  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]16  %arrayidx = getelementptr inbounds i64, ptr %a, i64 %indvars.iv17  %tmp = load i64, ptr %arrayidx, align 418  %conv = uitofp i64 %tmp to double19  %arrayidx2 = getelementptr inbounds double, ptr %b, i64 %indvars.iv20  store double %conv, ptr %arrayidx2, align 421  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 122  %exitcond = icmp eq i64 %indvars.iv.next, 25623  br i1 %exitcond, label %for.end, label %for.body24 25for.end:26  ret void27}28