1 ; RUN: llc -march=hexagon < %s | FileCheck %s
2 ; Check that there are no packets with two or more instructions, except
3 ; for the endloop packet.
5 ; This is the expected code:
8 ; if (!p0) jump:nt .LBB0_3
14 ; { nop; nop }:endloop0
42 ; CHECK-NEXT: }{{[ \t]*}}:endloop0
44 ; CHECK-NEXT: jumpr r31
47 target triple = "hexagon"
50 define void @fred(ptr nocapture %a0, ptr nocapture readonly %a1, ptr nocapture readonly %a2, i32 %a3) local_unnamed_addr #0 {
52 %v5 = icmp sgt i32 %a3, 0
53 br i1 %v5, label %b6, label %b21
58 b7: ; preds = %b7, %b6
59 %v8 = phi i32 [ %v18, %b7 ], [ 0, %b6 ]
60 %v9 = phi ptr [ %v17, %b7 ], [ %a0, %b6 ]
61 %v10 = phi ptr [ %v14, %b7 ], [ %a2, %b6 ]
62 %v11 = phi ptr [ %v12, %b7 ], [ %a1, %b6 ]
63 %v12 = getelementptr inbounds i32, ptr %v11, i32 1
64 %v13 = load i32, ptr %v11, align 4
65 %v14 = getelementptr inbounds i32, ptr %v10, i32 1
66 %v15 = load i32, ptr %v10, align 4
67 %v16 = add nsw i32 %v15, %v13
68 %v17 = getelementptr inbounds i32, ptr %v9, i32 1
69 store i32 %v16, ptr %v9, align 4
70 %v18 = add nuw nsw i32 %v8, 1
71 %v19 = icmp eq i32 %v18, %a3
72 br i1 %v19, label %b20, label %b7
77 b21: ; preds = %b20, %b4
81 attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="-packets" }