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