1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=x86_64-unknown -mcpu=skx -o - %s | FileCheck %s --check-prefix=X64-O0
3 ; RUN: llc -mtriple=x86_64-unknown -mcpu=skx -o - %s | FileCheck %s --check-prefix=X64
4 ; RUN: llc -O0 -mtriple=i686-unknown -mcpu=skx -o - %s | FileCheck %s --check-prefix=X86-O0
5 ; RUN: llc -mtriple=i686-unknown -mcpu=skx -o - %s | FileCheck %s --check-prefix=X86
7 @c = external dso_local constant i8, align 1
11 ; X64-O0: # %bb.0: # %entry
12 ; X64-O0-NEXT: movzbl c, %ecx
13 ; X64-O0-NEXT: xorl %eax, %eax
14 ; X64-O0-NEXT: subl %ecx, %eax
15 ; X64-O0-NEXT: movslq %eax, %rcx
16 ; X64-O0-NEXT: xorl %eax, %eax
17 ; X64-O0-NEXT: # kill: def $rax killed $eax
18 ; X64-O0-NEXT: subq %rcx, %rax
19 ; X64-O0-NEXT: # kill: def $al killed $al killed $rax
20 ; X64-O0-NEXT: cmpb $0, %al
21 ; X64-O0-NEXT: setne %al
22 ; X64-O0-NEXT: andb $1, %al
23 ; X64-O0-NEXT: movb %al, -{{[0-9]+}}(%rsp)
24 ; X64-O0-NEXT: cmpb $0, c
25 ; X64-O0-NEXT: setne %al
26 ; X64-O0-NEXT: xorb $-1, %al
27 ; X64-O0-NEXT: xorb $-1, %al
28 ; X64-O0-NEXT: andb $1, %al
29 ; X64-O0-NEXT: movzbl %al, %eax
30 ; X64-O0-NEXT: movzbl c, %ecx
31 ; X64-O0-NEXT: cmpl %ecx, %eax
32 ; X64-O0-NEXT: setle %al
33 ; X64-O0-NEXT: andb $1, %al
34 ; X64-O0-NEXT: movzbl %al, %eax
35 ; X64-O0-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
39 ; X64: # %bb.0: # %entry
40 ; X64-NEXT: movzbl c(%rip), %eax
41 ; X64-NEXT: xorl %ecx, %ecx
42 ; X64-NEXT: testl %eax, %eax
43 ; X64-NEXT: setne -{{[0-9]+}}(%rsp)
45 ; X64-NEXT: xorl %edx, %edx
46 ; X64-NEXT: cmpl %eax, %ecx
48 ; X64-NEXT: movl %edx, -{{[0-9]+}}(%rsp)
52 ; X86-O0: # %bb.0: # %entry
53 ; X86-O0-NEXT: subl $8, %esp
54 ; X86-O0-NEXT: .cfi_def_cfa_offset 12
55 ; X86-O0-NEXT: movb c, %al
56 ; X86-O0-NEXT: cmpb $0, %al
57 ; X86-O0-NEXT: setne %al
58 ; X86-O0-NEXT: andb $1, %al
59 ; X86-O0-NEXT: movb %al, {{[0-9]+}}(%esp)
60 ; X86-O0-NEXT: cmpb $0, c
61 ; X86-O0-NEXT: setne %al
62 ; X86-O0-NEXT: xorb $-1, %al
63 ; X86-O0-NEXT: xorb $-1, %al
64 ; X86-O0-NEXT: andb $1, %al
65 ; X86-O0-NEXT: movzbl %al, %eax
66 ; X86-O0-NEXT: movzbl c, %ecx
67 ; X86-O0-NEXT: cmpl %ecx, %eax
68 ; X86-O0-NEXT: setle %al
69 ; X86-O0-NEXT: andb $1, %al
70 ; X86-O0-NEXT: movzbl %al, %eax
71 ; X86-O0-NEXT: movl %eax, (%esp)
72 ; X86-O0-NEXT: addl $8, %esp
73 ; X86-O0-NEXT: .cfi_def_cfa_offset 4
77 ; X86: # %bb.0: # %entry
78 ; X86-NEXT: subl $8, %esp
79 ; X86-NEXT: .cfi_def_cfa_offset 12
80 ; X86-NEXT: movzbl c, %eax
81 ; X86-NEXT: xorl %ecx, %ecx
82 ; X86-NEXT: testl %eax, %eax
83 ; X86-NEXT: setne {{[0-9]+}}(%esp)
85 ; X86-NEXT: xorl %edx, %edx
86 ; X86-NEXT: cmpl %eax, %ecx
88 ; X86-NEXT: movl %edx, {{[0-9]+}}(%esp)
89 ; X86-NEXT: addl $8, %esp
90 ; X86-NEXT: .cfi_def_cfa_offset 4
93 %a = alloca i8, align 1
94 %b = alloca i32, align 4
95 %0 = load i8, ptr @c, align 1
96 %conv = zext i8 %0 to i32
97 %sub = sub nsw i32 0, %conv
98 %conv1 = sext i32 %sub to i64
99 %sub2 = sub nsw i64 0, %conv1
100 %conv3 = trunc i64 %sub2 to i8
101 %tobool = icmp ne i8 %conv3, 0
102 %frombool = zext i1 %tobool to i8
103 store i8 %frombool, ptr %a, align 1
104 %1 = load i8, ptr @c, align 1
105 %tobool4 = icmp ne i8 %1, 0
106 %lnot = xor i1 %tobool4, true
107 %lnot5 = xor i1 %lnot, true
108 %conv6 = zext i1 %lnot5 to i32
109 %2 = load i8, ptr @c, align 1
110 %conv7 = zext i8 %2 to i32
111 %cmp = icmp sle i32 %conv6, %conv7
112 %conv8 = zext i1 %cmp to i32
113 store i32 %conv8, ptr %b, align 4
117 @var_5 = external dso_local global i32, align 4
118 @var_57 = external dso_local global i64, align 8
119 @_ZN8struct_210member_2_0E = external dso_local global i64, align 8
123 ; X64-O0: # %bb.0: # %entry
124 ; X64-O0-NEXT: movslq var_5, %rax
125 ; X64-O0-NEXT: movabsq $8381627093, %rcx # imm = 0x1F3957AD5
126 ; X64-O0-NEXT: addq %rcx, %rax
127 ; X64-O0-NEXT: cmpq $0, %rax
128 ; X64-O0-NEXT: setne %al
129 ; X64-O0-NEXT: andb $1, %al
130 ; X64-O0-NEXT: movb %al, -{{[0-9]+}}(%rsp)
131 ; X64-O0-NEXT: movl var_5, %eax
132 ; X64-O0-NEXT: xorl $-1, %eax
133 ; X64-O0-NEXT: cmpl $0, %eax
134 ; X64-O0-NEXT: setne %al
135 ; X64-O0-NEXT: xorb $-1, %al
136 ; X64-O0-NEXT: andb $1, %al
137 ; X64-O0-NEXT: movzbl %al, %eax
138 ; X64-O0-NEXT: # kill: def $rax killed $eax
139 ; X64-O0-NEXT: movslq var_5, %rcx
140 ; X64-O0-NEXT: addq $7093, %rcx # imm = 0x1BB5
141 ; X64-O0-NEXT: cmpq %rcx, %rax
142 ; X64-O0-NEXT: setg %al
143 ; X64-O0-NEXT: andb $1, %al
144 ; X64-O0-NEXT: movzbl %al, %eax
145 ; X64-O0-NEXT: # kill: def $rax killed $eax
146 ; X64-O0-NEXT: movq %rax, var_57
147 ; X64-O0-NEXT: movl var_5, %eax
148 ; X64-O0-NEXT: xorl $-1, %eax
149 ; X64-O0-NEXT: cmpl $0, %eax
150 ; X64-O0-NEXT: setne %al
151 ; X64-O0-NEXT: xorb $-1, %al
152 ; X64-O0-NEXT: andb $1, %al
153 ; X64-O0-NEXT: movzbl %al, %eax
154 ; X64-O0-NEXT: # kill: def $rax killed $eax
155 ; X64-O0-NEXT: movq %rax, _ZN8struct_210member_2_0E
159 ; X64: # %bb.0: # %entry
160 ; X64-NEXT: movslq var_5(%rip), %rax
161 ; X64-NEXT: movabsq $-8381627093, %rcx # imm = 0xFFFFFFFE0C6A852B
162 ; X64-NEXT: cmpq %rcx, %rax
163 ; X64-NEXT: setne -{{[0-9]+}}(%rsp)
164 ; X64-NEXT: xorl %ecx, %ecx
165 ; X64-NEXT: cmpq $-1, %rax
167 ; X64-NEXT: xorl %edx, %edx
168 ; X64-NEXT: cmpl $-1, %eax
170 ; X64-NEXT: addq $7093, %rax # imm = 0x1BB5
171 ; X64-NEXT: xorl %esi, %esi
172 ; X64-NEXT: cmpq %rax, %rdx
173 ; X64-NEXT: setg %sil
174 ; X64-NEXT: movq %rsi, var_57(%rip)
175 ; X64-NEXT: movq %rcx, _ZN8struct_210member_2_0E(%rip)
179 ; X86-O0: # %bb.0: # %entry
180 ; X86-O0-NEXT: subl $1, %esp
181 ; X86-O0-NEXT: .cfi_def_cfa_offset 5
182 ; X86-O0-NEXT: movl var_5, %eax
183 ; X86-O0-NEXT: movl %eax, %ecx
184 ; X86-O0-NEXT: sarl $31, %ecx
185 ; X86-O0-NEXT: xorl $208307499, %eax # imm = 0xC6A852B
186 ; X86-O0-NEXT: xorl $-2, %ecx
187 ; X86-O0-NEXT: orl %ecx, %eax
188 ; X86-O0-NEXT: setne (%esp)
189 ; X86-O0-NEXT: movl var_5, %ecx
190 ; X86-O0-NEXT: movl %ecx, %eax
191 ; X86-O0-NEXT: sarl $31, %eax
192 ; X86-O0-NEXT: movl %ecx, %edx
193 ; X86-O0-NEXT: subl $-1, %edx
194 ; X86-O0-NEXT: sete %dl
195 ; X86-O0-NEXT: movzbl %dl, %edx
196 ; X86-O0-NEXT: addl $7093, %ecx # imm = 0x1BB5
197 ; X86-O0-NEXT: adcl $0, %eax
198 ; X86-O0-NEXT: subl %edx, %ecx
199 ; X86-O0-NEXT: sbbl $0, %eax
200 ; X86-O0-NEXT: setl %al
201 ; X86-O0-NEXT: movzbl %al, %eax
202 ; X86-O0-NEXT: movl %eax, var_57
203 ; X86-O0-NEXT: movl $0, var_57+4
204 ; X86-O0-NEXT: movl var_5, %eax
205 ; X86-O0-NEXT: subl $-1, %eax
206 ; X86-O0-NEXT: sete %al
207 ; X86-O0-NEXT: movzbl %al, %eax
208 ; X86-O0-NEXT: movl %eax, _ZN8struct_210member_2_0E
209 ; X86-O0-NEXT: movl $0, _ZN8struct_210member_2_0E+4
210 ; X86-O0-NEXT: addl $1, %esp
211 ; X86-O0-NEXT: .cfi_def_cfa_offset 4
215 ; X86: # %bb.0: # %entry
216 ; X86-NEXT: pushl %ebx
217 ; X86-NEXT: .cfi_def_cfa_offset 8
218 ; X86-NEXT: pushl %esi
219 ; X86-NEXT: .cfi_def_cfa_offset 12
220 ; X86-NEXT: subl $1, %esp
221 ; X86-NEXT: .cfi_def_cfa_offset 13
222 ; X86-NEXT: .cfi_offset %esi, -12
223 ; X86-NEXT: .cfi_offset %ebx, -8
224 ; X86-NEXT: movl var_5, %eax
225 ; X86-NEXT: movl %eax, %edx
226 ; X86-NEXT: xorl $208307499, %edx # imm = 0xC6A852B
227 ; X86-NEXT: movl %eax, %ecx
228 ; X86-NEXT: sarl $31, %ecx
229 ; X86-NEXT: movl %ecx, %esi
230 ; X86-NEXT: xorl $-2, %esi
231 ; X86-NEXT: orl %edx, %esi
232 ; X86-NEXT: setne (%esp)
233 ; X86-NEXT: movl %eax, %esi
234 ; X86-NEXT: andl %ecx, %esi
235 ; X86-NEXT: xorl %edx, %edx
236 ; X86-NEXT: cmpl $-1, %esi
238 ; X86-NEXT: xorl %ebx, %ebx
239 ; X86-NEXT: cmpl $-1, %eax
241 ; X86-NEXT: addl $7093, %eax # imm = 0x1BB5
242 ; X86-NEXT: adcl $0, %ecx
243 ; X86-NEXT: cmpl %ebx, %eax
244 ; X86-NEXT: sbbl $0, %ecx
246 ; X86-NEXT: movzbl %al, %eax
247 ; X86-NEXT: movl %eax, var_57
248 ; X86-NEXT: movl $0, var_57+4
249 ; X86-NEXT: movl %edx, _ZN8struct_210member_2_0E
250 ; X86-NEXT: movl $0, _ZN8struct_210member_2_0E+4
251 ; X86-NEXT: addl $1, %esp
252 ; X86-NEXT: .cfi_def_cfa_offset 12
253 ; X86-NEXT: popl %esi
254 ; X86-NEXT: .cfi_def_cfa_offset 8
255 ; X86-NEXT: popl %ebx
256 ; X86-NEXT: .cfi_def_cfa_offset 4
259 %a = alloca i8, align 1
260 %0 = load i32, ptr @var_5, align 4
261 %conv = sext i32 %0 to i64
262 %add = add nsw i64 %conv, 8381627093
263 %tobool = icmp ne i64 %add, 0
264 %frombool = zext i1 %tobool to i8
265 store i8 %frombool, ptr %a, align 1
266 %1 = load i32, ptr @var_5, align 4
267 %neg = xor i32 %1, -1
268 %tobool1 = icmp ne i32 %neg, 0
269 %lnot = xor i1 %tobool1, true
270 %conv2 = zext i1 %lnot to i64
271 %2 = load i32, ptr @var_5, align 4
272 %conv3 = sext i32 %2 to i64
273 %add4 = add nsw i64 %conv3, 7093
274 %cmp = icmp sgt i64 %conv2, %add4
275 %conv5 = zext i1 %cmp to i64
276 store i64 %conv5, ptr @var_57, align 8
277 %3 = load i32, ptr @var_5, align 4
278 %neg6 = xor i32 %3, -1
279 %tobool7 = icmp ne i32 %neg6, 0
280 %lnot8 = xor i1 %tobool7, true
281 %conv9 = zext i1 %lnot8 to i64
282 store i64 %conv9, ptr @_ZN8struct_210member_2_0E, align 8
287 @var_7 = external dso_local global i8, align 1
291 ; X64-O0: # %bb.0: # %entry
292 ; X64-O0-NEXT: movzbl var_7, %eax
293 ; X64-O0-NEXT: cmpb $0, var_7
294 ; X64-O0-NEXT: setne %cl
295 ; X64-O0-NEXT: xorb $-1, %cl
296 ; X64-O0-NEXT: andb $1, %cl
297 ; X64-O0-NEXT: movzbl %cl, %ecx
298 ; X64-O0-NEXT: xorl %ecx, %eax
299 ; X64-O0-NEXT: # kill: def $ax killed $ax killed $eax
300 ; X64-O0-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
301 ; X64-O0-NEXT: movzbl var_7, %eax
302 ; X64-O0-NEXT: # kill: def $ax killed $ax killed $eax
303 ; X64-O0-NEXT: cmpw $0, %ax
304 ; X64-O0-NEXT: setne %al
305 ; X64-O0-NEXT: xorb $-1, %al
306 ; X64-O0-NEXT: andb $1, %al
307 ; X64-O0-NEXT: movzbl %al, %eax
308 ; X64-O0-NEXT: movzbl var_7, %ecx
309 ; X64-O0-NEXT: cmpl %ecx, %eax
310 ; X64-O0-NEXT: sete %al
311 ; X64-O0-NEXT: andb $1, %al
312 ; X64-O0-NEXT: movzbl %al, %eax
313 ; X64-O0-NEXT: movw %ax, %cx
314 ; X64-O0-NEXT: # implicit-def: $rax
315 ; X64-O0-NEXT: movw %cx, (%rax)
319 ; X64: # %bb.0: # %entry
320 ; X64-NEXT: movzbl var_7(%rip), %eax
321 ; X64-NEXT: xorl %ecx, %ecx
322 ; X64-NEXT: testl %eax, %eax
324 ; X64-NEXT: movl %eax, %edx
325 ; X64-NEXT: xorl %ecx, %edx
326 ; X64-NEXT: movw %dx, -{{[0-9]+}}(%rsp)
327 ; X64-NEXT: xorl %edx, %edx
328 ; X64-NEXT: cmpl %eax, %ecx
330 ; X64-NEXT: movw %dx, (%rax)
334 ; X86-O0: # %bb.0: # %entry
335 ; X86-O0-NEXT: subl $2, %esp
336 ; X86-O0-NEXT: .cfi_def_cfa_offset 6
337 ; X86-O0-NEXT: movzbl var_7, %eax
338 ; X86-O0-NEXT: cmpb $0, var_7
339 ; X86-O0-NEXT: setne %cl
340 ; X86-O0-NEXT: xorb $-1, %cl
341 ; X86-O0-NEXT: andb $1, %cl
342 ; X86-O0-NEXT: movzbl %cl, %ecx
343 ; X86-O0-NEXT: xorl %ecx, %eax
344 ; X86-O0-NEXT: # kill: def $ax killed $ax killed $eax
345 ; X86-O0-NEXT: movw %ax, (%esp)
346 ; X86-O0-NEXT: movzbl var_7, %eax
347 ; X86-O0-NEXT: # kill: def $ax killed $ax killed $eax
348 ; X86-O0-NEXT: cmpw $0, %ax
349 ; X86-O0-NEXT: setne %al
350 ; X86-O0-NEXT: xorb $-1, %al
351 ; X86-O0-NEXT: andb $1, %al
352 ; X86-O0-NEXT: movzbl %al, %eax
353 ; X86-O0-NEXT: movzbl var_7, %ecx
354 ; X86-O0-NEXT: cmpl %ecx, %eax
355 ; X86-O0-NEXT: sete %al
356 ; X86-O0-NEXT: andb $1, %al
357 ; X86-O0-NEXT: movzbl %al, %eax
358 ; X86-O0-NEXT: movw %ax, %cx
359 ; X86-O0-NEXT: # implicit-def: $eax
360 ; X86-O0-NEXT: movw %cx, (%eax)
361 ; X86-O0-NEXT: addl $2, %esp
362 ; X86-O0-NEXT: .cfi_def_cfa_offset 4
366 ; X86: # %bb.0: # %entry
367 ; X86-NEXT: subl $2, %esp
368 ; X86-NEXT: .cfi_def_cfa_offset 6
369 ; X86-NEXT: movzbl var_7, %ecx
370 ; X86-NEXT: xorl %eax, %eax
371 ; X86-NEXT: testl %ecx, %ecx
373 ; X86-NEXT: movl %ecx, %edx
374 ; X86-NEXT: xorl %eax, %edx
375 ; X86-NEXT: movw %dx, (%esp)
376 ; X86-NEXT: xorl %edx, %edx
377 ; X86-NEXT: cmpl %ecx, %eax
379 ; X86-NEXT: movw %dx, (%eax)
380 ; X86-NEXT: addl $2, %esp
381 ; X86-NEXT: .cfi_def_cfa_offset 4
384 %a = alloca i16, align 2
385 %0 = load i8, ptr @var_7, align 1
386 %conv = zext i8 %0 to i32
387 %1 = load i8, ptr @var_7, align 1
388 %tobool = icmp ne i8 %1, 0
389 %lnot = xor i1 %tobool, true
390 %conv1 = zext i1 %lnot to i32
391 %xor = xor i32 %conv, %conv1
392 %conv2 = trunc i32 %xor to i16
393 store i16 %conv2, ptr %a, align 2
394 %2 = load i8, ptr @var_7, align 1
395 %conv3 = zext i8 %2 to i16
396 %tobool4 = icmp ne i16 %conv3, 0
397 %lnot5 = xor i1 %tobool4, true
398 %conv6 = zext i1 %lnot5 to i32
399 %3 = load i8, ptr @var_7, align 1
400 %conv7 = zext i8 %3 to i32
401 %cmp = icmp eq i32 %conv6, %conv7
402 %conv8 = zext i1 %cmp to i32
403 %conv9 = trunc i32 %conv8 to i16
404 store i16 %conv9, ptr undef, align 2
409 @var_13 = external dso_local global i32, align 4
410 @var_16 = external dso_local global i32, align 4
411 @var_46 = external dso_local global i32, align 4
413 define void @f3() #0 {
415 ; X64-O0: # %bb.0: # %entry
416 ; X64-O0-NEXT: movl var_13, %eax
417 ; X64-O0-NEXT: xorl $-1, %eax
418 ; X64-O0-NEXT: movl %eax, %eax
419 ; X64-O0-NEXT: # kill: def $rax killed $eax
420 ; X64-O0-NEXT: cmpl $0, var_13
421 ; X64-O0-NEXT: setne %cl
422 ; X64-O0-NEXT: xorb $-1, %cl
423 ; X64-O0-NEXT: andb $1, %cl
424 ; X64-O0-NEXT: movzbl %cl, %ecx
425 ; X64-O0-NEXT: # kill: def $rcx killed $ecx
426 ; X64-O0-NEXT: movl var_13, %edx
427 ; X64-O0-NEXT: xorl $-1, %edx
428 ; X64-O0-NEXT: xorl var_16, %edx
429 ; X64-O0-NEXT: movl %edx, %edx
430 ; X64-O0-NEXT: # kill: def $rdx killed $edx
431 ; X64-O0-NEXT: andq %rdx, %rcx
432 ; X64-O0-NEXT: orq %rcx, %rax
433 ; X64-O0-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
434 ; X64-O0-NEXT: movl var_13, %eax
435 ; X64-O0-NEXT: xorl $-1, %eax
436 ; X64-O0-NEXT: movl %eax, %eax
437 ; X64-O0-NEXT: # kill: def $rax killed $eax
438 ; X64-O0-NEXT: cmpl $0, var_13
439 ; X64-O0-NEXT: setne %cl
440 ; X64-O0-NEXT: xorb $-1, %cl
441 ; X64-O0-NEXT: andb $1, %cl
442 ; X64-O0-NEXT: movzbl %cl, %ecx
443 ; X64-O0-NEXT: # kill: def $rcx killed $ecx
444 ; X64-O0-NEXT: andq $0, %rcx
445 ; X64-O0-NEXT: orq %rcx, %rax
446 ; X64-O0-NEXT: # kill: def $eax killed $eax killed $rax
447 ; X64-O0-NEXT: movl %eax, var_46
451 ; X64: # %bb.0: # %entry
452 ; X64-NEXT: movl var_13(%rip), %eax
453 ; X64-NEXT: xorl %ecx, %ecx
454 ; X64-NEXT: testl %eax, %eax
455 ; X64-NEXT: notl %eax
457 ; X64-NEXT: movl var_16(%rip), %edx
458 ; X64-NEXT: xorl %eax, %edx
459 ; X64-NEXT: andl %edx, %ecx
460 ; X64-NEXT: orl %eax, %ecx
461 ; X64-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
462 ; X64-NEXT: movl %eax, var_46(%rip)
466 ; X86-O0: # %bb.0: # %entry
467 ; X86-O0-NEXT: pushl %ebp
468 ; X86-O0-NEXT: .cfi_def_cfa_offset 8
469 ; X86-O0-NEXT: .cfi_offset %ebp, -8
470 ; X86-O0-NEXT: movl %esp, %ebp
471 ; X86-O0-NEXT: .cfi_def_cfa_register %ebp
472 ; X86-O0-NEXT: pushl %esi
473 ; X86-O0-NEXT: andl $-8, %esp
474 ; X86-O0-NEXT: subl $16, %esp
475 ; X86-O0-NEXT: .cfi_offset %esi, -12
476 ; X86-O0-NEXT: movl var_13, %ecx
477 ; X86-O0-NEXT: movl %ecx, %eax
478 ; X86-O0-NEXT: notl %eax
479 ; X86-O0-NEXT: testl %ecx, %ecx
480 ; X86-O0-NEXT: sete %cl
481 ; X86-O0-NEXT: movzbl %cl, %ecx
482 ; X86-O0-NEXT: movl var_16, %esi
483 ; X86-O0-NEXT: movl %eax, %edx
484 ; X86-O0-NEXT: xorl %esi, %edx
485 ; X86-O0-NEXT: andl %edx, %ecx
486 ; X86-O0-NEXT: orl %ecx, %eax
487 ; X86-O0-NEXT: movl %eax, (%esp)
488 ; X86-O0-NEXT: movl $0, {{[0-9]+}}(%esp)
489 ; X86-O0-NEXT: movl var_13, %eax
490 ; X86-O0-NEXT: notl %eax
491 ; X86-O0-NEXT: movl %eax, var_46
492 ; X86-O0-NEXT: leal -4(%ebp), %esp
493 ; X86-O0-NEXT: popl %esi
494 ; X86-O0-NEXT: popl %ebp
495 ; X86-O0-NEXT: .cfi_def_cfa %esp, 4
499 ; X86: # %bb.0: # %entry
500 ; X86-NEXT: pushl %ebp
501 ; X86-NEXT: .cfi_def_cfa_offset 8
502 ; X86-NEXT: .cfi_offset %ebp, -8
503 ; X86-NEXT: movl %esp, %ebp
504 ; X86-NEXT: .cfi_def_cfa_register %ebp
505 ; X86-NEXT: andl $-8, %esp
506 ; X86-NEXT: subl $8, %esp
507 ; X86-NEXT: movl var_13, %eax
508 ; X86-NEXT: xorl %ecx, %ecx
509 ; X86-NEXT: testl %eax, %eax
510 ; X86-NEXT: notl %eax
512 ; X86-NEXT: movl var_16, %edx
513 ; X86-NEXT: xorl %eax, %edx
514 ; X86-NEXT: andl %ecx, %edx
515 ; X86-NEXT: orl %eax, %edx
516 ; X86-NEXT: movl %edx, (%esp)
517 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
518 ; X86-NEXT: movl %eax, var_46
519 ; X86-NEXT: movl %ebp, %esp
520 ; X86-NEXT: popl %ebp
521 ; X86-NEXT: .cfi_def_cfa %esp, 4
524 %a = alloca i64, align 8
525 %0 = load i32, ptr @var_13, align 4
526 %neg = xor i32 %0, -1
527 %conv = zext i32 %neg to i64
528 %1 = load i32, ptr @var_13, align 4
529 %tobool = icmp ne i32 %1, 0
530 %lnot = xor i1 %tobool, true
531 %conv1 = zext i1 %lnot to i64
532 %2 = load i32, ptr @var_13, align 4
533 %neg2 = xor i32 %2, -1
534 %3 = load i32, ptr @var_16, align 4
535 %xor = xor i32 %neg2, %3
536 %conv3 = zext i32 %xor to i64
537 %and = and i64 %conv1, %conv3
538 %or = or i64 %conv, %and
539 store i64 %or, ptr %a, align 8
540 %4 = load i32, ptr @var_13, align 4
541 %neg4 = xor i32 %4, -1
542 %conv5 = zext i32 %neg4 to i64
543 %5 = load i32, ptr @var_13, align 4
544 %tobool6 = icmp ne i32 %5, 0
545 %lnot7 = xor i1 %tobool6, true
546 %conv8 = zext i1 %lnot7 to i64
547 %and9 = and i64 %conv8, 0
548 %or10 = or i64 %conv5, %and9
549 %conv11 = trunc i64 %or10 to i32
550 store i32 %conv11, ptr @var_46, align 4