1 ; RUN: llc -march=hexagon -enable-pipeliner < %s -pipeliner-experimental-cg=true | FileCheck %s
3 ; Test that we generate the correct value for a Phi in the epilog
4 ; that is for a value defined two stages earlier. An extra copy in the
5 ; epilog means the schedule is incorrect.
8 ; CHECK-NOT: r{{[0-9]+}} = r{{[0-9]+}}
10 ; Function Attrs: nounwind
11 define void @f0(i32 %a0, i32* %a1, [1000 x i32]* %a2, i32* %a3, i32* %a4) #0 {
15 b1: ; preds = %b1, %b0
16 %v0 = phi i32 [ %v8, %b1 ], [ 1, %b0 ]
17 %v1 = load i32, i32* %a3, align 4, !tbaa !0
18 %v2 = getelementptr inbounds i32, i32* %a1, i32 %v0
19 %v3 = load i32, i32* %v2, align 4, !tbaa !0
20 %v4 = load i32, i32* %a4, align 4, !tbaa !0
21 %v5 = mul nsw i32 %v4, %v3
22 %v6 = add nsw i32 %v5, %v1
23 %v7 = getelementptr inbounds [1000 x i32], [1000 x i32]* %a2, i32 %v0, i32 0
24 store i32 %v6, i32* %v7, align 4, !tbaa !0
25 %v8 = add nsw i32 %v0, 1
26 %v9 = icmp eq i32 %v8, %a0
27 br i1 %v9, label %b2, label %b1
33 attributes #0 = { nounwind "target-cpu"="hexagonv60" }
36 !1 = !{!"long", !2, i64 0}
37 !2 = !{!"omnipotent char", !3, i64 0}
38 !3 = !{!"Simple C/C++ TBAA"}