[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv32b-aliases-valid.s
bloba5e4c92ee06b5f78a8e9dff01cb25eaae8284507
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -riscv-no-aliases \
2 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
3 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b \
4 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-b < %s \
6 # RUN: | llvm-objdump -d -r -M no-aliases --mattr=+experimental-b - \
7 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
8 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-b < %s \
9 # RUN: | llvm-objdump -d -r --mattr=+experimental-b - \
10 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
12 # The following check prefixes are used in this test:
13 # CHECK-S-OBJ Match both the .s and objdumped object output with
14 # aliases enabled
15 # CHECK-S-OBJ-NOALIAS Match both the .s and objdumped object output with
16 # aliases disabled
18 # CHECK-S-OBJ-NOALIAS: andi t0, t1, 255
19 # CHECK-S-OBJ: andi t0, t1, 255
20 zext.b x5, x6
22 # CHECK-S-OBJ-NOALIAS: zext.h t0, t1
23 # CHECK-S-OBJ: zext.h t0, t1
24 zext.h x5, x6
26 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 1
27 # CHECK-S-OBJ: rev.p t0, t1
28 rev.p x5, x6
30 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 2
31 # CHECK-S-OBJ: rev2.n t0, t1
32 rev2.n x5, x6
34 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 3
35 # CHECK-S-OBJ: rev.n t0, t1
36 rev.n x5, x6
38 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 4
39 # CHECK-S-OBJ: rev4.b t0, t1
40 rev4.b x5, x6
42 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 6
43 # CHECK-S-OBJ: rev2.b t0, t1
44 rev2.b x5, x6
46 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 7
47 # CHECK-S-OBJ: rev.b t0, t1
48 rev.b x5, x6
50 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 8
51 # CHECK-S-OBJ: rev8.h t0, t1
52 rev8.h x5, x6
54 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 12
55 # CHECK-S-OBJ: rev4.h t0, t1
56 rev4.h x5, x6
58 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 14
59 # CHECK-S-OBJ: rev2.h t0, t1
60 rev2.h x5, x6
62 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 15
63 # CHECK-S-OBJ: rev.h t0, t1
64 rev.h x5, x6
66 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 16
67 # CHECK-S-OBJ: rev16 t0, t1
68 rev16 x5, x6
70 # CHECK-S-OBJ-NOALIAS: rev8 t0, t1
71 # CHECK-S-OBJ: rev8 t0, t1
72 rev8 x5, x6
74 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 28
75 # CHECK-S-OBJ: rev4 t0, t1
76 rev4 x5, x6
78 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 30
79 # CHECK-S-OBJ: rev2 t0, t1
80 rev2 x5, x6
82 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 31
83 # CHECK-S-OBJ: rev t0, t1
84 rev x5, x6
86 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 1
87 # CHECK-S-OBJ: zip.n t0, t1
88 zip.n x5, x6
90 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 1
91 # CHECK-S-OBJ: unzip.n t0, t1
92 unzip.n x5, x6
94 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 2
95 # CHECK-S-OBJ: zip2.b t0, t1
96 zip2.b x5, x6
98 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 2
99 # CHECK-S-OBJ: unzip2.b t0, t1
100 unzip2.b x5, x6
102 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 3
103 # CHECK-S-OBJ: zip.b t0, t1
104 zip.b x5, x6
106 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 3
107 # CHECK-S-OBJ: unzip.b t0, t1
108 unzip.b x5, x6
110 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 4
111 # CHECK-S-OBJ: zip4.h t0, t1
112 zip4.h x5, x6
114 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 4
115 # CHECK-S-OBJ: unzip4.h t0, t1
116 unzip4.h x5, x6
118 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 6
119 # CHECK-S-OBJ: zip2.h t0, t1
120 zip2.h x5, x6
122 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 6
123 # CHECK-S-OBJ: unzip2.h t0, t1
124 unzip2.h x5, x6
126 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 7
127 # CHECK-S-OBJ: zip.h t0, t1
128 zip.h x5, x6
130 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 7
131 # CHECK-S-OBJ: unzip.h t0, t1
132 unzip.h x5, x6
134 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 8
135 # CHECK-S-OBJ: zip8 t0, t1
136 zip8 x5, x6
138 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 8
139 # CHECK-S-OBJ: unzip8 t0, t1
140 unzip8 x5, x6
142 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 12
143 # CHECK-S-OBJ: zip4 t0, t1
144 zip4 x5, x6
146 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 12
147 # CHECK-S-OBJ: unzip4 t0, t1
148 unzip4 x5, x6
150 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 14
151 # CHECK-S-OBJ: zip2 t0, t1
152 zip2 x5, x6
154 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 14
155 # CHECK-S-OBJ: unzip2 t0, t1
156 unzip2 x5, x6
158 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 15
159 # CHECK-S-OBJ: zip t0, t1
160 zip x5, x6
162 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 15
163 # CHECK-S-OBJ: unzip t0, t1
164 unzip x5, x6
166 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 1
167 # CHECK-S-OBJ: orc.p t0, t1
168 orc.p x5, x6
170 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 2
171 # CHECK-S-OBJ: orc2.n t0, t1
172 orc2.n x5, x6
174 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 3
175 # CHECK-S-OBJ: orc.n t0, t1
176 orc.n x5, x6
178 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 4
179 # CHECK-S-OBJ: orc4.b t0, t1
180 orc4.b x5, x6
182 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 6
183 # CHECK-S-OBJ: orc2.b t0, t1
184 orc2.b x5, x6
186 # CHECK-S-OBJ-NOALIAS: orc.b t0, t1
187 # CHECK-S-OBJ: orc.b t0, t1
188 orc.b x5, x6
190 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 8
191 # CHECK-S-OBJ: orc8.h t0, t1
192 orc8.h x5, x6
194 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 12
195 # CHECK-S-OBJ: orc4.h t0, t1
196 orc4.h x5, x6
198 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 14
199 # CHECK-S-OBJ: orc2.h t0, t1
200 orc2.h x5, x6
202 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 15
203 # CHECK-S-OBJ: orc.h t0, t1
204 orc.h x5, x6
206 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 16
207 # CHECK-S-OBJ: orc16 t0, t1
208 orc16 x5, x6
210 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 24
211 # CHECK-S-OBJ: orc8 t0, t1
212 orc8 x5, x6
214 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 28
215 # CHECK-S-OBJ: orc4 t0, t1
216 orc4 x5, x6
218 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 30
219 # CHECK-S-OBJ: orc2 t0, t1
220 orc2 x5, x6
222 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 31
223 # CHECK-S-OBJ: orc t0, t1
224 orc x5, x6
226 # CHECK-S-OBJ-NOALIAS: rori t0, t1, 8
227 # CHECK-S-OBJ: rori t0, t1, 8
228 ror x5, x6, 8
230 # CHECK-S-OBJ-NOALIAS: bseti t0, t1, 8
231 # CHECK-S-OBJ: bseti t0, t1, 8
232 bset x5, x6, 8
234 # CHECK-S-OBJ-NOALIAS: bclri t0, t1, 8
235 # CHECK-S-OBJ: bclri t0, t1, 8
236 bclr x5, x6, 8
238 # CHECK-S-OBJ-NOALIAS: binvi t0, t1, 8
239 # CHECK-S-OBJ: binvi t0, t1, 8
240 binv x5, x6, 8
242 # CHECK-S-OBJ-NOALIAS: bexti t0, t1, 8
243 # CHECK-S-OBJ: bexti t0, t1, 8
244 bext x5, x6, 8
246 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 13
247 # CHECK-S-OBJ: grevi t0, t1, 13
248 grev x5, x6, 13
250 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 13
251 # CHECK-S-OBJ: gorci t0, t1, 13
252 gorc x5, x6, 13
254 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 13
255 # CHECK-S-OBJ: shfli t0, t1, 13
256 shfl x5, x6, 13
258 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 13
259 # CHECK-S-OBJ: unshfli t0, t1, 13
260 unshfl x5, x6, 13