Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / CSKY / compressed-inst.s
blob2418d108501b5a05595b11b0c420212d80835fc9
1 # RUN: llvm-mc %s -triple=csky -show-encoding -csky-no-aliases -enable-csky-asm-compressed-inst=true -mattr=+e1 \
2 # RUN: -mattr=+e2 -mattr=+2e3 -mattr=+btst16 | FileCheck -check-prefixes=CHECK-ASM %s
4 # CHECK-ASM: addu16 a0, a1
5 # CHECK-ASM: encoding: [0x04,0x60]
6 addu32 a0, a0, a1
8 # CHECK-ASM: addu16 a0, a1
9 # CHECK-ASM: encoding: [0x04,0x60]
10 addu32 a0, a1, a0
12 # CHECK-ASM: addu16 a0, a1, a2
13 # CHECK-ASM: encoding: [0x08,0x59]
14 addu32 a0, a1, a2
16 # CHECK-ASM: subu16 a0, a1
17 # CHECK-ASM: encoding: [0x06,0x60]
18 subu32 a0, a0, a1
20 # CHECK-ASM: subu16 a0, a1, a2
21 # CHECK-ASM: encoding: [0x09,0x59]
22 subu32 a0, a1, a2
24 # CHECK-ASM: addc16 a0, a1
25 # CHECK-ASM: encoding: [0x05,0x60]
26 addc32 a0, a0, a1
28 # CHECK-ASM: subc16 a0, a1
29 # CHECK-ASM: encoding: [0x07,0x60]
30 subc32 a0, a0, a1
32 # CHECK-ASM: addi16 a0, a1, 1
33 # CHECK-ASM: encoding: [0x02,0x59]
34 addi32 a0, a1, 1
36 # CHECK-ASM: subi16 a0, a1, 1
37 # CHECK-ASM: encoding: [0x03,0x59]
38 subi32 a0, a1, 1
40 # CHECK-ASM: addi16 a0, 10
41 # CHECK-ASM: encoding: [0x09,0x20]
42 addi32 a0, a0, 10
44 # CHECK-ASM: subi16 a0, 10
45 # CHECK-ASM: encoding: [0x09,0x28]
46 subi32 a0, a0, 10
48 # CHECK-ASM: addi16 sp, sp, 4
49 # CHECK-ASM: encoding: [0x01,0x14]
50 addi32 sp, sp, 4
52 # CHECK-ASM: subi16 sp, sp, 4
53 # CHECK-ASM: encoding: [0x21,0x14]
54 subi32 sp, sp, 4
56 # CHECK-ASM: addi16 a0, sp, 4
57 # CHECK-ASM: encoding: [0x01,0x18]
58 addi32 a0, sp, 4
60 # CHECK-ASM: mult16 a0, a1
61 # CHECK-ASM: encoding: [0x04,0x7c]
62 mult32 a0, a0, a1
64 # CHECK-ASM: mult16 a0, a1
65 # CHECK-ASM: encoding: [0x04,0x7c]
66 mult32 a0, a1, a0
68 # CHECK-ASM: and16 a0, a1
69 # CHECK-ASM: encoding: [0x04,0x68]
70 and32 a0, a0, a1
72 # CHECK-ASM: and16 a0, a1
73 # CHECK-ASM: encoding: [0x04,0x68]
74 and32 a0, a1, a0
76 # CHECK-ASM: or16 a0, a1
77 # CHECK-ASM: encoding: [0x04,0x6c]
78 or32 a0, a0, a1
80 # CHECK-ASM: or16 a0, a1
81 # CHECK-ASM: encoding: [0x04,0x6c]
82 or32 a0, a1, a0
84 # CHECK-ASM: xor16 a0, a1
85 # CHECK-ASM: encoding: [0x05,0x6c]
86 xor32 a0, a0, a1
88 # CHECK-ASM: xor16 a0, a1
89 # CHECK-ASM: encoding: [0x05,0x6c]
90 xor32 a0, a1, a0
92 # CHECK-ASM: andn16 a0, a1
93 # CHECK-ASM: encoding: [0x05,0x68]
94 andn32 a0, a0, a1
96 # CHECK-ASM: nor16 a0, a1
97 # CHECK-ASM: encoding: [0x06,0x6c]
98 nor32 a0, a0, a1
100 # CHECK-ASM: lsl16 a0, a1
101 # CHECK-ASM: encoding: [0x04,0x70]
102 lsl32 a0, a0, a1
104 # CHECK-ASM: lsr16 a0, a1
105 # CHECK-ASM: encoding: [0x05,0x70]
106 lsr32 a0, a0, a1
108 # CHECK-ASM: asr16 a0, a1
109 # CHECK-ASM: encoding: [0x06,0x70]
110 asr32 a0, a0, a1
112 # CHECK-ASM: rotl16 a0, a1
113 # CHECK-ASM: encoding: [0x07,0x70]
114 rotl32 a0, a0, a1
116 # CHECK-ASM: revb16 a0, a1
117 # CHECK-ASM: encoding: [0x06,0x78]
118 revb32 a0, a1
120 # CHECK-ASM: lsli16 a0, a1, 2
121 # CHECK-ASM: encoding: [0x02,0x41]
122 lsli32 a0, a1, 2
124 # CHECK-ASM: lsri16 a0, a1, 2
125 # CHECK-ASM: encoding: [0x02,0x49]
126 lsri32 a0, a1, 2
128 # CHECK-ASM: asri16 a0, a1, 2
129 # CHECK-ASM: encoding: [0x02,0x51]
130 asri32 a0, a1, 2
132 # CHECK-ASM: cmphs16 a0, a1
133 # CHECK-ASM: encoding: [0x40,0x64]
134 cmphs32 a0, a1
136 # CHECK-ASM: cmplt16 a0, a1
137 # CHECK-ASM: encoding: [0x41,0x64]
138 cmplt32 a0, a1
140 # CHECK-ASM: cmpne16 a0, a1
141 # CHECK-ASM: encoding: [0x42,0x64]
142 cmpne32 a0, a1
144 # CHECK-ASM: cmphsi16 a0, 1
145 # CHECK-ASM: encoding: [0x00,0x38]
146 cmphsi32 a0, 1
148 # CHECK-ASM: cmplti16 a0, 1
149 # CHECK-ASM: encoding: [0x20,0x38]
150 cmplti32 a0, 1
152 # CHECK-ASM: cmpnei16 a0, 1
153 # CHECK-ASM: encoding: [0x41,0x38]
154 cmpnei32 a0, 1
156 # CHECK-ASM: jsr16 a0
157 # CHECK-ASM: encoding: [0xc1,0x7b]
158 jsr32 a0
160 # CHECK-ASM: mvcv16 a0
161 # CHECK-ASM: encoding: [0x03,0x64]
162 mvcv32 a0
164 # CHECK-ASM: movi16 a0, 1
165 # CHECK-ASM: encoding: [0x01,0x30]
166 movi32 a0, 1
168 # CHECK-ASM: ld16.b a0, (a1, 1)
169 # CHECK-ASM: encoding: [0x01,0x81]
170 ld32.b a0, (a1, 1)
172 # CHECK-ASM: ld16.h a0, (a1, 2)
173 # CHECK-ASM: encoding: [0x01,0x89]
174 ld32.h a0, (a1, 2)
176 # CHECK-ASM: ld16.w a0, (a1, 4)
177 # CHECK-ASM: encoding: [0x01,0x91]
178 ld32.w a0, (a1, 4)
180 # CHECK-ASM: ld16.w a0, (sp, 4)
181 # CHECK-ASM: encoding: [0x01,0x98]
182 ld32.w a0, (sp, 4)
184 # CHECK-ASM: st16.b a0, (a1, 1)
185 # CHECK-ASM: encoding: [0x01,0xa1]
186 st32.b a0, (a1, 1)
188 # CHECK-ASM: st16.h a0, (a1, 2)
189 # CHECK-ASM: encoding: [0x01,0xa9]
190 st32.h a0, (a1, 2)
192 # CHECK-ASM: st16.w a0, (a1, 4)
193 # CHECK-ASM: encoding: [0x01,0xb1]
194 st32.w a0, (a1, 4)
196 # CHECK-ASM: st16.w a0, (sp, 4)
197 # CHECK-ASM: encoding: [0x01,0xb8]
198 st32.w a0, (sp, 4)
200 # CHECK-ASM: btsti16 a0, 1
201 # CHECK-ASM: encoding: [0xc1,0x38]
202 btsti32 a0, 1
204 # CHECK-ASM: bclri16 a0, 1
205 # CHECK-ASM: encoding: [0x81,0x38]
206 bclri32 a0, a0, 1
208 # CHECK-ASM: bseti16 a0, 1
209 # CHECK-ASM: encoding: [0xa1,0x38]
210 bseti32 a0, a0, 1