1f31811f2SFangrui Song; RUN: opt -S -basic-aa -loop-vectorize < %s | FileCheck %s
2cee313d2SEric Christophertarget datalayout = "E-m:e-i64:64-n32:64"
3cee313d2SEric Christophertarget triple = "powerpc64-unknown-linux-gnu"
4cee313d2SEric Christopher
5cee313d2SEric Christopher; Function Attrs: nounwind
6cee313d2SEric Christopherdefine void @foo(double* noalias nocapture %a, double* noalias nocapture readonly %b) #0 {
7cee313d2SEric Christopherentry:
8cee313d2SEric Christopher  br label %for.body
9cee313d2SEric Christopher
10*872f7000SDávid Bolvanský; CHECK-LABEL: @foo
11*872f7000SDávid Bolvanský; CHECK: <2 x double>
12cee313d2SEric Christopher
13cee313d2SEric Christopherfor.cond.cleanup:                                 ; preds = %for.body
14cee313d2SEric Christopher  ret void
15cee313d2SEric Christopher
16cee313d2SEric Christopherfor.body:                                         ; preds = %for.body, %entry
17cee313d2SEric Christopher  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
18cee313d2SEric Christopher  %0 = shl nsw i64 %indvars.iv, 1
19cee313d2SEric Christopher  %odd.idx = add nsw i64 %0, 1
20cee313d2SEric Christopher
21cee313d2SEric Christopher  %arrayidx = getelementptr inbounds double, double* %b, i64 %0
22cee313d2SEric Christopher  %arrayidx.odd = getelementptr inbounds double, double* %b, i64 %odd.idx
23cee313d2SEric Christopher
24cee313d2SEric Christopher  %1 = load double, double* %arrayidx, align 8
25cee313d2SEric Christopher  %2 = load double, double* %arrayidx.odd, align 8
26cee313d2SEric Christopher
27cee313d2SEric Christopher  %add = fadd double %1, %2
28cee313d2SEric Christopher  %arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv
29cee313d2SEric Christopher  store double %add, double* %arrayidx2, align 8
30cee313d2SEric Christopher  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
31cee313d2SEric Christopher  %exitcond = icmp eq i64 %indvars.iv.next, 1600
32cee313d2SEric Christopher  br i1 %exitcond, label %for.cond.cleanup, label %for.body
33cee313d2SEric Christopher}
34cee313d2SEric Christopher
35cee313d2SEric Christopherattributes #0 = { nounwind "target-cpu"="pwr8" }
36cee313d2SEric Christopher
37