1*cee313d2SEric Christopher; RUN: opt < %s -loop-vectorize -S | FileCheck %s 2*cee313d2SEric Christopher 3*cee313d2SEric Christopher; CHECK: vector.body: 4*cee313d2SEric Christopher; CHECK: fadd 5*cee313d2SEric Christopher; CHECK-NEXT: fadd 6*cee313d2SEric Christopher; CHECK-NEXT: fadd 7*cee313d2SEric Christopher; CHECK-NEXT: fadd 8*cee313d2SEric Christopher; CHECK-NEXT: fadd 9*cee313d2SEric Christopher; CHECK-NEXT: fadd 10*cee313d2SEric Christopher; CHECK-NEXT: fadd 11*cee313d2SEric Christopher; CHECK-NEXT: fadd 12*cee313d2SEric Christopher; CHECK-NEXT: fadd 13*cee313d2SEric Christopher; CHECK-NEXT: fadd 14*cee313d2SEric Christopher; CHECK-NEXT: fadd 15*cee313d2SEric Christopher; CHECK-NEXT: fadd 16*cee313d2SEric Christopher; CHECK-NOT: fadd 17*cee313d2SEric Christopher; CHECK: middle.block 18*cee313d2SEric Christopher 19*cee313d2SEric Christophertarget datalayout = "e-m:e-i64:64-n32:64" 20*cee313d2SEric Christophertarget triple = "powerpc64le-ibm-linux-gnu" 21*cee313d2SEric Christopher 22*cee313d2SEric Christopherdefine void @test(double* nocapture readonly %arr, i32 signext %len) #0 { 23*cee313d2SEric Christopherentry: 24*cee313d2SEric Christopher %cmp4 = icmp sgt i32 %len, 0 25*cee313d2SEric Christopher br i1 %cmp4, label %for.body.lr.ph, label %for.end 26*cee313d2SEric Christopher 27*cee313d2SEric Christopherfor.body.lr.ph: ; preds = %entry 28*cee313d2SEric Christopher %0 = add i32 %len, -1 29*cee313d2SEric Christopher br label %for.body 30*cee313d2SEric Christopher 31*cee313d2SEric Christopherfor.body: ; preds = %for.body, %for.body.lr.ph 32*cee313d2SEric Christopher %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] 33*cee313d2SEric Christopher %redx.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body ] 34*cee313d2SEric Christopher %arrayidx = getelementptr inbounds double, double* %arr, i64 %indvars.iv 35*cee313d2SEric Christopher %1 = load double, double* %arrayidx, align 8 36*cee313d2SEric Christopher %add = fadd fast double %1, %redx.05 37*cee313d2SEric Christopher %indvars.iv.next = add i64 %indvars.iv, 1 38*cee313d2SEric Christopher %lftr.wideiv = trunc i64 %indvars.iv to i32 39*cee313d2SEric Christopher %exitcond = icmp eq i32 %lftr.wideiv, %0 40*cee313d2SEric Christopher br i1 %exitcond, label %for.end.loopexit, label %for.body 41*cee313d2SEric Christopher 42*cee313d2SEric Christopherfor.end.loopexit: ; preds = %for.body 43*cee313d2SEric Christopher %add.lcssa = phi double [ %add, %for.body ] 44*cee313d2SEric Christopher br label %for.end 45*cee313d2SEric Christopher 46*cee313d2SEric Christopherfor.end: ; preds = %for.end.loopexit, %entry 47*cee313d2SEric Christopher %redx.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add.lcssa, %for.end.loopexit ] 48*cee313d2SEric Christopher ret void 49*cee313d2SEric Christopher} 50