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 %x, ptr nocapture readonly %y) #0 {
8 br label %for.cond1.preheader
10 for.cond1.preheader: ; preds = %for.end, %entry
11 %i.015 = phi i32 [ 0, %entry ], [ %inc7, %for.end ]
14 for.body3: ; preds = %for.body3, %for.cond1.preheader
15 %indvars.iv = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next, %for.body3 ]
16 %arrayidx = getelementptr inbounds double, ptr %y, i64 %indvars.iv
17 %0 = load double, ptr %arrayidx, align 8
18 %add = fadd double %0, 1.000000e+00
19 %arrayidx5 = getelementptr inbounds double, ptr %x, i64 %indvars.iv
20 store double %add, ptr %arrayidx5, align 8
21 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
22 %exitcond = icmp eq i64 %indvars.iv.next, 16000
23 br i1 %exitcond, label %for.end, label %for.body3
25 for.end: ; preds = %for.body3
26 tail call void @bar(ptr %x) #2
27 %inc7 = add nuw nsw i32 %i.015, 1
28 %exitcond16 = icmp eq i32 %inc7, 1000
29 br i1 %exitcond16, label %for.end8, label %for.cond1.preheader
31 for.end8: ; preds = %for.end
36 ; CHECK: lfdu [[REG1:[0-9]+]], 8({{[0-9]+}})
37 ; CHECK: fadd [[REG2:[0-9]+]], [[REG1]], {{[0-9]+}}
38 ; CHECK: stfdu [[REG2]], 8({{[0-9]+}})
47 declare void @bar(ptr) #1
49 attributes #0 = { nounwind "target-cpu"="a2" }
50 attributes #1 = { "target-cpu"="a2" }
51 attributes #2 = { nounwind }