1 ; RUN: llc -march=hexagon -fp-contract=fast -enable-pipeliner < %s
4 ; Pipelining can eliminate the need for a Phi if the loop carried use
5 ; is scheduled first. We need to rename register uses of the Phi
6 ; that may occur after the loop.
10 br i1 undef, label %b1, label %b12
13 %v0 = load float, float* undef, align 4
14 br i1 undef, label %b2, label %b5
17 br i1 undef, label %b3, label %b4
19 b3: ; preds = %b3, %b2
22 b4: ; preds = %b4, %b2
23 br i1 undef, label %b5, label %b4
25 b5: ; preds = %b4, %b1
26 br i1 undef, label %b6, label %b9
29 br i1 undef, label %b7, label %b8
31 b7: ; preds = %b7, %b6
34 b8: ; preds = %b8, %b6
35 %v1 = phi i32 [ %v7, %b8 ], [ 2, %b6 ]
36 %v2 = phi float [ %v6, %b8 ], [ undef, %b6 ]
37 %v3 = phi float [ %v2, %b8 ], [ undef, %b6 ]
38 %v4 = fmul float undef, %v2
39 %v5 = fsub float %v4, %v3
40 %v6 = fadd float %v5, undef
41 %v7 = add nsw i32 %v1, 1
42 %v8 = icmp eq i32 %v7, undef
43 br i1 %v8, label %b9, label %b8
45 b9: ; preds = %b8, %b5
46 %v9 = phi float [ undef, %b5 ], [ %v2, %b8 ]
47 %v10 = fsub float 0.000000e+00, %v9
48 %v11 = fadd float %v10, undef
49 %v12 = fmul float undef, %v11
50 %v13 = fcmp ugt float %v12, 0.000000e+00
51 br i1 %v13, label %b10, label %b11
56 b11: ; preds = %b10, %b9
57 %v14 = phi float [ undef, %b10 ], [ %v0, %b9 ]
58 %v15 = fadd float undef, %v14
64 b13: ; preds = %b13, %b11
68 attributes #0 = { nounwind "target-cpu"="hexagonv55" }