brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · e10acf4 Raw
37 lines · plain
1; RUN: opt -S -passes=loop-vectorize < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5; Function Attrs: nounwind6define void @foo(ptr noalias nocapture %a, ptr noalias nocapture readonly %b) #0 {7entry:8  br label %for.body9 10; CHECK-LABEL: @foo11; CHECK: <2 x double>12 13for.cond.cleanup:                                 ; preds = %for.body14  ret void15 16for.body:                                         ; preds = %for.body, %entry17  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]18  %0 = shl nsw i64 %indvars.iv, 119  %odd.idx = add nsw i64 %0, 120 21  %arrayidx = getelementptr inbounds double, ptr %b, i64 %022  %arrayidx.odd = getelementptr inbounds double, ptr %b, i64 %odd.idx23 24  %1 = load double, ptr %arrayidx, align 825  %2 = load double, ptr %arrayidx.odd, align 826 27  %add = fadd double %1, %228  %arrayidx2 = getelementptr inbounds double, ptr %a, i64 %indvars.iv29  store double %add, ptr %arrayidx2, align 830  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 131  %exitcond = icmp eq i64 %indvars.iv.next, 160032  br i1 %exitcond, label %for.cond.cleanup, label %for.body33}34 35attributes #0 = { nounwind "target-cpu"="pwr8" }36 37