1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=-bmi < %s | FileCheck %s --check-prefix=CHECK-NOBMI
3 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+bmi < %s | FileCheck %s --check-prefix=CHECK-BMI
5 ; https://bugs.llvm.org/show_bug.cgi?id=37104
10 define i8 @out8_constmask(i8 %x, i8 %y) {
11 ; CHECK-NOBMI-LABEL: out8_constmask:
12 ; CHECK-NOBMI: # %bb.0:
13 ; CHECK-NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
14 ; CHECK-NOBMI-NEXT: # kill: def $edi killed $edi def $rdi
15 ; CHECK-NOBMI-NEXT: andb $15, %dil
16 ; CHECK-NOBMI-NEXT: andb $-16, %sil
17 ; CHECK-NOBMI-NEXT: leal (%rsi,%rdi), %eax
18 ; CHECK-NOBMI-NEXT: # kill: def $al killed $al killed $eax
19 ; CHECK-NOBMI-NEXT: retq
21 ; CHECK-BMI-LABEL: out8_constmask:
23 ; CHECK-BMI-NEXT: # kill: def $esi killed $esi def $rsi
24 ; CHECK-BMI-NEXT: # kill: def $edi killed $edi def $rdi
25 ; CHECK-BMI-NEXT: andb $15, %dil
26 ; CHECK-BMI-NEXT: andb $-16, %sil
27 ; CHECK-BMI-NEXT: leal (%rsi,%rdi), %eax
28 ; CHECK-BMI-NEXT: # kill: def $al killed $al killed $eax
29 ; CHECK-BMI-NEXT: retq
36 define i16 @out16_constmask(i16 %x, i16 %y) {
37 ; CHECK-NOBMI-LABEL: out16_constmask:
38 ; CHECK-NOBMI: # %bb.0:
39 ; CHECK-NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
40 ; CHECK-NOBMI-NEXT: # kill: def $edi killed $edi def $rdi
41 ; CHECK-NOBMI-NEXT: andl $3855, %edi # imm = 0xF0F
42 ; CHECK-NOBMI-NEXT: andl $-3856, %esi # imm = 0xF0F0
43 ; CHECK-NOBMI-NEXT: leal (%rsi,%rdi), %eax
44 ; CHECK-NOBMI-NEXT: # kill: def $ax killed $ax killed $eax
45 ; CHECK-NOBMI-NEXT: retq
47 ; CHECK-BMI-LABEL: out16_constmask:
49 ; CHECK-BMI-NEXT: # kill: def $esi killed $esi def $rsi
50 ; CHECK-BMI-NEXT: # kill: def $edi killed $edi def $rdi
51 ; CHECK-BMI-NEXT: andl $3855, %edi # imm = 0xF0F
52 ; CHECK-BMI-NEXT: andl $-3856, %esi # imm = 0xF0F0
53 ; CHECK-BMI-NEXT: leal (%rsi,%rdi), %eax
54 ; CHECK-BMI-NEXT: # kill: def $ax killed $ax killed $eax
55 ; CHECK-BMI-NEXT: retq
56 %mx = and i16 %x, 3855
57 %my = and i16 %y, -3856
62 define i32 @out32_constmask(i32 %x, i32 %y) {
63 ; CHECK-NOBMI-LABEL: out32_constmask:
64 ; CHECK-NOBMI: # %bb.0:
65 ; CHECK-NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
66 ; CHECK-NOBMI-NEXT: # kill: def $edi killed $edi def $rdi
67 ; CHECK-NOBMI-NEXT: andl $252645135, %edi # imm = 0xF0F0F0F
68 ; CHECK-NOBMI-NEXT: andl $-252645136, %esi # imm = 0xF0F0F0F0
69 ; CHECK-NOBMI-NEXT: leal (%rsi,%rdi), %eax
70 ; CHECK-NOBMI-NEXT: retq
72 ; CHECK-BMI-LABEL: out32_constmask:
74 ; CHECK-BMI-NEXT: # kill: def $esi killed $esi def $rsi
75 ; CHECK-BMI-NEXT: # kill: def $edi killed $edi def $rdi
76 ; CHECK-BMI-NEXT: andl $252645135, %edi # imm = 0xF0F0F0F
77 ; CHECK-BMI-NEXT: andl $-252645136, %esi # imm = 0xF0F0F0F0
78 ; CHECK-BMI-NEXT: leal (%rsi,%rdi), %eax
79 ; CHECK-BMI-NEXT: retq
80 %mx = and i32 %x, 252645135
81 %my = and i32 %y, -252645136
86 define i64 @out64_constmask(i64 %x, i64 %y) {
87 ; CHECK-NOBMI-LABEL: out64_constmask:
88 ; CHECK-NOBMI: # %bb.0:
89 ; CHECK-NOBMI-NEXT: movabsq $1085102592571150095, %rcx # imm = 0xF0F0F0F0F0F0F0F
90 ; CHECK-NOBMI-NEXT: andq %rdi, %rcx
91 ; CHECK-NOBMI-NEXT: movabsq $-1085102592571150096, %rax # imm = 0xF0F0F0F0F0F0F0F0
92 ; CHECK-NOBMI-NEXT: andq %rsi, %rax
93 ; CHECK-NOBMI-NEXT: orq %rcx, %rax
94 ; CHECK-NOBMI-NEXT: retq
96 ; CHECK-BMI-LABEL: out64_constmask:
98 ; CHECK-BMI-NEXT: movabsq $1085102592571150095, %rcx # imm = 0xF0F0F0F0F0F0F0F
99 ; CHECK-BMI-NEXT: andq %rdi, %rcx
100 ; CHECK-BMI-NEXT: movabsq $-1085102592571150096, %rax # imm = 0xF0F0F0F0F0F0F0F0
101 ; CHECK-BMI-NEXT: andq %rsi, %rax
102 ; CHECK-BMI-NEXT: orq %rcx, %rax
103 ; CHECK-BMI-NEXT: retq
104 %mx = and i64 %x, 1085102592571150095
105 %my = and i64 %y, -1085102592571150096
110 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
111 ; Should be the same as the previous one.
112 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
114 define i8 @in8_constmask(i8 %x, i8 %y) {
115 ; CHECK-NOBMI-LABEL: in8_constmask:
116 ; CHECK-NOBMI: # %bb.0:
117 ; CHECK-NOBMI-NEXT: movl %esi, %eax
118 ; CHECK-NOBMI-NEXT: xorl %esi, %edi
119 ; CHECK-NOBMI-NEXT: andb $15, %dil
120 ; CHECK-NOBMI-NEXT: xorb %dil, %al
121 ; CHECK-NOBMI-NEXT: # kill: def $al killed $al killed $eax
122 ; CHECK-NOBMI-NEXT: retq
124 ; CHECK-BMI-LABEL: in8_constmask:
125 ; CHECK-BMI: # %bb.0:
126 ; CHECK-BMI-NEXT: movl %esi, %eax
127 ; CHECK-BMI-NEXT: xorl %esi, %edi
128 ; CHECK-BMI-NEXT: andb $15, %dil
129 ; CHECK-BMI-NEXT: xorb %dil, %al
130 ; CHECK-BMI-NEXT: # kill: def $al killed $al killed $eax
131 ; CHECK-BMI-NEXT: retq
138 define i16 @in16_constmask(i16 %x, i16 %y) {
139 ; CHECK-NOBMI-LABEL: in16_constmask:
140 ; CHECK-NOBMI: # %bb.0:
141 ; CHECK-NOBMI-NEXT: movl %edi, %eax
142 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
143 ; CHECK-NOBMI-NEXT: andl $3855, %eax # imm = 0xF0F
144 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
145 ; CHECK-NOBMI-NEXT: # kill: def $ax killed $ax killed $eax
146 ; CHECK-NOBMI-NEXT: retq
148 ; CHECK-BMI-LABEL: in16_constmask:
149 ; CHECK-BMI: # %bb.0:
150 ; CHECK-BMI-NEXT: movl %edi, %eax
151 ; CHECK-BMI-NEXT: xorl %esi, %eax
152 ; CHECK-BMI-NEXT: andl $3855, %eax # imm = 0xF0F
153 ; CHECK-BMI-NEXT: xorl %esi, %eax
154 ; CHECK-BMI-NEXT: # kill: def $ax killed $ax killed $eax
155 ; CHECK-BMI-NEXT: retq
157 %n1 = and i16 %n0, 3855
162 define i32 @in32_constmask(i32 %x, i32 %y) {
163 ; CHECK-NOBMI-LABEL: in32_constmask:
164 ; CHECK-NOBMI: # %bb.0:
165 ; CHECK-NOBMI-NEXT: movl %edi, %eax
166 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
167 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
168 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
169 ; CHECK-NOBMI-NEXT: retq
171 ; CHECK-BMI-LABEL: in32_constmask:
172 ; CHECK-BMI: # %bb.0:
173 ; CHECK-BMI-NEXT: movl %edi, %eax
174 ; CHECK-BMI-NEXT: xorl %esi, %eax
175 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
176 ; CHECK-BMI-NEXT: xorl %esi, %eax
177 ; CHECK-BMI-NEXT: retq
179 %n1 = and i32 %n0, 252645135
184 define i64 @in64_constmask(i64 %x, i64 %y) {
185 ; CHECK-NOBMI-LABEL: in64_constmask:
186 ; CHECK-NOBMI: # %bb.0:
187 ; CHECK-NOBMI-NEXT: xorq %rsi, %rdi
188 ; CHECK-NOBMI-NEXT: movabsq $1085102592571150095, %rax # imm = 0xF0F0F0F0F0F0F0F
189 ; CHECK-NOBMI-NEXT: andq %rdi, %rax
190 ; CHECK-NOBMI-NEXT: xorq %rsi, %rax
191 ; CHECK-NOBMI-NEXT: retq
193 ; CHECK-BMI-LABEL: in64_constmask:
194 ; CHECK-BMI: # %bb.0:
195 ; CHECK-BMI-NEXT: xorq %rsi, %rdi
196 ; CHECK-BMI-NEXT: movabsq $1085102592571150095, %rax # imm = 0xF0F0F0F0F0F0F0F
197 ; CHECK-BMI-NEXT: andq %rdi, %rax
198 ; CHECK-BMI-NEXT: xorq %rsi, %rax
199 ; CHECK-BMI-NEXT: retq
201 %n1 = and i64 %n0, 1085102592571150095
206 ; ============================================================================ ;
207 ; Constant Commutativity tests.
208 ; ============================================================================ ;
210 define i32 @in_constmask_commutativity_0_1(i32 %x, i32 %y) {
211 ; CHECK-NOBMI-LABEL: in_constmask_commutativity_0_1:
212 ; CHECK-NOBMI: # %bb.0:
213 ; CHECK-NOBMI-NEXT: movl %edi, %eax
214 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
215 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
216 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
217 ; CHECK-NOBMI-NEXT: retq
219 ; CHECK-BMI-LABEL: in_constmask_commutativity_0_1:
220 ; CHECK-BMI: # %bb.0:
221 ; CHECK-BMI-NEXT: movl %edi, %eax
222 ; CHECK-BMI-NEXT: xorl %esi, %eax
223 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
224 ; CHECK-BMI-NEXT: xorl %esi, %eax
225 ; CHECK-BMI-NEXT: retq
227 %n1 = and i32 %n0, 252645135
228 %r = xor i32 %y, %n1 ; swapped
232 define i32 @in_constmask_commutativity_1_0(i32 %x, i32 %y) {
233 ; CHECK-NOBMI-LABEL: in_constmask_commutativity_1_0:
234 ; CHECK-NOBMI: # %bb.0:
235 ; CHECK-NOBMI-NEXT: movl %esi, %eax
236 ; CHECK-NOBMI-NEXT: xorl %edi, %eax
237 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
238 ; CHECK-NOBMI-NEXT: xorl %edi, %eax
239 ; CHECK-NOBMI-NEXT: retq
241 ; CHECK-BMI-LABEL: in_constmask_commutativity_1_0:
242 ; CHECK-BMI: # %bb.0:
243 ; CHECK-BMI-NEXT: movl %esi, %eax
244 ; CHECK-BMI-NEXT: xorl %edi, %eax
245 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
246 ; CHECK-BMI-NEXT: xorl %edi, %eax
247 ; CHECK-BMI-NEXT: retq
249 %n1 = and i32 %n0, 252645135
250 %r = xor i32 %n1, %x ; %x instead of %y
254 define i32 @in_constmask_commutativity_1_1(i32 %x, i32 %y) {
255 ; CHECK-NOBMI-LABEL: in_constmask_commutativity_1_1:
256 ; CHECK-NOBMI: # %bb.0:
257 ; CHECK-NOBMI-NEXT: movl %esi, %eax
258 ; CHECK-NOBMI-NEXT: xorl %edi, %eax
259 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
260 ; CHECK-NOBMI-NEXT: xorl %edi, %eax
261 ; CHECK-NOBMI-NEXT: retq
263 ; CHECK-BMI-LABEL: in_constmask_commutativity_1_1:
264 ; CHECK-BMI: # %bb.0:
265 ; CHECK-BMI-NEXT: movl %esi, %eax
266 ; CHECK-BMI-NEXT: xorl %edi, %eax
267 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
268 ; CHECK-BMI-NEXT: xorl %edi, %eax
269 ; CHECK-BMI-NEXT: retq
271 %n1 = and i32 %n0, 252645135
272 %r = xor i32 %x, %n1 ; swapped, %x instead of %y
276 ; ============================================================================ ;
278 ; ============================================================================ ;
280 define i32 @in_complex_y0_constmask(i32 %x, i32 %y_hi, i32 %y_low) {
281 ; CHECK-NOBMI-LABEL: in_complex_y0_constmask:
282 ; CHECK-NOBMI: # %bb.0:
283 ; CHECK-NOBMI-NEXT: movl %edi, %eax
284 ; CHECK-NOBMI-NEXT: andl %edx, %esi
285 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
286 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
287 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
288 ; CHECK-NOBMI-NEXT: retq
290 ; CHECK-BMI-LABEL: in_complex_y0_constmask:
291 ; CHECK-BMI: # %bb.0:
292 ; CHECK-BMI-NEXT: movl %edi, %eax
293 ; CHECK-BMI-NEXT: andl %edx, %esi
294 ; CHECK-BMI-NEXT: xorl %esi, %eax
295 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
296 ; CHECK-BMI-NEXT: xorl %esi, %eax
297 ; CHECK-BMI-NEXT: retq
298 %y = and i32 %y_hi, %y_low
300 %n1 = and i32 %n0, 252645135
305 define i32 @in_complex_y1_constmask(i32 %x, i32 %y_hi, i32 %y_low) {
306 ; CHECK-NOBMI-LABEL: in_complex_y1_constmask:
307 ; CHECK-NOBMI: # %bb.0:
308 ; CHECK-NOBMI-NEXT: movl %edi, %eax
309 ; CHECK-NOBMI-NEXT: andl %edx, %esi
310 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
311 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
312 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
313 ; CHECK-NOBMI-NEXT: retq
315 ; CHECK-BMI-LABEL: in_complex_y1_constmask:
316 ; CHECK-BMI: # %bb.0:
317 ; CHECK-BMI-NEXT: movl %edi, %eax
318 ; CHECK-BMI-NEXT: andl %edx, %esi
319 ; CHECK-BMI-NEXT: xorl %esi, %eax
320 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
321 ; CHECK-BMI-NEXT: xorl %esi, %eax
322 ; CHECK-BMI-NEXT: retq
323 %y = and i32 %y_hi, %y_low
325 %n1 = and i32 %n0, 252645135
330 ; ============================================================================ ;
331 ; Negative tests. Should not be folded.
332 ; ============================================================================ ;
336 declare void @use32(i32) nounwind
338 define i32 @in_multiuse_A_constmask(i32 %x, i32 %y, i32 %z) nounwind {
339 ; CHECK-NOBMI-LABEL: in_multiuse_A_constmask:
340 ; CHECK-NOBMI: # %bb.0:
341 ; CHECK-NOBMI-NEXT: pushq %rbp
342 ; CHECK-NOBMI-NEXT: pushq %rbx
343 ; CHECK-NOBMI-NEXT: pushq %rax
344 ; CHECK-NOBMI-NEXT: movl %esi, %ebx
345 ; CHECK-NOBMI-NEXT: movl %edi, %ebp
346 ; CHECK-NOBMI-NEXT: xorl %esi, %ebp
347 ; CHECK-NOBMI-NEXT: andl $252645135, %ebp # imm = 0xF0F0F0F
348 ; CHECK-NOBMI-NEXT: movl %ebp, %edi
349 ; CHECK-NOBMI-NEXT: callq use32
350 ; CHECK-NOBMI-NEXT: xorl %ebx, %ebp
351 ; CHECK-NOBMI-NEXT: movl %ebp, %eax
352 ; CHECK-NOBMI-NEXT: addq $8, %rsp
353 ; CHECK-NOBMI-NEXT: popq %rbx
354 ; CHECK-NOBMI-NEXT: popq %rbp
355 ; CHECK-NOBMI-NEXT: retq
357 ; CHECK-BMI-LABEL: in_multiuse_A_constmask:
358 ; CHECK-BMI: # %bb.0:
359 ; CHECK-BMI-NEXT: pushq %rbp
360 ; CHECK-BMI-NEXT: pushq %rbx
361 ; CHECK-BMI-NEXT: pushq %rax
362 ; CHECK-BMI-NEXT: movl %esi, %ebx
363 ; CHECK-BMI-NEXT: movl %edi, %ebp
364 ; CHECK-BMI-NEXT: xorl %esi, %ebp
365 ; CHECK-BMI-NEXT: andl $252645135, %ebp # imm = 0xF0F0F0F
366 ; CHECK-BMI-NEXT: movl %ebp, %edi
367 ; CHECK-BMI-NEXT: callq use32
368 ; CHECK-BMI-NEXT: xorl %ebx, %ebp
369 ; CHECK-BMI-NEXT: movl %ebp, %eax
370 ; CHECK-BMI-NEXT: addq $8, %rsp
371 ; CHECK-BMI-NEXT: popq %rbx
372 ; CHECK-BMI-NEXT: popq %rbp
373 ; CHECK-BMI-NEXT: retq
375 %n1 = and i32 %n0, 252645135
376 call void @use32(i32 %n1)
381 define i32 @in_multiuse_B_constmask(i32 %x, i32 %y, i32 %z) nounwind {
382 ; CHECK-NOBMI-LABEL: in_multiuse_B_constmask:
383 ; CHECK-NOBMI: # %bb.0:
384 ; CHECK-NOBMI-NEXT: pushq %rbp
385 ; CHECK-NOBMI-NEXT: pushq %rbx
386 ; CHECK-NOBMI-NEXT: pushq %rax
387 ; CHECK-NOBMI-NEXT: movl %esi, %ebx
388 ; CHECK-NOBMI-NEXT: xorl %esi, %edi
389 ; CHECK-NOBMI-NEXT: movl %edi, %ebp
390 ; CHECK-NOBMI-NEXT: andl $252645135, %ebp # imm = 0xF0F0F0F
391 ; CHECK-NOBMI-NEXT: callq use32
392 ; CHECK-NOBMI-NEXT: xorl %ebx, %ebp
393 ; CHECK-NOBMI-NEXT: movl %ebp, %eax
394 ; CHECK-NOBMI-NEXT: addq $8, %rsp
395 ; CHECK-NOBMI-NEXT: popq %rbx
396 ; CHECK-NOBMI-NEXT: popq %rbp
397 ; CHECK-NOBMI-NEXT: retq
399 ; CHECK-BMI-LABEL: in_multiuse_B_constmask:
400 ; CHECK-BMI: # %bb.0:
401 ; CHECK-BMI-NEXT: pushq %rbp
402 ; CHECK-BMI-NEXT: pushq %rbx
403 ; CHECK-BMI-NEXT: pushq %rax
404 ; CHECK-BMI-NEXT: movl %esi, %ebx
405 ; CHECK-BMI-NEXT: xorl %esi, %edi
406 ; CHECK-BMI-NEXT: movl %edi, %ebp
407 ; CHECK-BMI-NEXT: andl $252645135, %ebp # imm = 0xF0F0F0F
408 ; CHECK-BMI-NEXT: callq use32
409 ; CHECK-BMI-NEXT: xorl %ebx, %ebp
410 ; CHECK-BMI-NEXT: movl %ebp, %eax
411 ; CHECK-BMI-NEXT: addq $8, %rsp
412 ; CHECK-BMI-NEXT: popq %rbx
413 ; CHECK-BMI-NEXT: popq %rbp
414 ; CHECK-BMI-NEXT: retq
416 %n1 = and i32 %n0, 252645135
417 call void @use32(i32 %n0)
422 ; Various bad variants
424 define i32 @n0_badconstmask(i32 %x, i32 %y) {
425 ; CHECK-NOBMI-LABEL: n0_badconstmask:
426 ; CHECK-NOBMI: # %bb.0:
427 ; CHECK-NOBMI-NEXT: movl %esi, %eax
428 ; CHECK-NOBMI-NEXT: andl $252645135, %edi # imm = 0xF0F0F0F
429 ; CHECK-NOBMI-NEXT: andl $-252645135, %eax # imm = 0xF0F0F0F1
430 ; CHECK-NOBMI-NEXT: orl %edi, %eax
431 ; CHECK-NOBMI-NEXT: retq
433 ; CHECK-BMI-LABEL: n0_badconstmask:
434 ; CHECK-BMI: # %bb.0:
435 ; CHECK-BMI-NEXT: movl %esi, %eax
436 ; CHECK-BMI-NEXT: andl $252645135, %edi # imm = 0xF0F0F0F
437 ; CHECK-BMI-NEXT: andl $-252645135, %eax # imm = 0xF0F0F0F1
438 ; CHECK-BMI-NEXT: orl %edi, %eax
439 ; CHECK-BMI-NEXT: retq
440 %mx = and i32 %x, 252645135
441 %my = and i32 %y, -252645135 ; instead of -252645136
446 define i32 @n1_thirdvar_constmask(i32 %x, i32 %y, i32 %z) {
447 ; CHECK-NOBMI-LABEL: n1_thirdvar_constmask:
448 ; CHECK-NOBMI: # %bb.0:
449 ; CHECK-NOBMI-NEXT: movl %edi, %eax
450 ; CHECK-NOBMI-NEXT: xorl %esi, %eax
451 ; CHECK-NOBMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
452 ; CHECK-NOBMI-NEXT: xorl %edx, %eax
453 ; CHECK-NOBMI-NEXT: retq
455 ; CHECK-BMI-LABEL: n1_thirdvar_constmask:
456 ; CHECK-BMI: # %bb.0:
457 ; CHECK-BMI-NEXT: movl %edi, %eax
458 ; CHECK-BMI-NEXT: xorl %esi, %eax
459 ; CHECK-BMI-NEXT: andl $252645135, %eax # imm = 0xF0F0F0F
460 ; CHECK-BMI-NEXT: xorl %edx, %eax
461 ; CHECK-BMI-NEXT: retq
463 %n1 = and i32 %n0, 252645135
464 %r = xor i32 %n1, %z ; instead of %y