brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 304c6b8 Raw
45 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 nocapture %x, ptr nocapture readonly %y) #0 {7entry:8  br label %for.body9 10for.body:                                         ; preds = %for.body, %entry11  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]12  %arrayidx = getelementptr inbounds double, ptr %y, i64 %indvars.iv13  %0 = load double, ptr %arrayidx, align 814  %add = fadd double %0, 1.000000e+0015  %arrayidx2 = getelementptr inbounds double, ptr %x, i64 %indvars.iv16  store double %add, ptr %arrayidx2, align 817  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 118  %exitcond19 = icmp eq i64 %indvars.iv.next, 160019  br i1 %exitcond19, label %for.body7, label %for.body20 21; CHECK-LABEL: @foo22 23; CHECK-DAG: lfdu [[REG1:[0-9]+]], 8({{[0-9]+}})24; CHECK-DAG: fadd [[REG2:[0-9]+]], [[REG1]], 025; CHECK-DAG: stfdu [[REG2]], 8({{[0-9]+}})26; CHECK: bdnz27 28; CHECK: blr29 30for.cond.cleanup6:                                ; preds = %for.body731  ret void32 33for.body7:                                        ; preds = %for.body, %for.body734  %i3.017 = phi i32 [ %inc9, %for.body7 ], [ 0, %for.body ]35  tail call void @bar() #036  %inc9 = add nuw nsw i32 %i3.017, 137  %exitcond = icmp eq i32 %inc9, 102438  br i1 %exitcond, label %for.cond.cleanup6, label %for.body739}40 41declare void @bar(...) 42 43attributes #0 = { nounwind }44 45