1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=hexagon -O3 -hexagon-instsimplify=0 < %s | FileCheck %s
4 define void @f0(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
6 ; CHECK: // %bb.0: // %b0
8 ; CHECK-NEXT: loop0(.LBB0_1,#3)
10 ; CHECK-NEXT: .p2align 4
11 ; CHECK-NEXT: .LBB0_1: // Block address taken
13 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
17 ; CHECK-NEXT: } :endloop0
18 ; CHECK-NEXT: // %bb.2: // %b3
20 ; CHECK-NEXT: jumpr r31
28 b2: ; preds = %b2, %b1
29 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
30 %v1 = add nsw i32 %v0, 1
31 %v2 = icmp slt i32 %v1, 3
32 br i1 %v2, label %b2, label %b3
38 define void @f1(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
40 ; CHECK: // %bb.0: // %b0
42 ; CHECK-NEXT: loop0(.LBB1_1,#2)
44 ; CHECK-NEXT: .p2align 4
45 ; CHECK-NEXT: .LBB1_1: // Block address taken
47 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
51 ; CHECK-NEXT: } :endloop0
52 ; CHECK-NEXT: // %bb.2: // %b3
54 ; CHECK-NEXT: jumpr r31
62 b2: ; preds = %b2, %b1
63 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
64 %v1 = add nsw i32 %v0, 2
65 %v2 = icmp slt i32 %v1, 3
66 br i1 %v2, label %b2, label %b3
72 define void @f2(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
74 ; CHECK: // %bb.0: // %b0
76 ; CHECK-NEXT: loop0(.LBB2_1,#1)
78 ; CHECK-NEXT: .p2align 4
79 ; CHECK-NEXT: .LBB2_1: // Block address taken
81 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
85 ; CHECK-NEXT: } :endloop0
86 ; CHECK-NEXT: // %bb.2: // %b3
88 ; CHECK-NEXT: jumpr r31
96 b2: ; preds = %b2, %b1
97 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
98 %v1 = add nsw i32 %v0, 3
99 %v2 = icmp slt i32 %v1, 3
100 br i1 %v2, label %b2, label %b3
106 define void @f3(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
108 ; CHECK: // %bb.0: // %b0
110 ; CHECK-NEXT: loop0(.LBB3_1,#4)
112 ; CHECK-NEXT: .p2align 4
113 ; CHECK-NEXT: .LBB3_1: // Block address taken
115 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
119 ; CHECK-NEXT: } :endloop0
120 ; CHECK-NEXT: // %bb.2: // %b3
122 ; CHECK-NEXT: jumpr r31
130 b2: ; preds = %b2, %b1
131 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
132 %v1 = add nsw i32 %v0, 1
133 %v2 = icmp sle i32 %v1, 3
134 br i1 %v2, label %b2, label %b3
140 define void @f4(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
142 ; CHECK: // %bb.0: // %b0
144 ; CHECK-NEXT: loop0(.LBB4_1,#2)
146 ; CHECK-NEXT: .p2align 4
147 ; CHECK-NEXT: .LBB4_1: // Block address taken
149 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
153 ; CHECK-NEXT: } :endloop0
154 ; CHECK-NEXT: // %bb.2: // %b3
156 ; CHECK-NEXT: jumpr r31
164 b2: ; preds = %b2, %b1
165 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
166 %v1 = add nsw i32 %v0, 2
167 %v2 = icmp sle i32 %v1, 3
168 br i1 %v2, label %b2, label %b3
174 define void @f5(ptr nocapture %a0, i32 %a1, i32 %a2) #0 {
176 ; CHECK: // %bb.0: // %b0
178 ; CHECK-NEXT: loop0(.LBB5_1,#2)
180 ; CHECK-NEXT: .p2align 4
181 ; CHECK-NEXT: .LBB5_1: // Block address taken
183 ; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
187 ; CHECK-NEXT: } :endloop0
188 ; CHECK-NEXT: // %bb.2: // %b3
190 ; CHECK-NEXT: jumpr r31
198 b2: ; preds = %b2, %b1
199 %v0 = phi i32 [ 0, %b1 ], [ %v1, %b2 ]
200 %v1 = add nsw i32 %v0, 3
201 %v2 = icmp sle i32 %v1, 3
202 br i1 %v2, label %b2, label %b3
208 attributes #0 = { nounwind }