[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / CodeGen / X86 / isel-or.ll
blobad11e4e5bd3b150996eb2fc2872b6661c6202588
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefixes=X86,SDAG-X86
3 ; RUN: llc < %s -mtriple=i686-- -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=X86,FASTISEL-X86
4 ; RUN: llc < %s -mtriple=i686-- -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X86,GISEL-X86
5 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=X64,SDAG-X64
6 ; RUN: llc < %s -mtriple=x86_64-- -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=X64,FASTISEL-X64
7 ; RUN: llc < %s -mtriple=x86_64-- -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X64,GISEL-X64
9 define i1 @or_i1(i1 %a, i1 %b) {
10 ; SDAG-X86-LABEL: or_i1:
11 ; SDAG-X86:       # %bb.0:
12 ; SDAG-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
13 ; SDAG-X86-NEXT:    orb {{[0-9]+}}(%esp), %al
14 ; SDAG-X86-NEXT:    retl
16 ; FASTISEL-X86-LABEL: or_i1:
17 ; FASTISEL-X86:       # %bb.0:
18 ; FASTISEL-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
19 ; FASTISEL-X86-NEXT:    orb {{[0-9]+}}(%esp), %al
20 ; FASTISEL-X86-NEXT:    retl
22 ; GISEL-X86-LABEL: or_i1:
23 ; GISEL-X86:       # %bb.0:
24 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
25 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
26 ; GISEL-X86-NEXT:    orb %cl, %al
27 ; GISEL-X86-NEXT:    # kill: def $al killed $al killed $eax
28 ; GISEL-X86-NEXT:    retl
30 ; SDAG-X64-LABEL: or_i1:
31 ; SDAG-X64:       # %bb.0:
32 ; SDAG-X64-NEXT:    movl %edi, %eax
33 ; SDAG-X64-NEXT:    orl %esi, %eax
34 ; SDAG-X64-NEXT:    # kill: def $al killed $al killed $eax
35 ; SDAG-X64-NEXT:    retq
37 ; FASTISEL-X64-LABEL: or_i1:
38 ; FASTISEL-X64:       # %bb.0:
39 ; FASTISEL-X64-NEXT:    movl %edi, %eax
40 ; FASTISEL-X64-NEXT:    orb %sil, %al
41 ; FASTISEL-X64-NEXT:    # kill: def $al killed $al killed $eax
42 ; FASTISEL-X64-NEXT:    retq
44 ; GISEL-X64-LABEL: or_i1:
45 ; GISEL-X64:       # %bb.0:
46 ; GISEL-X64-NEXT:    movl %esi, %eax
47 ; GISEL-X64-NEXT:    orb %dil, %al
48 ; GISEL-X64-NEXT:    # kill: def $al killed $al killed $eax
49 ; GISEL-X64-NEXT:    retq
50   %c = or i1 %a, %b
51   ret i1 %c
54 define i8 @or_i8(i8 %a, i8 %b) {
55 ; SDAG-X86-LABEL: or_i8:
56 ; SDAG-X86:       # %bb.0:
57 ; SDAG-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
58 ; SDAG-X86-NEXT:    orb {{[0-9]+}}(%esp), %al
59 ; SDAG-X86-NEXT:    retl
61 ; FASTISEL-X86-LABEL: or_i8:
62 ; FASTISEL-X86:       # %bb.0:
63 ; FASTISEL-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
64 ; FASTISEL-X86-NEXT:    orb {{[0-9]+}}(%esp), %al
65 ; FASTISEL-X86-NEXT:    retl
67 ; GISEL-X86-LABEL: or_i8:
68 ; GISEL-X86:       # %bb.0:
69 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
70 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
71 ; GISEL-X86-NEXT:    orb %cl, %al
72 ; GISEL-X86-NEXT:    # kill: def $al killed $al killed $eax
73 ; GISEL-X86-NEXT:    retl
75 ; SDAG-X64-LABEL: or_i8:
76 ; SDAG-X64:       # %bb.0:
77 ; SDAG-X64-NEXT:    movl %edi, %eax
78 ; SDAG-X64-NEXT:    orl %esi, %eax
79 ; SDAG-X64-NEXT:    # kill: def $al killed $al killed $eax
80 ; SDAG-X64-NEXT:    retq
82 ; FASTISEL-X64-LABEL: or_i8:
83 ; FASTISEL-X64:       # %bb.0:
84 ; FASTISEL-X64-NEXT:    movl %edi, %eax
85 ; FASTISEL-X64-NEXT:    orb %sil, %al
86 ; FASTISEL-X64-NEXT:    # kill: def $al killed $al killed $eax
87 ; FASTISEL-X64-NEXT:    retq
89 ; GISEL-X64-LABEL: or_i8:
90 ; GISEL-X64:       # %bb.0:
91 ; GISEL-X64-NEXT:    movl %esi, %eax
92 ; GISEL-X64-NEXT:    orb %dil, %al
93 ; GISEL-X64-NEXT:    # kill: def $al killed $al killed $eax
94 ; GISEL-X64-NEXT:    retq
95   %c = or i8 %a, %b
96   ret i8 %c
99 define i16 @or_i16(i16 %a, i16 %b) {
100 ; SDAG-X86-LABEL: or_i16:
101 ; SDAG-X86:       # %bb.0:
102 ; SDAG-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax
103 ; SDAG-X86-NEXT:    orw {{[0-9]+}}(%esp), %ax
104 ; SDAG-X86-NEXT:    retl
106 ; FASTISEL-X86-LABEL: or_i16:
107 ; FASTISEL-X86:       # %bb.0:
108 ; FASTISEL-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax
109 ; FASTISEL-X86-NEXT:    orw {{[0-9]+}}(%esp), %ax
110 ; FASTISEL-X86-NEXT:    retl
112 ; GISEL-X86-LABEL: or_i16:
113 ; GISEL-X86:       # %bb.0:
114 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
115 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
116 ; GISEL-X86-NEXT:    orw %cx, %ax
117 ; GISEL-X86-NEXT:    # kill: def $ax killed $ax killed $eax
118 ; GISEL-X86-NEXT:    retl
120 ; SDAG-X64-LABEL: or_i16:
121 ; SDAG-X64:       # %bb.0:
122 ; SDAG-X64-NEXT:    movl %edi, %eax
123 ; SDAG-X64-NEXT:    orl %esi, %eax
124 ; SDAG-X64-NEXT:    # kill: def $ax killed $ax killed $eax
125 ; SDAG-X64-NEXT:    retq
127 ; FASTISEL-X64-LABEL: or_i16:
128 ; FASTISEL-X64:       # %bb.0:
129 ; FASTISEL-X64-NEXT:    movl %edi, %eax
130 ; FASTISEL-X64-NEXT:    orw %si, %ax
131 ; FASTISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
132 ; FASTISEL-X64-NEXT:    retq
134 ; GISEL-X64-LABEL: or_i16:
135 ; GISEL-X64:       # %bb.0:
136 ; GISEL-X64-NEXT:    movl %esi, %eax
137 ; GISEL-X64-NEXT:    orw %di, %ax
138 ; GISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
139 ; GISEL-X64-NEXT:    retq
140   %c = or i16 %a, %b
141   ret i16 %c
144 define i32 @or_i32(i32 %a, i32 %b) {
145 ; X86-LABEL: or_i32:
146 ; X86:       # %bb.0:
147 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
148 ; X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
149 ; X86-NEXT:    retl
151 ; SDAG-X64-LABEL: or_i32:
152 ; SDAG-X64:       # %bb.0:
153 ; SDAG-X64-NEXT:    movl %edi, %eax
154 ; SDAG-X64-NEXT:    orl %esi, %eax
155 ; SDAG-X64-NEXT:    retq
157 ; FASTISEL-X64-LABEL: or_i32:
158 ; FASTISEL-X64:       # %bb.0:
159 ; FASTISEL-X64-NEXT:    movl %edi, %eax
160 ; FASTISEL-X64-NEXT:    orl %esi, %eax
161 ; FASTISEL-X64-NEXT:    retq
163 ; GISEL-X64-LABEL: or_i32:
164 ; GISEL-X64:       # %bb.0:
165 ; GISEL-X64-NEXT:    movl %esi, %eax
166 ; GISEL-X64-NEXT:    orl %edi, %eax
167 ; GISEL-X64-NEXT:    retq
168   %c = or i32 %a, %b
169   ret i32 %c
172 define i64 @or_i64(i64 %a, i64 %b) nounwind {
173 ; SDAG-X86-LABEL: or_i64:
174 ; SDAG-X86:       # %bb.0:
175 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
176 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
177 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
178 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %edx
179 ; SDAG-X86-NEXT:    retl
181 ; FASTISEL-X86-LABEL: or_i64:
182 ; FASTISEL-X86:       # %bb.0:
183 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
184 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
185 ; FASTISEL-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
186 ; FASTISEL-X86-NEXT:    orl {{[0-9]+}}(%esp), %edx
187 ; FASTISEL-X86-NEXT:    retl
189 ; GISEL-X86-LABEL: or_i64:
190 ; GISEL-X86:       # %bb.0:
191 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
192 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
193 ; GISEL-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
194 ; GISEL-X86-NEXT:    orl {{[0-9]+}}(%esp), %edx
195 ; GISEL-X86-NEXT:    retl
197 ; SDAG-X64-LABEL: or_i64:
198 ; SDAG-X64:       # %bb.0:
199 ; SDAG-X64-NEXT:    movq %rdi, %rax
200 ; SDAG-X64-NEXT:    orq %rsi, %rax
201 ; SDAG-X64-NEXT:    retq
203 ; FASTISEL-X64-LABEL: or_i64:
204 ; FASTISEL-X64:       # %bb.0:
205 ; FASTISEL-X64-NEXT:    movq %rdi, %rax
206 ; FASTISEL-X64-NEXT:    orq %rsi, %rax
207 ; FASTISEL-X64-NEXT:    retq
209 ; GISEL-X64-LABEL: or_i64:
210 ; GISEL-X64:       # %bb.0:
211 ; GISEL-X64-NEXT:    movq %rsi, %rax
212 ; GISEL-X64-NEXT:    orq %rdi, %rax
213 ; GISEL-X64-NEXT:    retq
214   %c = or i64 %a, %b
215   ret i64 %c
218 define i8 @or_imm8_i8(i8 %a) {
219 ; SDAG-X86-LABEL: or_imm8_i8:
220 ; SDAG-X86:       # %bb.0:
221 ; SDAG-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
222 ; SDAG-X86-NEXT:    orb $1, %al
223 ; SDAG-X86-NEXT:    retl
225 ; FASTISEL-X86-LABEL: or_imm8_i8:
226 ; FASTISEL-X86:       # %bb.0:
227 ; FASTISEL-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
228 ; FASTISEL-X86-NEXT:    orb $1, %al
229 ; FASTISEL-X86-NEXT:    retl
231 ; GISEL-X86-LABEL: or_imm8_i8:
232 ; GISEL-X86:       # %bb.0:
233 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
234 ; GISEL-X86-NEXT:    orb $1, %al
235 ; GISEL-X86-NEXT:    # kill: def $al killed $al killed $eax
236 ; GISEL-X86-NEXT:    retl
238 ; X64-LABEL: or_imm8_i8:
239 ; X64:       # %bb.0:
240 ; X64-NEXT:    movl %edi, %eax
241 ; X64-NEXT:    orb $1, %al
242 ; X64-NEXT:    # kill: def $al killed $al killed $eax
243 ; X64-NEXT:    retq
244   %c = or i8 %a, 1
245   ret i8 %c
248 define i16 @or_imm8_i16(i16 %a) {
249 ; SDAG-X86-LABEL: or_imm8_i16:
250 ; SDAG-X86:       # %bb.0:
251 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
252 ; SDAG-X86-NEXT:    orl $6, %eax
253 ; SDAG-X86-NEXT:    # kill: def $ax killed $ax killed $eax
254 ; SDAG-X86-NEXT:    retl
256 ; FASTISEL-X86-LABEL: or_imm8_i16:
257 ; FASTISEL-X86:       # %bb.0:
258 ; FASTISEL-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax
259 ; FASTISEL-X86-NEXT:    orw $6, %ax
260 ; FASTISEL-X86-NEXT:    retl
262 ; GISEL-X86-LABEL: or_imm8_i16:
263 ; GISEL-X86:       # %bb.0:
264 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
265 ; GISEL-X86-NEXT:    orw $6, %ax
266 ; GISEL-X86-NEXT:    # kill: def $ax killed $ax killed $eax
267 ; GISEL-X86-NEXT:    retl
269 ; SDAG-X64-LABEL: or_imm8_i16:
270 ; SDAG-X64:       # %bb.0:
271 ; SDAG-X64-NEXT:    movl %edi, %eax
272 ; SDAG-X64-NEXT:    orl $6, %eax
273 ; SDAG-X64-NEXT:    # kill: def $ax killed $ax killed $eax
274 ; SDAG-X64-NEXT:    retq
276 ; FASTISEL-X64-LABEL: or_imm8_i16:
277 ; FASTISEL-X64:       # %bb.0:
278 ; FASTISEL-X64-NEXT:    movl %edi, %eax
279 ; FASTISEL-X64-NEXT:    orw $6, %ax
280 ; FASTISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
281 ; FASTISEL-X64-NEXT:    retq
283 ; GISEL-X64-LABEL: or_imm8_i16:
284 ; GISEL-X64:       # %bb.0:
285 ; GISEL-X64-NEXT:    movl %edi, %eax
286 ; GISEL-X64-NEXT:    orw $6, %ax
287 ; GISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
288 ; GISEL-X64-NEXT:    retq
289   %c = or i16 %a, 6
290   ret i16 %c
293 define i32 @or_imm8_i32(i32 %a) {
294 ; X86-LABEL: or_imm8_i32:
295 ; X86:       # %bb.0:
296 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
297 ; X86-NEXT:    orl $-5, %eax
298 ; X86-NEXT:    retl
300 ; X64-LABEL: or_imm8_i32:
301 ; X64:       # %bb.0:
302 ; X64-NEXT:    movl %edi, %eax
303 ; X64-NEXT:    orl $-5, %eax
304 ; X64-NEXT:    retq
305   %c = or i32 %a, -5
306   ret i32 %c
309 define i64 @or_imm8_i64(i64 %a) {
310 ; SDAG-X86-LABEL: or_imm8_i64:
311 ; SDAG-X86:       # %bb.0:
312 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
313 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
314 ; SDAG-X86-NEXT:    orl $1, %eax
315 ; SDAG-X86-NEXT:    retl
317 ; FASTISEL-X86-LABEL: or_imm8_i64:
318 ; FASTISEL-X86:       # %bb.0:
319 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
320 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
321 ; FASTISEL-X86-NEXT:    orl $1, %eax
322 ; FASTISEL-X86-NEXT:    retl
324 ; GISEL-X86-LABEL: or_imm8_i64:
325 ; GISEL-X86:       # %bb.0:
326 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
327 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
328 ; GISEL-X86-NEXT:    orl $1, %eax
329 ; GISEL-X86-NEXT:    orl $0, %edx
330 ; GISEL-X86-NEXT:    retl
332 ; X64-LABEL: or_imm8_i64:
333 ; X64:       # %bb.0:
334 ; X64-NEXT:    movq %rdi, %rax
335 ; X64-NEXT:    orq $1, %rax
336 ; X64-NEXT:    retq
337   %c = or i64 %a, 1
338   ret i64 %c
341 define i16 @or_imm16_i16(i16 %a) {
342 ; SDAG-X86-LABEL: or_imm16_i16:
343 ; SDAG-X86:       # %bb.0:
344 ; SDAG-X86-NEXT:    movl $1023, %eax # imm = 0x3FF
345 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
346 ; SDAG-X86-NEXT:    # kill: def $ax killed $ax killed $eax
347 ; SDAG-X86-NEXT:    retl
349 ; FASTISEL-X86-LABEL: or_imm16_i16:
350 ; FASTISEL-X86:       # %bb.0:
351 ; FASTISEL-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax
352 ; FASTISEL-X86-NEXT:    orw $1023, %ax # imm = 0x3FF
353 ; FASTISEL-X86-NEXT:    retl
355 ; GISEL-X86-LABEL: or_imm16_i16:
356 ; GISEL-X86:       # %bb.0:
357 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
358 ; GISEL-X86-NEXT:    orw $1023, %ax # imm = 0x3FF
359 ; GISEL-X86-NEXT:    # kill: def $ax killed $ax killed $eax
360 ; GISEL-X86-NEXT:    retl
362 ; SDAG-X64-LABEL: or_imm16_i16:
363 ; SDAG-X64:       # %bb.0:
364 ; SDAG-X64-NEXT:    movl %edi, %eax
365 ; SDAG-X64-NEXT:    orl $1023, %eax # imm = 0x3FF
366 ; SDAG-X64-NEXT:    # kill: def $ax killed $ax killed $eax
367 ; SDAG-X64-NEXT:    retq
369 ; FASTISEL-X64-LABEL: or_imm16_i16:
370 ; FASTISEL-X64:       # %bb.0:
371 ; FASTISEL-X64-NEXT:    movl %edi, %eax
372 ; FASTISEL-X64-NEXT:    orw $1023, %ax # imm = 0x3FF
373 ; FASTISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
374 ; FASTISEL-X64-NEXT:    retq
376 ; GISEL-X64-LABEL: or_imm16_i16:
377 ; GISEL-X64:       # %bb.0:
378 ; GISEL-X64-NEXT:    movl %edi, %eax
379 ; GISEL-X64-NEXT:    orw $1023, %ax # imm = 0x3FF
380 ; GISEL-X64-NEXT:    # kill: def $ax killed $ax killed $eax
381 ; GISEL-X64-NEXT:    retq
382   %c = or i16 %a, 1023
383   ret i16 %c
386 define i32 @or_imm16_i32(i32 %a) {
387 ; SDAG-X86-LABEL: or_imm16_i32:
388 ; SDAG-X86:       # %bb.0:
389 ; SDAG-X86-NEXT:    movl $2044, %eax # imm = 0x7FC
390 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
391 ; SDAG-X86-NEXT:    retl
393 ; FASTISEL-X86-LABEL: or_imm16_i32:
394 ; FASTISEL-X86:       # %bb.0:
395 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
396 ; FASTISEL-X86-NEXT:    orl $2044, %eax # imm = 0x7FC
397 ; FASTISEL-X86-NEXT:    retl
399 ; GISEL-X86-LABEL: or_imm16_i32:
400 ; GISEL-X86:       # %bb.0:
401 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
402 ; GISEL-X86-NEXT:    orl $2044, %eax # imm = 0x7FC
403 ; GISEL-X86-NEXT:    retl
405 ; X64-LABEL: or_imm16_i32:
406 ; X64:       # %bb.0:
407 ; X64-NEXT:    movl %edi, %eax
408 ; X64-NEXT:    orl $2044, %eax # imm = 0x7FC
409 ; X64-NEXT:    retq
410   %c = or i32 %a, 2044
411   ret i32 %c
414 define i64 @or_imm16_i64(i64 %a) {
415 ; SDAG-X86-LABEL: or_imm16_i64:
416 ; SDAG-X86:       # %bb.0:
417 ; SDAG-X86-NEXT:    movl $-5022, %eax # imm = 0xEC62
418 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
419 ; SDAG-X86-NEXT:    movl $-1, %edx
420 ; SDAG-X86-NEXT:    retl
422 ; FASTISEL-X86-LABEL: or_imm16_i64:
423 ; FASTISEL-X86:       # %bb.0:
424 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
425 ; FASTISEL-X86-NEXT:    orl $-5022, %eax # imm = 0xEC62
426 ; FASTISEL-X86-NEXT:    movl $-1, %edx
427 ; FASTISEL-X86-NEXT:    retl
429 ; GISEL-X86-LABEL: or_imm16_i64:
430 ; GISEL-X86:       # %bb.0:
431 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
432 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
433 ; GISEL-X86-NEXT:    orl $-5022, %eax # imm = 0xEC62
434 ; GISEL-X86-NEXT:    orl $-1, %edx
435 ; GISEL-X86-NEXT:    retl
437 ; X64-LABEL: or_imm16_i64:
438 ; X64:       # %bb.0:
439 ; X64-NEXT:    movq %rdi, %rax
440 ; X64-NEXT:    orq $-5022, %rax # imm = 0xEC62
441 ; X64-NEXT:    retq
442   %c = or i64 %a, -5022
443   ret i64 %c
446 define i32 @or_imm32_i32(i32 %a) {
447 ; SDAG-X86-LABEL: or_imm32_i32:
448 ; SDAG-X86:       # %bb.0:
449 ; SDAG-X86-NEXT:    movl $85538, %eax # imm = 0x14E22
450 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
451 ; SDAG-X86-NEXT:    retl
453 ; FASTISEL-X86-LABEL: or_imm32_i32:
454 ; FASTISEL-X86:       # %bb.0:
455 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
456 ; FASTISEL-X86-NEXT:    orl $85538, %eax # imm = 0x14E22
457 ; FASTISEL-X86-NEXT:    retl
459 ; GISEL-X86-LABEL: or_imm32_i32:
460 ; GISEL-X86:       # %bb.0:
461 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
462 ; GISEL-X86-NEXT:    orl $85538, %eax # imm = 0x14E22
463 ; GISEL-X86-NEXT:    retl
465 ; X64-LABEL: or_imm32_i32:
466 ; X64:       # %bb.0:
467 ; X64-NEXT:    movl %edi, %eax
468 ; X64-NEXT:    orl $85538, %eax # imm = 0x14E22
469 ; X64-NEXT:    retq
470   %c = or i32 %a, 85538
471   ret i32 %c
474 define i64 @or_imm32_i64(i64 %a) {
475 ; SDAG-X86-LABEL: or_imm32_i64:
476 ; SDAG-X86:       # %bb.0:
477 ; SDAG-X86-NEXT:    movl $-125778, %eax # imm = 0xFFFE14AE
478 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
479 ; SDAG-X86-NEXT:    movl $-1, %edx
480 ; SDAG-X86-NEXT:    retl
482 ; FASTISEL-X86-LABEL: or_imm32_i64:
483 ; FASTISEL-X86:       # %bb.0:
484 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
485 ; FASTISEL-X86-NEXT:    orl $-125778, %eax # imm = 0xFFFE14AE
486 ; FASTISEL-X86-NEXT:    movl $-1, %edx
487 ; FASTISEL-X86-NEXT:    retl
489 ; GISEL-X86-LABEL: or_imm32_i64:
490 ; GISEL-X86:       # %bb.0:
491 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
492 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
493 ; GISEL-X86-NEXT:    orl $-125778, %eax # imm = 0xFFFE14AE
494 ; GISEL-X86-NEXT:    orl $-1, %edx
495 ; GISEL-X86-NEXT:    retl
497 ; X64-LABEL: or_imm32_i64:
498 ; X64:       # %bb.0:
499 ; X64-NEXT:    movq %rdi, %rax
500 ; X64-NEXT:    orq $-125778, %rax # imm = 0xFFFE14AE
501 ; X64-NEXT:    retq
502   %c = or i64 %a, -125778
503   ret i64 %c
506 define i64 @or_imm64_i64(i64 %a) {
507 ; SDAG-X86-LABEL: or_imm64_i64:
508 ; SDAG-X86:       # %bb.0:
509 ; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
510 ; SDAG-X86-NEXT:    movl $-1850691612, %eax # imm = 0x91B0AFE4
511 ; SDAG-X86-NEXT:    orl {{[0-9]+}}(%esp), %eax
512 ; SDAG-X86-NEXT:    orl $-2, %edx
513 ; SDAG-X86-NEXT:    retl
515 ; FASTISEL-X86-LABEL: or_imm64_i64:
516 ; FASTISEL-X86:       # %bb.0:
517 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
518 ; FASTISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
519 ; FASTISEL-X86-NEXT:    orl $-1850691612, %eax # imm = 0x91B0AFE4
520 ; FASTISEL-X86-NEXT:    orl $-2, %edx
521 ; FASTISEL-X86-NEXT:    retl
523 ; GISEL-X86-LABEL: or_imm64_i64:
524 ; GISEL-X86:       # %bb.0:
525 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
526 ; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
527 ; GISEL-X86-NEXT:    orl $-1850691612, %eax # imm = 0x91B0AFE4
528 ; GISEL-X86-NEXT:    orl $-2, %edx
529 ; GISEL-X86-NEXT:    retl
531 ; X64-LABEL: or_imm64_i64:
532 ; X64:       # %bb.0:
533 ; X64-NEXT:    movabsq $-6145658908, %rax # imm = 0xFFFFFFFE91B0AFE4
534 ; X64-NEXT:    orq %rdi, %rax
535 ; X64-NEXT:    retq
536   %c = or i64 %a, -6145658908
537   ret i64 %c