Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / inch.s
bloba7c6ddadbabd1ff8f488278696ea6446a1bf1d54
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12 // ---------------------------------------------------------------------------//
13 // Test vector form and aliases.
14 // ---------------------------------------------------------------------------//
16 inch z0.h
17 // CHECK-INST: inch z0.h
18 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
19 // CHECK-ERROR: instruction requires: sve or sme
20 // CHECK-UNKNOWN: 0470c3e0 <unknown>
22 inch z0.h, all
23 // CHECK-INST: inch z0.h
24 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
25 // CHECK-ERROR: instruction requires: sve or sme
26 // CHECK-UNKNOWN: 0470c3e0 <unknown>
28 inch z0.h, all, mul #1
29 // CHECK-INST: inch z0.h
30 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
31 // CHECK-ERROR: instruction requires: sve or sme
32 // CHECK-UNKNOWN: 0470c3e0 <unknown>
34 inch z0.h, all, mul #16
35 // CHECK-INST: inch z0.h, all, mul #16
36 // CHECK-ENCODING: [0xe0,0xc3,0x7f,0x04]
37 // CHECK-ERROR: instruction requires: sve or sme
38 // CHECK-UNKNOWN: 047fc3e0 <unknown>
41 // ---------------------------------------------------------------------------//
42 // Test scalar form and aliases.
43 // ---------------------------------------------------------------------------//
45 inch x0
46 // CHECK-INST: inch x0
47 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
48 // CHECK-ERROR: instruction requires: sve or sme
49 // CHECK-UNKNOWN: 0470e3e0 <unknown>
51 inch x0, all
52 // CHECK-INST: inch x0
53 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
54 // CHECK-ERROR: instruction requires: sve or sme
55 // CHECK-UNKNOWN: 0470e3e0 <unknown>
57 inch x0, all, mul #1
58 // CHECK-INST: inch x0
59 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
60 // CHECK-ERROR: instruction requires: sve or sme
61 // CHECK-UNKNOWN: 0470e3e0 <unknown>
63 inch x0, all, mul #16
64 // CHECK-INST: inch x0, all, mul #16
65 // CHECK-ENCODING: [0xe0,0xe3,0x7f,0x04]
66 // CHECK-ERROR: instruction requires: sve or sme
67 // CHECK-UNKNOWN: 047fe3e0 <unknown>
70 // ---------------------------------------------------------------------------//
71 // Test predicate patterns
72 // ---------------------------------------------------------------------------//
74 inch x0, pow2
75 // CHECK-INST: inch x0, pow2
76 // CHECK-ENCODING: [0x00,0xe0,0x70,0x04]
77 // CHECK-ERROR: instruction requires: sve or sme
78 // CHECK-UNKNOWN: 0470e000 <unknown>
80 inch x0, vl1
81 // CHECK-INST: inch x0, vl1
82 // CHECK-ENCODING: [0x20,0xe0,0x70,0x04]
83 // CHECK-ERROR: instruction requires: sve or sme
84 // CHECK-UNKNOWN: 0470e020 <unknown>
86 inch x0, vl2
87 // CHECK-INST: inch x0, vl2
88 // CHECK-ENCODING: [0x40,0xe0,0x70,0x04]
89 // CHECK-ERROR: instruction requires: sve or sme
90 // CHECK-UNKNOWN: 0470e040 <unknown>
92 inch x0, vl3
93 // CHECK-INST: inch x0, vl3
94 // CHECK-ENCODING: [0x60,0xe0,0x70,0x04]
95 // CHECK-ERROR: instruction requires: sve or sme
96 // CHECK-UNKNOWN: 0470e060 <unknown>
98 inch x0, vl4
99 // CHECK-INST: inch x0, vl4
100 // CHECK-ENCODING: [0x80,0xe0,0x70,0x04]
101 // CHECK-ERROR: instruction requires: sve or sme
102 // CHECK-UNKNOWN: 0470e080 <unknown>
104 inch x0, vl5
105 // CHECK-INST: inch x0, vl5
106 // CHECK-ENCODING: [0xa0,0xe0,0x70,0x04]
107 // CHECK-ERROR: instruction requires: sve or sme
108 // CHECK-UNKNOWN: 0470e0a0 <unknown>
110 inch x0, vl6
111 // CHECK-INST: inch x0, vl6
112 // CHECK-ENCODING: [0xc0,0xe0,0x70,0x04]
113 // CHECK-ERROR: instruction requires: sve or sme
114 // CHECK-UNKNOWN: 0470e0c0 <unknown>
116 inch x0, vl7
117 // CHECK-INST: inch x0, vl7
118 // CHECK-ENCODING: [0xe0,0xe0,0x70,0x04]
119 // CHECK-ERROR: instruction requires: sve or sme
120 // CHECK-UNKNOWN: 0470e0e0 <unknown>
122 inch x0, vl8
123 // CHECK-INST: inch x0, vl8
124 // CHECK-ENCODING: [0x00,0xe1,0x70,0x04]
125 // CHECK-ERROR: instruction requires: sve or sme
126 // CHECK-UNKNOWN: 0470e100 <unknown>
128 inch x0, vl16
129 // CHECK-INST: inch x0, vl16
130 // CHECK-ENCODING: [0x20,0xe1,0x70,0x04]
131 // CHECK-ERROR: instruction requires: sve or sme
132 // CHECK-UNKNOWN: 0470e120 <unknown>
134 inch x0, vl32
135 // CHECK-INST: inch x0, vl32
136 // CHECK-ENCODING: [0x40,0xe1,0x70,0x04]
137 // CHECK-ERROR: instruction requires: sve or sme
138 // CHECK-UNKNOWN: 0470e140 <unknown>
140 inch x0, vl64
141 // CHECK-INST: inch x0, vl64
142 // CHECK-ENCODING: [0x60,0xe1,0x70,0x04]
143 // CHECK-ERROR: instruction requires: sve or sme
144 // CHECK-UNKNOWN: 0470e160 <unknown>
146 inch x0, vl128
147 // CHECK-INST: inch x0, vl128
148 // CHECK-ENCODING: [0x80,0xe1,0x70,0x04]
149 // CHECK-ERROR: instruction requires: sve or sme
150 // CHECK-UNKNOWN: 0470e180 <unknown>
152 inch x0, vl256
153 // CHECK-INST: inch x0, vl256
154 // CHECK-ENCODING: [0xa0,0xe1,0x70,0x04]
155 // CHECK-ERROR: instruction requires: sve or sme
156 // CHECK-UNKNOWN: 0470e1a0 <unknown>
158 inch x0, #14
159 // CHECK-INST: inch x0, #14
160 // CHECK-ENCODING: [0xc0,0xe1,0x70,0x04]
161 // CHECK-ERROR: instruction requires: sve or sme
162 // CHECK-UNKNOWN: 0470e1c0 <unknown>
164 inch x0, #28
165 // CHECK-INST: inch x0, #28
166 // CHECK-ENCODING: [0x80,0xe3,0x70,0x04]
167 // CHECK-ERROR: instruction requires: sve or sme
168 // CHECK-UNKNOWN: 0470e380 <unknown>
171 // --------------------------------------------------------------------------//
172 // Test compatibility with MOVPRFX instruction.
174 movprfx z0, z7
175 // CHECK-INST: movprfx z0, z7
176 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
177 // CHECK-ERROR: instruction requires: sve or sme
178 // CHECK-UNKNOWN: 0420bce0 <unknown>
180 inch z0.h
181 // CHECK-INST: inch z0.h
182 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
183 // CHECK-ERROR: instruction requires: sve or sme
184 // CHECK-UNKNOWN: 0470c3e0 <unknown>
186 movprfx z0, z7
187 // CHECK-INST: movprfx z0, z7
188 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
189 // CHECK-ERROR: instruction requires: sve or sme
190 // CHECK-UNKNOWN: 0420bce0 <unknown>
192 inch z0.h, all, mul #16
193 // CHECK-INST: inch z0.h, all, mul #16
194 // CHECK-ENCODING: [0xe0,0xc3,0x7f,0x04]
195 // CHECK-ERROR: instruction requires: sve or sme
196 // CHECK-UNKNOWN: 047fc3e0 <unknown>
198 movprfx z0, z7
199 // CHECK-INST: movprfx z0, z7
200 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
201 // CHECK-ERROR: instruction requires: sve or sme
202 // CHECK-UNKNOWN: 0420bce0 <unknown>
204 inch z0.h, all
205 // CHECK-INST: inch z0.h
206 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
207 // CHECK-ERROR: instruction requires: sve or sme
208 // CHECK-UNKNOWN: 0470c3e0 <unknown>