1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=generic -S < %s | FileCheck %s --check-prefix=CHECKOO
3 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=cortex-a55 -S < %s | FileCheck %s --check-prefix=CHECKII
4 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=cortex-a510 -S < %s | FileCheck %s --check-prefix=CHECKII
5 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=cortex-a72 -S < %s | FileCheck %s --check-prefix=CHECKOO
6 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=neoverse-n1 -S < %s | FileCheck %s --check-prefix=CHECKOO
7 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=cortex-a710 -S < %s | FileCheck %s --check-prefix=CHECKOO
8 ; RUN: opt -select-optimize -mtriple=aarch64-linux-gnu -mcpu=neoverse-v2 -S < %s | FileCheck %s --check-prefix=CHECKOO
10 %struct.st = type { i32, i64, ptr, ptr, i16, ptr, ptr, i64, i64 }
12 ; This test has a select at the end of if.then, which is better transformed to a branch on OoO cores.
14 define void @replace(ptr nocapture noundef %newst, ptr noundef %t, ptr noundef %h, i64 noundef %c, i64 noundef %rc, i64 noundef %ma, i64 noundef %n) {
15 ; CHECKOO-LABEL: @replace(
16 ; CHECKOO-NEXT: entry:
17 ; CHECKOO-NEXT: [[T1:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[NEWST:%.*]], i64 0, i32 2
18 ; CHECKOO-NEXT: store ptr [[T:%.*]], ptr [[T1]], align 8
19 ; CHECKOO-NEXT: [[H3:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 3
20 ; CHECKOO-NEXT: store ptr [[H:%.*]], ptr [[H3]], align 8
21 ; CHECKOO-NEXT: [[ORG_C:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 8
22 ; CHECKOO-NEXT: store i64 [[C:%.*]], ptr [[ORG_C]], align 8
23 ; CHECKOO-NEXT: [[C6:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 1
24 ; CHECKOO-NEXT: store i64 [[C]], ptr [[C6]], align 8
25 ; CHECKOO-NEXT: [[FLOW:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 7
26 ; CHECKOO-NEXT: store i64 [[RC:%.*]], ptr [[FLOW]], align 8
27 ; CHECKOO-NEXT: [[CONV:%.*]] = trunc i64 [[N:%.*]] to i32
28 ; CHECKOO-NEXT: store i32 [[CONV]], ptr [[NEWST]], align 8
29 ; CHECKOO-NEXT: [[FLOW10:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 1, i32 7
30 ; CHECKOO-NEXT: [[TMP0:%.*]] = load i64, ptr [[FLOW10]], align 8
31 ; CHECKOO-NEXT: [[FLOW12:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 2, i32 7
32 ; CHECKOO-NEXT: [[TMP1:%.*]] = load i64, ptr [[FLOW12]], align 8
33 ; CHECKOO-NEXT: [[CMP13:%.*]] = icmp sgt i64 [[TMP0]], [[TMP1]]
34 ; CHECKOO-NEXT: [[CONV15:%.*]] = select i1 [[CMP13]], i64 2, i64 3
35 ; CHECKOO-NEXT: [[CMP16_NOT149:%.*]] = icmp sgt i64 [[CONV15]], [[MA:%.*]]
36 ; CHECKOO-NEXT: br i1 [[CMP16_NOT149]], label [[WHILE_END:%.*]], label [[LAND_RHS:%.*]]
38 ; CHECKOO-NEXT: [[CMP_0151:%.*]] = phi i64 [ [[CMP_1:%.*]], [[IF_END87:%.*]] ], [ [[CONV15]], [[ENTRY:%.*]] ]
39 ; CHECKOO-NEXT: [[POS_0150:%.*]] = phi i64 [ [[CMP_0151]], [[IF_END87]] ], [ 1, [[ENTRY]] ]
40 ; CHECKOO-NEXT: [[SUB:%.*]] = add nsw i64 [[CMP_0151]], -1
41 ; CHECKOO-NEXT: [[FLOW19:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 7
42 ; CHECKOO-NEXT: [[TMP2:%.*]] = load i64, ptr [[FLOW19]], align 8
43 ; CHECKOO-NEXT: [[CMP20:%.*]] = icmp sgt i64 [[TMP2]], [[RC]]
44 ; CHECKOO-NEXT: br i1 [[CMP20]], label [[WHILE_BODY:%.*]], label [[WHILE_END]]
45 ; CHECKOO: while.body:
46 ; CHECKOO-NEXT: [[ARRAYIDX18:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]]
47 ; CHECKOO-NEXT: [[T24:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 2
48 ; CHECKOO-NEXT: [[TMP3:%.*]] = load ptr, ptr [[T24]], align 8
49 ; CHECKOO-NEXT: [[SUB25:%.*]] = add nsw i64 [[POS_0150]], -1
50 ; CHECKOO-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]]
51 ; CHECKOO-NEXT: [[T27:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 2
52 ; CHECKOO-NEXT: store ptr [[TMP3]], ptr [[T27]], align 8
53 ; CHECKOO-NEXT: [[H30:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 3
54 ; CHECKOO-NEXT: [[TMP4:%.*]] = load ptr, ptr [[H30]], align 8
55 ; CHECKOO-NEXT: [[H33:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 3
56 ; CHECKOO-NEXT: store ptr [[TMP4]], ptr [[H33]], align 8
57 ; CHECKOO-NEXT: [[C36:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 1
58 ; CHECKOO-NEXT: [[TMP5:%.*]] = load i64, ptr [[C36]], align 8
59 ; CHECKOO-NEXT: [[C39:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 1
60 ; CHECKOO-NEXT: store i64 [[TMP5]], ptr [[C39]], align 8
61 ; CHECKOO-NEXT: [[TMP6:%.*]] = load i64, ptr [[C36]], align 8
62 ; CHECKOO-NEXT: [[ORG_C45:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 8
63 ; CHECKOO-NEXT: store i64 [[TMP6]], ptr [[ORG_C45]], align 8
64 ; CHECKOO-NEXT: [[FLOW51:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 7
65 ; CHECKOO-NEXT: store i64 [[TMP2]], ptr [[FLOW51]], align 8
66 ; CHECKOO-NEXT: [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX18]], align 8
67 ; CHECKOO-NEXT: store i32 [[TMP7]], ptr [[ARRAYIDX26]], align 8
68 ; CHECKOO-NEXT: store ptr [[T]], ptr [[T24]], align 8
69 ; CHECKOO-NEXT: store ptr [[H]], ptr [[H30]], align 8
70 ; CHECKOO-NEXT: store i64 [[C]], ptr [[C36]], align 8
71 ; CHECKOO-NEXT: [[ORG_C69:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 8
72 ; CHECKOO-NEXT: store i64 [[C]], ptr [[ORG_C69]], align 8
73 ; CHECKOO-NEXT: store i64 [[RC]], ptr [[FLOW19]], align 8
74 ; CHECKOO-NEXT: store i32 [[CONV]], ptr [[ARRAYIDX18]], align 8
75 ; CHECKOO-NEXT: [[MUL:%.*]] = shl nsw i64 [[CMP_0151]], 1
76 ; CHECKOO-NEXT: [[ADD:%.*]] = or i64 [[MUL]], 1
77 ; CHECKOO-NEXT: [[CMP77_NOT:%.*]] = icmp sgt i64 [[ADD]], [[MA]]
78 ; CHECKOO-NEXT: br i1 [[CMP77_NOT]], label [[IF_END87]], label [[IF_THEN:%.*]]
80 ; CHECKOO-NEXT: [[SUB79:%.*]] = add nsw i64 [[MUL]], -1
81 ; CHECKOO-NEXT: [[FLOW81:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB79]], i32 7
82 ; CHECKOO-NEXT: [[TMP8:%.*]] = load i64, ptr [[FLOW81]], align 8
83 ; CHECKOO-NEXT: [[FLOW83:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[MUL]], i32 7
84 ; CHECKOO-NEXT: [[TMP9:%.*]] = load i64, ptr [[FLOW83]], align 8
85 ; CHECKOO-NEXT: [[CMP84:%.*]] = icmp slt i64 [[TMP8]], [[TMP9]]
86 ; CHECKOO-NEXT: [[SPEC_SELECT_FROZEN:%.*]] = freeze i1 [[CMP84]]
87 ; CHECKOO-NEXT: br i1 [[SPEC_SELECT_FROZEN]], label [[SELECT_END:%.*]], label [[SELECT_FALSE:%.*]]
88 ; CHECKOO: select.false:
89 ; CHECKOO-NEXT: br label [[SELECT_END]]
90 ; CHECKOO: select.end:
91 ; CHECKOO-NEXT: [[SPEC_SELECT:%.*]] = phi i64 [ [[ADD]], [[IF_THEN]] ], [ [[MUL]], [[SELECT_FALSE]] ]
92 ; CHECKOO-NEXT: br label [[IF_END87]]
94 ; CHECKOO-NEXT: [[CMP_1]] = phi i64 [ [[MUL]], [[WHILE_BODY]] ], [ [[SPEC_SELECT]], [[SELECT_END]] ]
95 ; CHECKOO-NEXT: [[CMP16_NOT:%.*]] = icmp sgt i64 [[CMP_1]], [[MA]]
96 ; CHECKOO-NEXT: br i1 [[CMP16_NOT]], label [[WHILE_END]], label [[LAND_RHS]]
98 ; CHECKOO-NEXT: ret void
100 ; CHECKII-LABEL: @replace(
101 ; CHECKII-NEXT: entry:
102 ; CHECKII-NEXT: [[T1:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[NEWST:%.*]], i64 0, i32 2
103 ; CHECKII-NEXT: store ptr [[T:%.*]], ptr [[T1]], align 8
104 ; CHECKII-NEXT: [[H3:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 3
105 ; CHECKII-NEXT: store ptr [[H:%.*]], ptr [[H3]], align 8
106 ; CHECKII-NEXT: [[ORG_C:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 8
107 ; CHECKII-NEXT: store i64 [[C:%.*]], ptr [[ORG_C]], align 8
108 ; CHECKII-NEXT: [[C6:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 1
109 ; CHECKII-NEXT: store i64 [[C]], ptr [[C6]], align 8
110 ; CHECKII-NEXT: [[FLOW:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 0, i32 7
111 ; CHECKII-NEXT: store i64 [[RC:%.*]], ptr [[FLOW]], align 8
112 ; CHECKII-NEXT: [[CONV:%.*]] = trunc i64 [[N:%.*]] to i32
113 ; CHECKII-NEXT: store i32 [[CONV]], ptr [[NEWST]], align 8
114 ; CHECKII-NEXT: [[FLOW10:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 1, i32 7
115 ; CHECKII-NEXT: [[TMP0:%.*]] = load i64, ptr [[FLOW10]], align 8
116 ; CHECKII-NEXT: [[FLOW12:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 2, i32 7
117 ; CHECKII-NEXT: [[TMP1:%.*]] = load i64, ptr [[FLOW12]], align 8
118 ; CHECKII-NEXT: [[CMP13:%.*]] = icmp sgt i64 [[TMP0]], [[TMP1]]
119 ; CHECKII-NEXT: [[CONV15:%.*]] = select i1 [[CMP13]], i64 2, i64 3
120 ; CHECKII-NEXT: [[CMP16_NOT149:%.*]] = icmp sgt i64 [[CONV15]], [[MA:%.*]]
121 ; CHECKII-NEXT: br i1 [[CMP16_NOT149]], label [[WHILE_END:%.*]], label [[LAND_RHS:%.*]]
123 ; CHECKII-NEXT: [[CMP_0151:%.*]] = phi i64 [ [[CMP_1:%.*]], [[IF_END87:%.*]] ], [ [[CONV15]], [[ENTRY:%.*]] ]
124 ; CHECKII-NEXT: [[POS_0150:%.*]] = phi i64 [ [[CMP_0151]], [[IF_END87]] ], [ 1, [[ENTRY]] ]
125 ; CHECKII-NEXT: [[SUB:%.*]] = add nsw i64 [[CMP_0151]], -1
126 ; CHECKII-NEXT: [[FLOW19:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 7
127 ; CHECKII-NEXT: [[TMP2:%.*]] = load i64, ptr [[FLOW19]], align 8
128 ; CHECKII-NEXT: [[CMP20:%.*]] = icmp sgt i64 [[TMP2]], [[RC]]
129 ; CHECKII-NEXT: br i1 [[CMP20]], label [[WHILE_BODY:%.*]], label [[WHILE_END]]
130 ; CHECKII: while.body:
131 ; CHECKII-NEXT: [[ARRAYIDX18:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]]
132 ; CHECKII-NEXT: [[T24:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 2
133 ; CHECKII-NEXT: [[TMP3:%.*]] = load ptr, ptr [[T24]], align 8
134 ; CHECKII-NEXT: [[SUB25:%.*]] = add nsw i64 [[POS_0150]], -1
135 ; CHECKII-NEXT: [[ARRAYIDX26:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]]
136 ; CHECKII-NEXT: [[T27:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 2
137 ; CHECKII-NEXT: store ptr [[TMP3]], ptr [[T27]], align 8
138 ; CHECKII-NEXT: [[H30:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 3
139 ; CHECKII-NEXT: [[TMP4:%.*]] = load ptr, ptr [[H30]], align 8
140 ; CHECKII-NEXT: [[H33:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 3
141 ; CHECKII-NEXT: store ptr [[TMP4]], ptr [[H33]], align 8
142 ; CHECKII-NEXT: [[C36:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 1
143 ; CHECKII-NEXT: [[TMP5:%.*]] = load i64, ptr [[C36]], align 8
144 ; CHECKII-NEXT: [[C39:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 1
145 ; CHECKII-NEXT: store i64 [[TMP5]], ptr [[C39]], align 8
146 ; CHECKII-NEXT: [[TMP6:%.*]] = load i64, ptr [[C36]], align 8
147 ; CHECKII-NEXT: [[ORG_C45:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 8
148 ; CHECKII-NEXT: store i64 [[TMP6]], ptr [[ORG_C45]], align 8
149 ; CHECKII-NEXT: [[FLOW51:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB25]], i32 7
150 ; CHECKII-NEXT: store i64 [[TMP2]], ptr [[FLOW51]], align 8
151 ; CHECKII-NEXT: [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX18]], align 8
152 ; CHECKII-NEXT: store i32 [[TMP7]], ptr [[ARRAYIDX26]], align 8
153 ; CHECKII-NEXT: store ptr [[T]], ptr [[T24]], align 8
154 ; CHECKII-NEXT: store ptr [[H]], ptr [[H30]], align 8
155 ; CHECKII-NEXT: store i64 [[C]], ptr [[C36]], align 8
156 ; CHECKII-NEXT: [[ORG_C69:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB]], i32 8
157 ; CHECKII-NEXT: store i64 [[C]], ptr [[ORG_C69]], align 8
158 ; CHECKII-NEXT: store i64 [[RC]], ptr [[FLOW19]], align 8
159 ; CHECKII-NEXT: store i32 [[CONV]], ptr [[ARRAYIDX18]], align 8
160 ; CHECKII-NEXT: [[MUL:%.*]] = shl nsw i64 [[CMP_0151]], 1
161 ; CHECKII-NEXT: [[ADD:%.*]] = or i64 [[MUL]], 1
162 ; CHECKII-NEXT: [[CMP77_NOT:%.*]] = icmp sgt i64 [[ADD]], [[MA]]
163 ; CHECKII-NEXT: br i1 [[CMP77_NOT]], label [[IF_END87]], label [[IF_THEN:%.*]]
165 ; CHECKII-NEXT: [[SUB79:%.*]] = add nsw i64 [[MUL]], -1
166 ; CHECKII-NEXT: [[FLOW81:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[SUB79]], i32 7
167 ; CHECKII-NEXT: [[TMP8:%.*]] = load i64, ptr [[FLOW81]], align 8
168 ; CHECKII-NEXT: [[FLOW83:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[NEWST]], i64 [[MUL]], i32 7
169 ; CHECKII-NEXT: [[TMP9:%.*]] = load i64, ptr [[FLOW83]], align 8
170 ; CHECKII-NEXT: [[CMP84:%.*]] = icmp slt i64 [[TMP8]], [[TMP9]]
171 ; CHECKII-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[CMP84]], i64 [[ADD]], i64 [[MUL]]
172 ; CHECKII-NEXT: br label [[IF_END87]]
174 ; CHECKII-NEXT: [[CMP_1]] = phi i64 [ [[MUL]], [[WHILE_BODY]] ], [ [[SPEC_SELECT]], [[IF_THEN]] ]
175 ; CHECKII-NEXT: [[CMP16_NOT:%.*]] = icmp sgt i64 [[CMP_1]], [[MA]]
176 ; CHECKII-NEXT: br i1 [[CMP16_NOT]], label [[WHILE_END]], label [[LAND_RHS]]
177 ; CHECKII: while.end:
178 ; CHECKII-NEXT: ret void
181 %t1 = getelementptr inbounds %struct.st, ptr %newst, i64 0, i32 2
182 store ptr %t, ptr %t1, align 8
183 %h3 = getelementptr inbounds %struct.st, ptr %newst, i64 0, i32 3
184 store ptr %h, ptr %h3, align 8
185 %org_c = getelementptr inbounds %struct.st, ptr %newst, i64 0, i32 8
186 store i64 %c, ptr %org_c, align 8
187 %c6 = getelementptr inbounds %struct.st, ptr %newst, i64 0, i32 1
188 store i64 %c, ptr %c6, align 8
189 %flow = getelementptr inbounds %struct.st, ptr %newst, i64 0, i32 7
190 store i64 %rc, ptr %flow, align 8
191 %conv = trunc i64 %n to i32
192 store i32 %conv, ptr %newst, align 8
193 %flow10 = getelementptr inbounds %struct.st, ptr %newst, i64 1, i32 7
194 %0 = load i64, ptr %flow10, align 8
195 %flow12 = getelementptr inbounds %struct.st, ptr %newst, i64 2, i32 7
196 %1 = load i64, ptr %flow12, align 8
197 %cmp13 = icmp sgt i64 %0, %1
198 %conv15 = select i1 %cmp13, i64 2, i64 3
199 %cmp16.not149 = icmp sgt i64 %conv15, %ma
200 br i1 %cmp16.not149, label %while.end, label %land.rhs
202 land.rhs: ; preds = %entry, %if.end87
203 %cmp.0151 = phi i64 [ %cmp.1, %if.end87 ], [ %conv15, %entry ]
204 %pos.0150 = phi i64 [ %cmp.0151, %if.end87 ], [ 1, %entry ]
205 %sub = add nsw i64 %cmp.0151, -1
206 %flow19 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub, i32 7
207 %2 = load i64, ptr %flow19, align 8
208 %cmp20 = icmp sgt i64 %2, %rc
209 br i1 %cmp20, label %while.body, label %while.end
211 while.body: ; preds = %land.rhs
212 %arrayidx18 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub
213 %t24 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub, i32 2
214 %3 = load ptr, ptr %t24, align 8
215 %sub25 = add nsw i64 %pos.0150, -1
216 %arrayidx26 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25
217 %t27 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25, i32 2
218 store ptr %3, ptr %t27, align 8
219 %h30 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub, i32 3
220 %4 = load ptr, ptr %h30, align 8
221 %h33 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25, i32 3
222 store ptr %4, ptr %h33, align 8
223 %c36 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub, i32 1
224 %5 = load i64, ptr %c36, align 8
225 %c39 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25, i32 1
226 store i64 %5, ptr %c39, align 8
227 %6 = load i64, ptr %c36, align 8
228 %org_c45 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25, i32 8
229 store i64 %6, ptr %org_c45, align 8
230 %flow51 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub25, i32 7
231 store i64 %2, ptr %flow51, align 8
232 %7 = load i32, ptr %arrayidx18, align 8
233 store i32 %7, ptr %arrayidx26, align 8
234 store ptr %t, ptr %t24, align 8
235 store ptr %h, ptr %h30, align 8
236 store i64 %c, ptr %c36, align 8
237 %org_c69 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub, i32 8
238 store i64 %c, ptr %org_c69, align 8
239 store i64 %rc, ptr %flow19, align 8
240 store i32 %conv, ptr %arrayidx18, align 8
241 %mul = shl nsw i64 %cmp.0151, 1
242 %add = or i64 %mul, 1
243 %cmp77.not = icmp sgt i64 %add, %ma
244 br i1 %cmp77.not, label %if.end87, label %if.then
246 if.then: ; preds = %while.body
247 %sub79 = add nsw i64 %mul, -1
248 %flow81 = getelementptr inbounds %struct.st, ptr %newst, i64 %sub79, i32 7
249 %8 = load i64, ptr %flow81, align 8
250 %flow83 = getelementptr inbounds %struct.st, ptr %newst, i64 %mul, i32 7
251 %9 = load i64, ptr %flow83, align 8
252 %cmp84 = icmp slt i64 %8, %9
253 %spec.select = select i1 %cmp84, i64 %add, i64 %mul
256 if.end87: ; preds = %if.then, %while.body
257 %cmp.1 = phi i64 [ %mul, %while.body ], [ %spec.select, %if.then ]
258 %cmp16.not = icmp sgt i64 %cmp.1, %ma
259 br i1 %cmp16.not, label %while.end, label %land.rhs
261 while.end: ; preds = %land.rhs, %if.end87, %entry