1 ; RUN: llc -verify-machineinstrs < %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(ptr nocapture %x, ptr nocapture readonly %y) #0 {
10 for.body: ; preds = %for.body, %entry
11 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
12 %arrayidx = getelementptr inbounds double, ptr %y, i64 %indvars.iv
13 %0 = load double, ptr %arrayidx, align 8
14 %add = fadd double %0, 1.000000e+00
15 %arrayidx2 = getelementptr inbounds double, ptr %x, i64 %indvars.iv
16 store double %add, ptr %arrayidx2, align 8
17 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
18 %exitcond19 = icmp eq i64 %indvars.iv.next, 1600
19 br i1 %exitcond19, label %for.body7, label %for.body
23 ; CHECK-DAG: lfdu [[REG1:[0-9]+]], 8({{[0-9]+}})
24 ; CHECK-DAG: fadd [[REG2:[0-9]+]], [[REG1]], 0
25 ; CHECK-DAG: stfdu [[REG2]], 8({{[0-9]+}})
30 for.cond.cleanup6: ; preds = %for.body7
33 for.body7: ; preds = %for.body, %for.body7
34 %i3.017 = phi i32 [ %inc9, %for.body7 ], [ 0, %for.body ]
35 tail call void @bar() #0
36 %inc9 = add nuw nsw i32 %i3.017, 1
37 %exitcond = icmp eq i32 %inc9, 1024
38 br i1 %exitcond, label %for.cond.cleanup6, label %for.body7
41 declare void @bar(...)
43 attributes #0 = { nounwind }