[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / inch.s
blobfd952cd7d3dbe73b498453695ba768ef5e0a9c83
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6 // RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10 // ---------------------------------------------------------------------------//
11 // Test vector form and aliases.
12 // ---------------------------------------------------------------------------//
14 inch z0.h
15 // CHECK-INST: inch z0.h
16 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
17 // CHECK-ERROR: instruction requires: sve
18 // CHECK-UNKNOWN: e0 c3 70 04 <unknown>
20 inch z0.h, all
21 // CHECK-INST: inch z0.h
22 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
23 // CHECK-ERROR: instruction requires: sve
24 // CHECK-UNKNOWN: e0 c3 70 04 <unknown>
26 inch z0.h, all, mul #1
27 // CHECK-INST: inch z0.h
28 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
29 // CHECK-ERROR: instruction requires: sve
30 // CHECK-UNKNOWN: e0 c3 70 04 <unknown>
32 inch z0.h, all, mul #16
33 // CHECK-INST: inch z0.h, all, mul #16
34 // CHECK-ENCODING: [0xe0,0xc3,0x7f,0x04]
35 // CHECK-ERROR: instruction requires: sve
36 // CHECK-UNKNOWN: e0 c3 7f 04 <unknown>
39 // ---------------------------------------------------------------------------//
40 // Test scalar form and aliases.
41 // ---------------------------------------------------------------------------//
43 inch x0
44 // CHECK-INST: inch x0
45 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
46 // CHECK-ERROR: instruction requires: sve
47 // CHECK-UNKNOWN: e0 e3 70 04 <unknown>
49 inch x0, all
50 // CHECK-INST: inch x0
51 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
52 // CHECK-ERROR: instruction requires: sve
53 // CHECK-UNKNOWN: e0 e3 70 04 <unknown>
55 inch x0, all, mul #1
56 // CHECK-INST: inch x0
57 // CHECK-ENCODING: [0xe0,0xe3,0x70,0x04]
58 // CHECK-ERROR: instruction requires: sve
59 // CHECK-UNKNOWN: e0 e3 70 04 <unknown>
61 inch x0, all, mul #16
62 // CHECK-INST: inch x0, all, mul #16
63 // CHECK-ENCODING: [0xe0,0xe3,0x7f,0x04]
64 // CHECK-ERROR: instruction requires: sve
65 // CHECK-UNKNOWN: e0 e3 7f 04 <unknown>
68 // ---------------------------------------------------------------------------//
69 // Test predicate patterns
70 // ---------------------------------------------------------------------------//
72 inch x0, pow2
73 // CHECK-INST: inch x0, pow2
74 // CHECK-ENCODING: [0x00,0xe0,0x70,0x04]
75 // CHECK-ERROR: instruction requires: sve
76 // CHECK-UNKNOWN: 00 e0 70 04 <unknown>
78 inch x0, vl1
79 // CHECK-INST: inch x0, vl1
80 // CHECK-ENCODING: [0x20,0xe0,0x70,0x04]
81 // CHECK-ERROR: instruction requires: sve
82 // CHECK-UNKNOWN: 20 e0 70 04 <unknown>
84 inch x0, vl2
85 // CHECK-INST: inch x0, vl2
86 // CHECK-ENCODING: [0x40,0xe0,0x70,0x04]
87 // CHECK-ERROR: instruction requires: sve
88 // CHECK-UNKNOWN: 40 e0 70 04 <unknown>
90 inch x0, vl3
91 // CHECK-INST: inch x0, vl3
92 // CHECK-ENCODING: [0x60,0xe0,0x70,0x04]
93 // CHECK-ERROR: instruction requires: sve
94 // CHECK-UNKNOWN: 60 e0 70 04 <unknown>
96 inch x0, vl4
97 // CHECK-INST: inch x0, vl4
98 // CHECK-ENCODING: [0x80,0xe0,0x70,0x04]
99 // CHECK-ERROR: instruction requires: sve
100 // CHECK-UNKNOWN: 80 e0 70 04 <unknown>
102 inch x0, vl5
103 // CHECK-INST: inch x0, vl5
104 // CHECK-ENCODING: [0xa0,0xe0,0x70,0x04]
105 // CHECK-ERROR: instruction requires: sve
106 // CHECK-UNKNOWN: a0 e0 70 04 <unknown>
108 inch x0, vl6
109 // CHECK-INST: inch x0, vl6
110 // CHECK-ENCODING: [0xc0,0xe0,0x70,0x04]
111 // CHECK-ERROR: instruction requires: sve
112 // CHECK-UNKNOWN: c0 e0 70 04 <unknown>
114 inch x0, vl7
115 // CHECK-INST: inch x0, vl7
116 // CHECK-ENCODING: [0xe0,0xe0,0x70,0x04]
117 // CHECK-ERROR: instruction requires: sve
118 // CHECK-UNKNOWN: e0 e0 70 04 <unknown>
120 inch x0, vl8
121 // CHECK-INST: inch x0, vl8
122 // CHECK-ENCODING: [0x00,0xe1,0x70,0x04]
123 // CHECK-ERROR: instruction requires: sve
124 // CHECK-UNKNOWN: 00 e1 70 04 <unknown>
126 inch x0, vl16
127 // CHECK-INST: inch x0, vl16
128 // CHECK-ENCODING: [0x20,0xe1,0x70,0x04]
129 // CHECK-ERROR: instruction requires: sve
130 // CHECK-UNKNOWN: 20 e1 70 04 <unknown>
132 inch x0, vl32
133 // CHECK-INST: inch x0, vl32
134 // CHECK-ENCODING: [0x40,0xe1,0x70,0x04]
135 // CHECK-ERROR: instruction requires: sve
136 // CHECK-UNKNOWN: 40 e1 70 04 <unknown>
138 inch x0, vl64
139 // CHECK-INST: inch x0, vl64
140 // CHECK-ENCODING: [0x60,0xe1,0x70,0x04]
141 // CHECK-ERROR: instruction requires: sve
142 // CHECK-UNKNOWN: 60 e1 70 04 <unknown>
144 inch x0, vl128
145 // CHECK-INST: inch x0, vl128
146 // CHECK-ENCODING: [0x80,0xe1,0x70,0x04]
147 // CHECK-ERROR: instruction requires: sve
148 // CHECK-UNKNOWN: 80 e1 70 04 <unknown>
150 inch x0, vl256
151 // CHECK-INST: inch x0, vl256
152 // CHECK-ENCODING: [0xa0,0xe1,0x70,0x04]
153 // CHECK-ERROR: instruction requires: sve
154 // CHECK-UNKNOWN: a0 e1 70 04 <unknown>
156 inch x0, #14
157 // CHECK-INST: inch x0, #14
158 // CHECK-ENCODING: [0xc0,0xe1,0x70,0x04]
159 // CHECK-ERROR: instruction requires: sve
160 // CHECK-UNKNOWN: c0 e1 70 04 <unknown>
162 inch x0, #28
163 // CHECK-INST: inch x0, #28
164 // CHECK-ENCODING: [0x80,0xe3,0x70,0x04]
165 // CHECK-ERROR: instruction requires: sve
166 // CHECK-UNKNOWN: 80 e3 70 04 <unknown>
169 // --------------------------------------------------------------------------//
170 // Test compatibility with MOVPRFX instruction.
172 movprfx z0, z7
173 // CHECK-INST: movprfx z0, z7
174 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
175 // CHECK-ERROR: instruction requires: sve
176 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
178 inch z0.h
179 // CHECK-INST: inch z0.h
180 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
181 // CHECK-ERROR: instruction requires: sve
182 // CHECK-UNKNOWN: e0 c3 70 04 <unknown>
184 movprfx z0, z7
185 // CHECK-INST: movprfx z0, z7
186 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
187 // CHECK-ERROR: instruction requires: sve
188 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
190 inch z0.h, all, mul #16
191 // CHECK-INST: inch z0.h, all, mul #16
192 // CHECK-ENCODING: [0xe0,0xc3,0x7f,0x04]
193 // CHECK-ERROR: instruction requires: sve
194 // CHECK-UNKNOWN: e0 c3 7f 04 <unknown>
196 movprfx z0, z7
197 // CHECK-INST: movprfx z0, z7
198 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
199 // CHECK-ERROR: instruction requires: sve
200 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
202 inch z0.h, all
203 // CHECK-INST: inch z0.h
204 // CHECK-ENCODING: [0xe0,0xc3,0x70,0x04]
205 // CHECK-ERROR: instruction requires: sve
206 // CHECK-UNKNOWN: e0 c3 70 04 <unknown>