Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/PowerPC/pip-inner.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
1 ; RUN: llc < %s | FileCheck %s | |
2 target datalayout = "E-m:e-i64:64-n32:64" | |
3 target triple = "powerpc64-unknown-linux-gnu" | |
4 | |
5 ; Function Attrs: nounwind | |
6 define void @foo(double* %x, double* nocapture readonly %y) #0 { | |
7 entry: | |
8 br label %for.cond1.preheader | |
9 | |
10 for.cond1.preheader: ; preds = %for.end, %entry | |
11 %i.015 = phi i32 [ 0, %entry ], [ %inc7, %for.end ] | |
12 br label %for.body3 | |
13 | |
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, double* %y, i64 %indvars.iv | |
17 %0 = load double, double* %arrayidx, align 8 | |
18 %add = fadd double %0, 1.000000e+00 | |
19 %arrayidx5 = getelementptr inbounds double, double* %x, i64 %indvars.iv | |
20 store double %add, double* %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 | |
24 | |
25 for.end: ; preds = %for.body3 | |
26 tail call void @bar(double* %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 | |
30 | |
31 for.end8: ; preds = %for.end | |
32 ret void | |
33 | |
34 ; CHECK-LABEL: @foo | |
35 | |
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: bdnz | |
40 | |
41 ; CHECK: bl bar | |
42 ; CHECK-NEXT: nop | |
43 | |
44 ; CHECK: blr | |
45 } | |
46 | |
47 declare void @bar(double*) #1 | |
48 | |
49 attributes #0 = { nounwind "target-cpu"="a2" } | |
50 attributes #1 = { "target-cpu"="a2" } | |
51 attributes #2 = { nounwind } | |
52 |