1 ; RUN: opt -S -basic-aa -loop-vectorize < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 ; Function Attrs: nounwind
6 define void @foo(double* noalias nocapture %a, double* noalias nocapture readonly %b) #0 {
13 for.cond.cleanup: ; preds = %for.body
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 %odd.idx = add nsw i64 %0, 1
21 %arrayidx = getelementptr inbounds double, double* %b, i64 %0
22 %arrayidx.odd = getelementptr inbounds double, double* %b, i64 %odd.idx
24 %1 = load double, double* %arrayidx, align 8
25 %2 = load double, double* %arrayidx.odd, align 8
27 %add = fadd double %1, %2
28 %arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv
29 store double %add, double* %arrayidx2, align 8
30 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
31 %exitcond = icmp eq i64 %indvars.iv.next, 1600
32 br i1 %exitcond, label %for.cond.cleanup, label %for.body
35 attributes #0 = { nounwind "target-cpu"="pwr8" }