brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 9ca87e1 Raw
53 lines · plain
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5; Function Attrs: nounwind6define void @foo(ptr %x, ptr nocapture readonly %y) #0 {7entry:8  br label %for.cond1.preheader9 10for.cond1.preheader:                              ; preds = %for.end, %entry11  %i.015 = phi i32 [ 0, %entry ], [ %inc7, %for.end ]12  br label %for.body313 14for.body3:                                        ; preds = %for.body3, %for.cond1.preheader15  %indvars.iv = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next, %for.body3 ]16  %arrayidx = getelementptr inbounds double, ptr %y, i64 %indvars.iv17  %0 = load double, ptr %arrayidx, align 818  %add = fadd double %0, 1.000000e+0019  %arrayidx5 = getelementptr inbounds double, ptr %x, i64 %indvars.iv20  store double %add, ptr %arrayidx5, align 821  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 122  %exitcond = icmp eq i64 %indvars.iv.next, 1600023  br i1 %exitcond, label %for.end, label %for.body324 25for.end:                                          ; preds = %for.body326  tail call void @bar(ptr %x) #227  %inc7 = add nuw nsw i32 %i.015, 128  %exitcond16 = icmp eq i32 %inc7, 100029  br i1 %exitcond16, label %for.end8, label %for.cond1.preheader30 31for.end8:                                         ; preds = %for.end32  ret void33 34; CHECK-LABEL: @foo35 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]+}})39; CHECK: bdnz40 41; CHECK: bl bar42; CHECK-NEXT: nop43 44; CHECK: blr45}46 47declare void @bar(ptr) #148 49attributes #0 = { nounwind "target-cpu"="a2" }50attributes #1 = { "target-cpu"="a2" }51attributes #2 = { nounwind }52 53