1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-darwin | FileCheck %s --check-prefix=GENERIC
3 ; RUN: llc < %s -mtriple=x86_64-darwin -mcpu=atom | FileCheck %s --check-prefix=ATOM
5 @Te0 = external global [256 x i32] ; <[256 x i32]*> [#uses=5]
6 @Te1 = external global [256 x i32] ; <[256 x i32]*> [#uses=4]
7 @Te3 = external global [256 x i32] ; <[256 x i32]*> [#uses=2]
9 define void @t(i8* nocapture %in, i8* nocapture %out, i32* nocapture %rk, i32 %r) nounwind {
11 ; GENERIC: ## %bb.0: ## %entry
12 ; GENERIC-NEXT: pushq %rbp
13 ; GENERIC-NEXT: pushq %r14
14 ; GENERIC-NEXT: pushq %rbx
15 ; GENERIC-NEXT: ## kill: def $ecx killed $ecx def $rcx
16 ; GENERIC-NEXT: movl (%rdx), %eax
17 ; GENERIC-NEXT: movl 4(%rdx), %ebx
18 ; GENERIC-NEXT: decl %ecx
19 ; GENERIC-NEXT: leaq 20(%rdx), %r11
20 ; GENERIC-NEXT: movq _Te0@GOTPCREL(%rip), %r9
21 ; GENERIC-NEXT: movq _Te1@GOTPCREL(%rip), %r8
22 ; GENERIC-NEXT: movq _Te3@GOTPCREL(%rip), %r10
23 ; GENERIC-NEXT: movq %rcx, %r14
24 ; GENERIC-NEXT: .p2align 4, 0x90
25 ; GENERIC-NEXT: LBB0_1: ## %bb
26 ; GENERIC-NEXT: ## =>This Inner Loop Header: Depth=1
27 ; GENERIC-NEXT: movzbl %al, %edi
28 ; GENERIC-NEXT: ## kill: def $eax killed $eax def $rax
29 ; GENERIC-NEXT: shrl $24, %eax
30 ; GENERIC-NEXT: movl %ebx, %ebp
31 ; GENERIC-NEXT: shrl $16, %ebp
32 ; GENERIC-NEXT: movzbl %bpl, %ebp
33 ; GENERIC-NEXT: movl (%r8,%rbp,4), %ebp
34 ; GENERIC-NEXT: xorl (%r9,%rax,4), %ebp
35 ; GENERIC-NEXT: xorl -12(%r11), %ebp
36 ; GENERIC-NEXT: shrl $24, %ebx
37 ; GENERIC-NEXT: movl (%r10,%rdi,4), %edi
38 ; GENERIC-NEXT: xorl (%r9,%rbx,4), %edi
39 ; GENERIC-NEXT: xorl -8(%r11), %edi
40 ; GENERIC-NEXT: movl %ebp, %eax
41 ; GENERIC-NEXT: shrl $24, %eax
42 ; GENERIC-NEXT: movl (%r9,%rax,4), %eax
43 ; GENERIC-NEXT: subq $1, %r14
44 ; GENERIC-NEXT: jb LBB0_3
45 ; GENERIC-NEXT: ## %bb.2: ## %bb1
46 ; GENERIC-NEXT: ## in Loop: Header=BB0_1 Depth=1
47 ; GENERIC-NEXT: movl %edi, %ebx
48 ; GENERIC-NEXT: shrl $16, %ebx
49 ; GENERIC-NEXT: movzbl %bl, %ebx
50 ; GENERIC-NEXT: xorl (%r8,%rbx,4), %eax
51 ; GENERIC-NEXT: xorl -4(%r11), %eax
52 ; GENERIC-NEXT: shrl $24, %edi
53 ; GENERIC-NEXT: movzbl %bpl, %ebx
54 ; GENERIC-NEXT: movl (%r10,%rbx,4), %ebx
55 ; GENERIC-NEXT: xorl (%r9,%rdi,4), %ebx
56 ; GENERIC-NEXT: xorl (%r11), %ebx
57 ; GENERIC-NEXT: addq $16, %r11
58 ; GENERIC-NEXT: jmp LBB0_1
59 ; GENERIC-NEXT: LBB0_3: ## %bb2
60 ; GENERIC-NEXT: shlq $4, %rcx
61 ; GENERIC-NEXT: andl $-16777216, %eax ## imm = 0xFF000000
62 ; GENERIC-NEXT: movl %edi, %ebx
63 ; GENERIC-NEXT: shrl $16, %ebx
64 ; GENERIC-NEXT: movzbl %bl, %ebx
65 ; GENERIC-NEXT: movzbl 2(%r8,%rbx,4), %ebx
66 ; GENERIC-NEXT: shll $16, %ebx
67 ; GENERIC-NEXT: orl %eax, %ebx
68 ; GENERIC-NEXT: xorl 16(%rcx,%rdx), %ebx
69 ; GENERIC-NEXT: shrl $8, %edi
70 ; GENERIC-NEXT: movzbl 3(%r9,%rdi,4), %eax
71 ; GENERIC-NEXT: shll $24, %eax
72 ; GENERIC-NEXT: movzbl %bpl, %edi
73 ; GENERIC-NEXT: movzbl 2(%r8,%rdi,4), %edi
74 ; GENERIC-NEXT: shll $16, %edi
75 ; GENERIC-NEXT: orl %eax, %edi
76 ; GENERIC-NEXT: xorl 20(%rcx,%rdx), %edi
77 ; GENERIC-NEXT: movl %ebx, %eax
78 ; GENERIC-NEXT: shrl $24, %eax
79 ; GENERIC-NEXT: movb %al, (%rsi)
80 ; GENERIC-NEXT: shrl $16, %ebx
81 ; GENERIC-NEXT: movb %bl, 1(%rsi)
82 ; GENERIC-NEXT: movl %edi, %eax
83 ; GENERIC-NEXT: shrl $24, %eax
84 ; GENERIC-NEXT: movb %al, 4(%rsi)
85 ; GENERIC-NEXT: shrl $16, %edi
86 ; GENERIC-NEXT: movb %dil, 5(%rsi)
87 ; GENERIC-NEXT: popq %rbx
88 ; GENERIC-NEXT: popq %r14
89 ; GENERIC-NEXT: popq %rbp
93 ; ATOM: ## %bb.0: ## %entry
94 ; ATOM-NEXT: pushq %rbp
95 ; ATOM-NEXT: pushq %r15
96 ; ATOM-NEXT: pushq %r14
97 ; ATOM-NEXT: pushq %rbx
98 ; ATOM-NEXT: ## kill: def $ecx killed $ecx def $rcx
99 ; ATOM-NEXT: movl (%rdx), %r15d
100 ; ATOM-NEXT: movl 4(%rdx), %eax
101 ; ATOM-NEXT: leaq 20(%rdx), %r11
102 ; ATOM-NEXT: movq _Te0@GOTPCREL(%rip), %r9
103 ; ATOM-NEXT: movq _Te1@GOTPCREL(%rip), %r8
104 ; ATOM-NEXT: movq _Te3@GOTPCREL(%rip), %r10
105 ; ATOM-NEXT: decl %ecx
106 ; ATOM-NEXT: movq %rcx, %r14
107 ; ATOM-NEXT: .p2align 4, 0x90
108 ; ATOM-NEXT: LBB0_1: ## %bb
109 ; ATOM-NEXT: ## =>This Inner Loop Header: Depth=1
110 ; ATOM-NEXT: movl %eax, %edi
111 ; ATOM-NEXT: movl %r15d, %ebp
112 ; ATOM-NEXT: shrl $24, %eax
113 ; ATOM-NEXT: shrl $16, %edi
114 ; ATOM-NEXT: shrl $24, %ebp
115 ; ATOM-NEXT: movzbl %dil, %edi
116 ; ATOM-NEXT: movl (%r8,%rdi,4), %ebx
117 ; ATOM-NEXT: movzbl %r15b, %edi
118 ; ATOM-NEXT: xorl (%r9,%rbp,4), %ebx
119 ; ATOM-NEXT: movl (%r10,%rdi,4), %edi
120 ; ATOM-NEXT: xorl -12(%r11), %ebx
121 ; ATOM-NEXT: xorl (%r9,%rax,4), %edi
122 ; ATOM-NEXT: movl %ebx, %eax
123 ; ATOM-NEXT: xorl -8(%r11), %edi
124 ; ATOM-NEXT: shrl $24, %eax
125 ; ATOM-NEXT: movl (%r9,%rax,4), %r15d
126 ; ATOM-NEXT: subq $1, %r14
127 ; ATOM-NEXT: movl %edi, %eax
128 ; ATOM-NEXT: jb LBB0_3
129 ; ATOM-NEXT: ## %bb.2: ## %bb1
130 ; ATOM-NEXT: ## in Loop: Header=BB0_1 Depth=1
131 ; ATOM-NEXT: shrl $16, %eax
132 ; ATOM-NEXT: shrl $24, %edi
133 ; ATOM-NEXT: movzbl %al, %eax
134 ; ATOM-NEXT: xorl (%r8,%rax,4), %r15d
135 ; ATOM-NEXT: movzbl %bl, %eax
136 ; ATOM-NEXT: movl (%r10,%rax,4), %eax
137 ; ATOM-NEXT: xorl -4(%r11), %r15d
138 ; ATOM-NEXT: xorl (%r9,%rdi,4), %eax
139 ; ATOM-NEXT: xorl (%r11), %eax
140 ; ATOM-NEXT: addq $16, %r11
141 ; ATOM-NEXT: jmp LBB0_1
142 ; ATOM-NEXT: LBB0_3: ## %bb2
143 ; ATOM-NEXT: shrl $16, %eax
144 ; ATOM-NEXT: shrl $8, %edi
145 ; ATOM-NEXT: movzbl %bl, %ebp
146 ; ATOM-NEXT: andl $-16777216, %r15d ## imm = 0xFF000000
147 ; ATOM-NEXT: shlq $4, %rcx
148 ; ATOM-NEXT: movzbl %al, %eax
149 ; ATOM-NEXT: movzbl 3(%r9,%rdi,4), %edi
150 ; ATOM-NEXT: movzbl 2(%r8,%rbp,4), %ebp
151 ; ATOM-NEXT: movzbl 2(%r8,%rax,4), %eax
152 ; ATOM-NEXT: shll $24, %edi
153 ; ATOM-NEXT: shll $16, %ebp
154 ; ATOM-NEXT: shll $16, %eax
155 ; ATOM-NEXT: orl %edi, %ebp
156 ; ATOM-NEXT: orl %r15d, %eax
157 ; ATOM-NEXT: xorl 20(%rcx,%rdx), %ebp
158 ; ATOM-NEXT: xorl 16(%rcx,%rdx), %eax
159 ; ATOM-NEXT: movl %eax, %edi
160 ; ATOM-NEXT: shrl $16, %eax
161 ; ATOM-NEXT: shrl $24, %edi
162 ; ATOM-NEXT: movb %dil, (%rsi)
163 ; ATOM-NEXT: movb %al, 1(%rsi)
164 ; ATOM-NEXT: movl %ebp, %eax
165 ; ATOM-NEXT: shrl $16, %ebp
166 ; ATOM-NEXT: shrl $24, %eax
167 ; ATOM-NEXT: movb %al, 4(%rsi)
168 ; ATOM-NEXT: movb %bpl, 5(%rsi)
169 ; ATOM-NEXT: popq %rbx
170 ; ATOM-NEXT: popq %r14
171 ; ATOM-NEXT: popq %r15
172 ; ATOM-NEXT: popq %rbp
175 %0 = load i32, i32* %rk, align 4 ; <i32> [#uses=1]
176 %1 = getelementptr i32, i32* %rk, i64 1 ; <i32*> [#uses=1]
177 %2 = load i32, i32* %1, align 4 ; <i32> [#uses=1]
178 %tmp15 = add i32 %r, -1 ; <i32> [#uses=1]
179 %tmp.16 = zext i32 %tmp15 to i64 ; <i64> [#uses=2]
182 bb: ; preds = %bb1, %entry
183 %indvar = phi i64 [ 0, %entry ], [ %indvar.next, %bb1 ] ; <i64> [#uses=3]
184 %s1.0 = phi i32 [ %2, %entry ], [ %56, %bb1 ] ; <i32> [#uses=2]
185 %s0.0 = phi i32 [ %0, %entry ], [ %43, %bb1 ] ; <i32> [#uses=2]
186 %tmp18 = shl i64 %indvar, 4 ; <i64> [#uses=4]
187 %rk26 = bitcast i32* %rk to i8* ; <i8*> [#uses=6]
188 %3 = lshr i32 %s0.0, 24 ; <i32> [#uses=1]
189 %4 = zext i32 %3 to i64 ; <i64> [#uses=1]
190 %5 = getelementptr [256 x i32], [256 x i32]* @Te0, i64 0, i64 %4 ; <i32*> [#uses=1]
191 %6 = load i32, i32* %5, align 4 ; <i32> [#uses=1]
192 %7 = lshr i32 %s1.0, 16 ; <i32> [#uses=1]
193 %8 = and i32 %7, 255 ; <i32> [#uses=1]
194 %9 = zext i32 %8 to i64 ; <i64> [#uses=1]
195 %10 = getelementptr [256 x i32], [256 x i32]* @Te1, i64 0, i64 %9 ; <i32*> [#uses=1]
196 %11 = load i32, i32* %10, align 4 ; <i32> [#uses=1]
197 %ctg2.sum2728 = or i64 %tmp18, 8 ; <i64> [#uses=1]
198 %12 = getelementptr i8, i8* %rk26, i64 %ctg2.sum2728 ; <i8*> [#uses=1]
199 %13 = bitcast i8* %12 to i32* ; <i32*> [#uses=1]
200 %14 = load i32, i32* %13, align 4 ; <i32> [#uses=1]
201 %15 = xor i32 %11, %6 ; <i32> [#uses=1]
202 %16 = xor i32 %15, %14 ; <i32> [#uses=3]
203 %17 = lshr i32 %s1.0, 24 ; <i32> [#uses=1]
204 %18 = zext i32 %17 to i64 ; <i64> [#uses=1]
205 %19 = getelementptr [256 x i32], [256 x i32]* @Te0, i64 0, i64 %18 ; <i32*> [#uses=1]
206 %20 = load i32, i32* %19, align 4 ; <i32> [#uses=1]
207 %21 = and i32 %s0.0, 255 ; <i32> [#uses=1]
208 %22 = zext i32 %21 to i64 ; <i64> [#uses=1]
209 %23 = getelementptr [256 x i32], [256 x i32]* @Te3, i64 0, i64 %22 ; <i32*> [#uses=1]
210 %24 = load i32, i32* %23, align 4 ; <i32> [#uses=1]
211 %ctg2.sum2930 = or i64 %tmp18, 12 ; <i64> [#uses=1]
212 %25 = getelementptr i8, i8* %rk26, i64 %ctg2.sum2930 ; <i8*> [#uses=1]
213 %26 = bitcast i8* %25 to i32* ; <i32*> [#uses=1]
214 %27 = load i32, i32* %26, align 4 ; <i32> [#uses=1]
215 %28 = xor i32 %24, %20 ; <i32> [#uses=1]
216 %29 = xor i32 %28, %27 ; <i32> [#uses=4]
217 %30 = lshr i32 %16, 24 ; <i32> [#uses=1]
218 %31 = zext i32 %30 to i64 ; <i64> [#uses=1]
219 %32 = getelementptr [256 x i32], [256 x i32]* @Te0, i64 0, i64 %31 ; <i32*> [#uses=1]
220 %33 = load i32, i32* %32, align 4 ; <i32> [#uses=2]
221 %exitcond = icmp eq i64 %indvar, %tmp.16 ; <i1> [#uses=1]
222 br i1 %exitcond, label %bb2, label %bb1
225 %ctg2.sum31 = add i64 %tmp18, 16 ; <i64> [#uses=1]
226 %34 = getelementptr i8, i8* %rk26, i64 %ctg2.sum31 ; <i8*> [#uses=1]
227 %35 = bitcast i8* %34 to i32* ; <i32*> [#uses=1]
228 %36 = lshr i32 %29, 16 ; <i32> [#uses=1]
229 %37 = and i32 %36, 255 ; <i32> [#uses=1]
230 %38 = zext i32 %37 to i64 ; <i64> [#uses=1]
231 %39 = getelementptr [256 x i32], [256 x i32]* @Te1, i64 0, i64 %38 ; <i32*> [#uses=1]
232 %40 = load i32, i32* %39, align 4 ; <i32> [#uses=1]
233 %41 = load i32, i32* %35, align 4 ; <i32> [#uses=1]
234 %42 = xor i32 %40, %33 ; <i32> [#uses=1]
235 %43 = xor i32 %42, %41 ; <i32> [#uses=1]
236 %44 = lshr i32 %29, 24 ; <i32> [#uses=1]
237 %45 = zext i32 %44 to i64 ; <i64> [#uses=1]
238 %46 = getelementptr [256 x i32], [256 x i32]* @Te0, i64 0, i64 %45 ; <i32*> [#uses=1]
239 %47 = load i32, i32* %46, align 4 ; <i32> [#uses=1]
240 %48 = and i32 %16, 255 ; <i32> [#uses=1]
241 %49 = zext i32 %48 to i64 ; <i64> [#uses=1]
242 %50 = getelementptr [256 x i32], [256 x i32]* @Te3, i64 0, i64 %49 ; <i32*> [#uses=1]
243 %51 = load i32, i32* %50, align 4 ; <i32> [#uses=1]
244 %ctg2.sum32 = add i64 %tmp18, 20 ; <i64> [#uses=1]
245 %52 = getelementptr i8, i8* %rk26, i64 %ctg2.sum32 ; <i8*> [#uses=1]
246 %53 = bitcast i8* %52 to i32* ; <i32*> [#uses=1]
247 %54 = load i32, i32* %53, align 4 ; <i32> [#uses=1]
248 %55 = xor i32 %51, %47 ; <i32> [#uses=1]
249 %56 = xor i32 %55, %54 ; <i32> [#uses=1]
250 %indvar.next = add i64 %indvar, 1 ; <i64> [#uses=1]
254 %tmp10 = shl i64 %tmp.16, 4 ; <i64> [#uses=2]
255 %ctg2.sum = add i64 %tmp10, 16 ; <i64> [#uses=1]
256 %tmp1213 = getelementptr i8, i8* %rk26, i64 %ctg2.sum ; <i8*> [#uses=1]
257 %57 = bitcast i8* %tmp1213 to i32* ; <i32*> [#uses=1]
258 %58 = and i32 %33, -16777216 ; <i32> [#uses=1]
259 %59 = lshr i32 %29, 16 ; <i32> [#uses=1]
260 %60 = and i32 %59, 255 ; <i32> [#uses=1]
261 %61 = zext i32 %60 to i64 ; <i64> [#uses=1]
262 %62 = getelementptr [256 x i32], [256 x i32]* @Te1, i64 0, i64 %61 ; <i32*> [#uses=1]
263 %63 = load i32, i32* %62, align 4 ; <i32> [#uses=1]
264 %64 = and i32 %63, 16711680 ; <i32> [#uses=1]
265 %65 = or i32 %64, %58 ; <i32> [#uses=1]
266 %66 = load i32, i32* %57, align 4 ; <i32> [#uses=1]
267 %67 = xor i32 %65, %66 ; <i32> [#uses=2]
268 %68 = lshr i32 %29, 8 ; <i32> [#uses=1]
269 %69 = zext i32 %68 to i64 ; <i64> [#uses=1]
270 %70 = getelementptr [256 x i32], [256 x i32]* @Te0, i64 0, i64 %69 ; <i32*> [#uses=1]
271 %71 = load i32, i32* %70, align 4 ; <i32> [#uses=1]
272 %72 = and i32 %71, -16777216 ; <i32> [#uses=1]
273 %73 = and i32 %16, 255 ; <i32> [#uses=1]
274 %74 = zext i32 %73 to i64 ; <i64> [#uses=1]
275 %75 = getelementptr [256 x i32], [256 x i32]* @Te1, i64 0, i64 %74 ; <i32*> [#uses=1]
276 %76 = load i32, i32* %75, align 4 ; <i32> [#uses=1]
277 %77 = and i32 %76, 16711680 ; <i32> [#uses=1]
278 %78 = or i32 %77, %72 ; <i32> [#uses=1]
279 %ctg2.sum25 = add i64 %tmp10, 20 ; <i64> [#uses=1]
280 %79 = getelementptr i8, i8* %rk26, i64 %ctg2.sum25 ; <i8*> [#uses=1]
281 %80 = bitcast i8* %79 to i32* ; <i32*> [#uses=1]
282 %81 = load i32, i32* %80, align 4 ; <i32> [#uses=1]
283 %82 = xor i32 %78, %81 ; <i32> [#uses=2]
284 %83 = lshr i32 %67, 24 ; <i32> [#uses=1]
285 %84 = trunc i32 %83 to i8 ; <i8> [#uses=1]
286 store i8 %84, i8* %out, align 1
287 %85 = lshr i32 %67, 16 ; <i32> [#uses=1]
288 %86 = trunc i32 %85 to i8 ; <i8> [#uses=1]
289 %87 = getelementptr i8, i8* %out, i64 1 ; <i8*> [#uses=1]
290 store i8 %86, i8* %87, align 1
291 %88 = getelementptr i8, i8* %out, i64 4 ; <i8*> [#uses=1]
292 %89 = lshr i32 %82, 24 ; <i32> [#uses=1]
293 %90 = trunc i32 %89 to i8 ; <i8> [#uses=1]
294 store i8 %90, i8* %88, align 1
295 %91 = lshr i32 %82, 16 ; <i32> [#uses=1]
296 %92 = trunc i32 %91 to i8 ; <i8> [#uses=1]
297 %93 = getelementptr i8, i8* %out, i64 5 ; <i8*> [#uses=1]
298 store i8 %92, i8* %93, align 1
302 ; Check that DAGCombiner doesn't mess up the IV update when the exiting value
303 ; is equal to the stride.
304 ; It must not fold (cmp (add iv, 1), 1) --> (cmp iv, 0).
306 define i32 @f(i32 %i, i32* nocapture %a) nounwind uwtable readonly ssp {
308 ; GENERIC: ## %bb.0: ## %entry
309 ; GENERIC-NEXT: xorl %eax, %eax
310 ; GENERIC-NEXT: cmpl $1, %edi
311 ; GENERIC-NEXT: je LBB1_3
312 ; GENERIC-NEXT: ## %bb.1: ## %for.body.lr.ph
313 ; GENERIC-NEXT: movslq %edi, %rax
314 ; GENERIC-NEXT: leaq (%rsi,%rax,4), %rcx
315 ; GENERIC-NEXT: xorl %eax, %eax
316 ; GENERIC-NEXT: xorl %edx, %edx
317 ; GENERIC-NEXT: .p2align 4, 0x90
318 ; GENERIC-NEXT: LBB1_2: ## %for.body
319 ; GENERIC-NEXT: ## =>This Inner Loop Header: Depth=1
320 ; GENERIC-NEXT: movl (%rcx), %esi
321 ; GENERIC-NEXT: cmpl %edx, %esi
322 ; GENERIC-NEXT: cmoval %esi, %edx
323 ; GENERIC-NEXT: cmoval %edi, %eax
324 ; GENERIC-NEXT: incl %edi
325 ; GENERIC-NEXT: addq $4, %rcx
326 ; GENERIC-NEXT: cmpl $1, %edi
327 ; GENERIC-NEXT: jne LBB1_2
328 ; GENERIC-NEXT: LBB1_3: ## %for.end
332 ; ATOM: ## %bb.0: ## %entry
333 ; ATOM-NEXT: xorl %eax, %eax
334 ; ATOM-NEXT: cmpl $1, %edi
335 ; ATOM-NEXT: je LBB1_3
336 ; ATOM-NEXT: ## %bb.1: ## %for.body.lr.ph
337 ; ATOM-NEXT: movslq %edi, %rax
338 ; ATOM-NEXT: xorl %edx, %edx
339 ; ATOM-NEXT: leaq (%rsi,%rax,4), %rcx
340 ; ATOM-NEXT: xorl %eax, %eax
341 ; ATOM-NEXT: .p2align 4, 0x90
342 ; ATOM-NEXT: LBB1_2: ## %for.body
343 ; ATOM-NEXT: ## =>This Inner Loop Header: Depth=1
344 ; ATOM-NEXT: movl (%rcx), %esi
345 ; ATOM-NEXT: cmpl %edx, %esi
346 ; ATOM-NEXT: cmoval %esi, %edx
347 ; ATOM-NEXT: cmoval %edi, %eax
348 ; ATOM-NEXT: incl %edi
349 ; ATOM-NEXT: leaq 4(%rcx), %rcx
350 ; ATOM-NEXT: cmpl $1, %edi
351 ; ATOM-NEXT: jne LBB1_2
352 ; ATOM-NEXT: LBB1_3: ## %for.end
357 %cmp4 = icmp eq i32 %i, 1
358 br i1 %cmp4, label %for.end, label %for.body.lr.ph
360 for.body.lr.ph: ; preds = %entry
361 %0 = sext i32 %i to i64
364 for.body: ; preds = %for.body.lr.ph, %for.body
365 %indvars.iv = phi i64 [ %0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]
366 %bi.06 = phi i32 [ 0, %for.body.lr.ph ], [ %i.addr.0.bi.0, %for.body ]
367 %b.05 = phi i32 [ 0, %for.body.lr.ph ], [ %.b.0, %for.body ]
368 %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
369 %1 = load i32, i32* %arrayidx, align 4
370 %cmp1 = icmp ugt i32 %1, %b.05
371 %.b.0 = select i1 %cmp1, i32 %1, i32 %b.05
372 %2 = trunc i64 %indvars.iv to i32
373 %i.addr.0.bi.0 = select i1 %cmp1, i32 %2, i32 %bi.06
374 %indvars.iv.next = add i64 %indvars.iv, 1
375 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
376 %exitcond = icmp eq i32 %lftr.wideiv, 1
377 br i1 %exitcond, label %for.end, label %for.body
379 for.end: ; preds = %for.body, %entry
380 %bi.0.lcssa = phi i32 [ 0, %entry ], [ %i.addr.0.bi.0, %for.body ]