Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: opt -S -basicaa -loop-vectorize < %s | FileCheck %s
      2 target datalayout = "E-m:e-i64:64-n32:64"
      3 target triple = "powerpc64-unknown-linux-gnu"
      4 
      5 ; Function Attrs: nounwind
      6 define void @foo(double* noalias nocapture %a, double* noalias nocapture readonly %b) #0 {
      7 entry:
      8   br label %for.body
      9 
     10 ; CHECK-LABEL: @foo
     11 ; CHECK: <2 x double>
     12 
     13 for.cond.cleanup:                                 ; preds = %for.body
     14   ret void
     15 
     16 for.body:                                         ; preds = %for.body, %entry
     17   %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
     18   %0 = shl nsw i64 %indvars.iv, 1
     19   %arrayidx = getelementptr inbounds double, double* %b, i64 %0
     20   %1 = load double, double* %arrayidx, align 8
     21   %add = fadd double %1, 1.000000e+00
     22   %arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv
     23   store double %add, double* %arrayidx2, align 8
     24   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
     25   %exitcond = icmp eq i64 %indvars.iv.next, 1600
     26   br i1 %exitcond, label %for.cond.cleanup, label %for.body
     27 }
     28 
     29 attributes #0 = { nounwind "target-cpu"="pwr8" }
     30 
     31