[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / X86 / intel-syntax-bitwise-ops.s
blob2ebad7c21158de0b2bf523300ab00f1ca6025524
1 // RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=att %s | FileCheck %s
3 .intel_syntax
5 // CHECK: andl $3, %ecx
6 and ecx, 1+2
7 // CHECK: andl $3, %ecx
8 and ecx, 1|2
9 // CHECK: andl $3, %ecx
10 and ecx, 1 or 2
11 // CHECK: andl $3, %ecx
12 and ecx, 1 OR 2
13 // CHECK: andl $3, %ecx
14 and ecx, 1*3
15 // CHECK: andl $1, %ecx
16 and ecx, 1&3
17 // CHECK: andl $1, %ecx
18 and ecx, 1 and 3
19 // CHECK: andl $1, %ecx
20 and ecx, 1 AND 3
21 // CHECK: andl $0, %ecx
22 and ecx, (1&2)
23 // CHECK: andl $0, %ecx
24 and ecx, (1 and 2)
25 // CHECK: andl $0, %ecx
26 and ecx, (1 AND 2)
27 // CHECK: andl $3, %ecx
28 and ecx, ((1)|2)
29 // CHECK: andl $3, %ecx
30 and ecx, ((1) or 2)
31 // CHECK: andl $3, %ecx
32 and ecx, ((1) OR 2)
33 // CHECK: andl $1, %ecx
34 and ecx, 1&2+3
35 // CHECK: andl $1, %ecx
36 and ecx, 1 and 2+3
37 // CHECK: andl $1, %ecx
38 and ecx, 1 AND 2+3
39 // CHECK: addl $4938, %eax
40 add eax, 9876 >> 1
41 // CHECK: addl $4938, %eax
42 add eax, 9876 shr 1
43 // CHECK: addl $4938, %eax
44 add eax, 9876 SHR 1
45 // CHECK: addl $19752, %eax
46 add eax, 9876 << 1
47 // CHECK: addl $19752, %eax
48 add eax, 9876 shl 1
49 // CHECK: addl $19752, %eax
50 add eax, 9876 SHL 1
51 // CHECK: addl $5, %eax
52 add eax, 6 ^ 3
53 // CHECK: addl $5, %eax
54 add eax, 6 xor 3
55 // CHECK: addl $5, %eax
56 add eax, 6 XOR 3
57 // CHECK: addl $5, %eax
58 add eax, 6 XOR 3 shl 1 SHR 1
59 // CHECK: movl $-9, %eax
60 mov eax, not(1 shl 3)
61 // CHECK: movl $-2, %eax
62 mov eax, ~(0x8 shr 3)
63 // CHECK: movl $-4, %eax
64 mov eax, not(1 or 3)
65 // CHECK: movl $-2, %eax
66 mov eax, -(1 xor 3)
67 // CHECK: movl $-2, %eax
68 mov eax, not(1 and 3)
69 // CHECK: movl $3, %eax
70 mov eax, not(not 3)
71 // CHECK: movl $-3, %eax
72 mov eax, ~(5 mod 3)
73 // CHECK: movl $-2, %eax
74 mov eax, (-5 mod 3)
75 // CHECK: movl $-3, %eax
76 mov eax, ~(5 % 3)
77 // CHECK: movl $-2, %eax
78 mov eax, (-5 % 3)
79 // CHECK: movl $-2, %eax
80 mov eax, -5 % 3