1; RUN: llc -march=hexagon -fp-contract=fast -enable-pipeliner < %s
2; REQUIRES: asserts
3
4; A Phi that depends on another Phi is loop carried.
5
6define void @f0() #0 {
7b0:
8  br label %b1
9
10b1:                                               ; preds = %b1, %b0
11  br i1 undef, label %b1, label %b2
12
13b2:                                               ; preds = %b1
14  br i1 undef, label %b3, label %b8
15
16b3:                                               ; preds = %b2
17  br i1 undef, label %b4, label %b5
18
19b4:                                               ; preds = %b4, %b3
20  %v0 = phi i32 [ %v5, %b4 ], [ 2, %b3 ]
21  %v1 = phi float [ %v4, %b4 ], [ undef, %b3 ]
22  %v2 = phi float [ %v1, %b4 ], [ undef, %b3 ]
23  %v3 = fsub float 0.000000e+00, %v2
24  %v4 = fadd float %v3, undef
25  %v5 = add nsw i32 %v0, 1
26  %v6 = icmp eq i32 %v5, undef
27  br i1 %v6, label %b5, label %b4
28
29b5:                                               ; preds = %b4, %b3
30  %v7 = phi float [ undef, %b3 ], [ %v1, %b4 ]
31  br i1 false, label %b6, label %b7
32
33b6:                                               ; preds = %b5
34  br label %b7
35
36b7:                                               ; preds = %b6, %b5
37  br label %b9
38
39b8:                                               ; preds = %b2
40  ret void
41
42b9:                                               ; preds = %b9, %b7
43  br label %b9
44}
45
46attributes #0 = { nounwind "target-cpu"="hexagonv55" }
47