1 ; RUN: opt < %s -loop-vectorize -S | FileCheck %s
19 target datalayout = "e-m:e-i64:64-n32:64"
20 target triple = "powerpc64le-ibm-linux-gnu"
22 define void @test(double* nocapture readonly %arr, i32 signext %len) #0 {
24 %cmp4 = icmp sgt i32 %len, 0
25 br i1 %cmp4, label %for.body.lr.ph, label %for.end
27 for.body.lr.ph: ; preds = %entry
31 for.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
42 for.end.loopexit: ; preds = %for.body
43 %add.lcssa = phi double [ %add, %for.body ]
46 for.end: ; preds = %for.end.loopexit, %entry
47 %redx.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add.lcssa, %for.end.loopexit ]