1 ; RUN: llc -march=hexagon -enable-pipeliner < %s
4 ; This test checks that we don't assert when the Phi value from the
5 ; loop is actually defined prior to the loop, e.g., from CSE.
7 define fastcc void @f0() {
9 br i1 undef, label %b10, label %b1
12 br i1 undef, label %b3, label %b2
18 br i1 undef, label %b4, label %b6
21 %v0 = load i16, i16* undef, align 2
27 b6: ; preds = %b5, %b3
28 %v1 = phi i16 [ %v9, %b5 ], [ 0, %b3 ]
29 br i1 undef, label %b10, label %b9
31 b7: ; preds = %b7, %b4
32 %v2 = phi i16 [ 0, %b7 ], [ %v0, %b4 ]
33 %v3 = phi i16 [ %v9, %b7 ], [ 0, %b4 ]
34 %v4 = phi i32 [ %v10, %b7 ], [ undef, %b4 ]
40 %v10 = add nsw i32 %v4, -32
41 %v11 = icmp sgt i32 %v10, 31
42 br i1 %v11, label %b7, label %b5
44 b8: ; preds = %b8, %b2
50 b10: ; preds = %b9, %b6, %b0