150
|
1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree-normalize-phi=true -polly-optree -analyze < %s | FileCheck %s -match-full-lines
|
|
2
|
|
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
4
|
|
5 define internal fastcc void @kernel_jacobi_1d(double* noalias nocapture %A, double* noalias nocapture %B) unnamed_addr #0 {
|
|
6 entry:
|
|
7 br label %entry.split
|
|
8
|
|
9 entry.split: ; preds = %entry
|
|
10 %arrayidx6.phi.trans.insert = getelementptr inbounds double, double* %A, i64 1
|
|
11 %arrayidx21.phi.trans.insert = getelementptr inbounds double, double* %B, i64 1
|
|
12 br label %for.body
|
|
13
|
|
14 for.body: ; preds = %for.inc33, %entry.split
|
|
15 %t.03 = phi i32 [ 0, %entry.split ], [ %inc34, %for.inc33 ]
|
|
16 %.pre = load double, double* %A, align 8, !tbaa !6
|
|
17 %.pre10 = load double, double* %arrayidx6.phi.trans.insert, align 8, !tbaa !6
|
|
18 br label %for.body3
|
|
19
|
|
20 for.body3: ; preds = %for.body3, %for.body
|
|
21 %0 = phi double [ %.pre10, %for.body ], [ %2, %for.body3 ]
|
|
22 %1 = phi double [ %.pre, %for.body ], [ %0, %for.body3 ]
|
|
23 %indvars.iv = phi i64 [ 1, %for.body ], [ %indvars.iv.next, %for.body3 ]
|
|
24 %add = fadd double %1, %0
|
|
25 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
|
|
26 %arrayidx9 = getelementptr inbounds double, double* %A, i64 %indvars.iv.next
|
|
27 %2 = load double, double* %arrayidx9, align 8, !tbaa !6
|
|
28 %add10 = fadd double %add, %2
|
|
29 %mul = fmul double %add10, 3.333300e-01
|
|
30 %arrayidx12 = getelementptr inbounds double, double* %B, i64 %indvars.iv
|
|
31 store double %mul, double* %arrayidx12, align 8, !tbaa !6
|
|
32 %exitcond = icmp eq i64 %indvars.iv.next, 3
|
|
33 br i1 %exitcond, label %for.end, label %for.body3
|
|
34
|
|
35 for.end: ; preds = %for.body3
|
|
36 %.pre11 = load double, double* %B, align 8, !tbaa !6
|
|
37 %.pre12 = load double, double* %arrayidx21.phi.trans.insert, align 8, !tbaa !6
|
|
38 br label %for.inc33
|
|
39
|
|
40 for.inc33: ; preds = %for.body16
|
|
41 %inc34 = add nuw nsw i32 %t.03, 1
|
|
42 %exitcond9 = icmp eq i32 %inc34, 2
|
|
43 br i1 %exitcond9, label %for.end35, label %for.body
|
|
44
|
|
45 for.end35: ; preds = %for.inc33
|
|
46 ret void
|
|
47 }
|
|
48
|
|
49 attributes #0 = { noinline norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
50
|
|
51 !llvm.module.flags = !{!0}
|
|
52 !llvm.ident = !{!1}
|
|
53
|
|
54 !0 = !{i32 1, !"wchar_size", i32 4}
|
|
55 !1 = !{!"clang version 6.0.0 (llvm/trunk 312874)"}
|
|
56 !2 = !{!3, !3, i64 0}
|
|
57 !3 = !{!"any pointer", !4, i64 0}
|
|
58 !4 = !{!"omnipotent char", !5, i64 0}
|
|
59 !5 = !{!"Simple C/C++ TBAA"}
|
|
60 !6 = !{!7, !7, i64 0}
|
|
61 !7 = !{!"double", !4, i64 0}
|
|
62
|
|
63
|
|
64 ; CHECK: Statistics {
|
|
65 ; CHECK: Operand trees forwarded: 2
|
|
66 ; CHECK: Statements with forwarded operand trees: 1
|
|
67 ; CHECK: }
|
|
68
|
|
69 ; CHECK-NEXT: After statements {
|
|
70 ; CHECK-NEXT: Stmt_for_body
|
|
71 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
72 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef_A[0] };
|
|
73 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
74 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef_A[1] };
|
|
75 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
76 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef1__phi[] };
|
|
77 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
78 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef2__phi[] };
|
|
79 ; CHECK-NEXT: Instructions {
|
|
80 ; CHECK-NEXT: %.pre = load double, double* %A, align 8, !tbaa !2
|
|
81 ; CHECK-NEXT: %.pre10 = load double, double* %arrayidx6.phi.trans.insert, align 8, !tbaa !2
|
|
82 ; CHECK-NEXT: }
|
|
83 ; CHECK-NEXT: Stmt_for_body3
|
|
84 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
85 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef1__phi[] };
|
|
86 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
87 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef1__phi[] };
|
|
88 ; CHECK-NEXT: new: { Stmt_for_body3[i0, i1] -> MemRef_A[1 + i1] };
|
|
89 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
90 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef2__phi[] };
|
|
91 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
92 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef2__phi[] };
|
|
93 ; CHECK-NEXT: new: { Stmt_for_body3[i0, i1] -> MemRef_A[i1] };
|
|
94 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
95 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef_A[2 + i1] };
|
|
96 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
97 ; CHECK-NEXT: { Stmt_for_body3[i0, i1] -> MemRef_B[1 + i1] };
|
|
98 ; CHECK-NEXT: Instructions {
|
|
99 ; CHECK-NEXT: %0 = phi double [ %.pre10, %for.body ], [ %2, %for.body3 ]
|
|
100 ; CHECK-NEXT: %1 = phi double [ %.pre, %for.body ], [ %0, %for.body3 ]
|
|
101 ; CHECK-NEXT: %add = fadd double %1, %0
|
|
102 ; CHECK-NEXT: %2 = load double, double* %arrayidx9, align 8, !tbaa !2
|
|
103 ; CHECK-NEXT: %add10 = fadd double %add, %2
|
|
104 ; CHECK-NEXT: %mul = fmul double %add10, 3.333300e-01
|
|
105 ; CHECK-NEXT: store double %mul, double* %arrayidx12, align 8, !tbaa !2
|
|
106 ; CHECK-NEXT: %exitcond = icmp eq i64 %indvars.iv.next, 3
|
|
107 ; CHECK-NEXT: }
|
|
108 ; CHECK-NEXT: }
|