[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / subr.s
blobf35bbbe140cf585754f65aa47121daf8bd9b48bd
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
13 subr z0.b, p0/m, z0.b, z0.b
14 // CHECK-INST: subr z0.b, p0/m, z0.b, z0.b
15 // CHECK-ENCODING: [0x00,0x00,0x03,0x04]
16 // CHECK-ERROR: instruction requires: sve or sme
17 // CHECK-UNKNOWN: 04030000 <unknown>
19 subr z0.h, p0/m, z0.h, z0.h
20 // CHECK-INST: subr z0.h, p0/m, z0.h, z0.h
21 // CHECK-ENCODING: [0x00,0x00,0x43,0x04]
22 // CHECK-ERROR: instruction requires: sve or sme
23 // CHECK-UNKNOWN: 04430000 <unknown>
25 subr z0.s, p0/m, z0.s, z0.s
26 // CHECK-INST: subr z0.s, p0/m, z0.s, z0.s
27 // CHECK-ENCODING: [0x00,0x00,0x83,0x04]
28 // CHECK-ERROR: instruction requires: sve or sme
29 // CHECK-UNKNOWN: 04830000 <unknown>
31 subr z0.d, p0/m, z0.d, z0.d
32 // CHECK-INST: subr z0.d, p0/m, z0.d, z0.d
33 // CHECK-ENCODING: [0x00,0x00,0xc3,0x04]
34 // CHECK-ERROR: instruction requires: sve or sme
35 // CHECK-UNKNOWN: 04c30000 <unknown>
37 subr z0.b, z0.b, #0
38 // CHECK-INST: subr z0.b, z0.b, #0
39 // CHECK-ENCODING: [0x00,0xc0,0x23,0x25]
40 // CHECK-ERROR: instruction requires: sve or sme
41 // CHECK-UNKNOWN: 2523c000 <unknown>
43 subr z31.b, z31.b, #255
44 // CHECK-INST: subr z31.b, z31.b, #255
45 // CHECK-ENCODING: [0xff,0xdf,0x23,0x25]
46 // CHECK-ERROR: instruction requires: sve or sme
47 // CHECK-UNKNOWN: 2523dfff <unknown>
49 subr z0.h, z0.h, #0
50 // CHECK-INST: subr z0.h, z0.h, #0
51 // CHECK-ENCODING: [0x00,0xc0,0x63,0x25]
52 // CHECK-ERROR: instruction requires: sve or sme
53 // CHECK-UNKNOWN: 2563c000 <unknown>
55 subr z0.h, z0.h, #0, lsl #8
56 // CHECK-INST: subr z0.h, z0.h, #0, lsl #8
57 // CHECK-ENCODING: [0x00,0xe0,0x63,0x25]
58 // CHECK-ERROR: instruction requires: sve or sme
59 // CHECK-UNKNOWN: 2563e000 <unknown>
61 subr z31.h, z31.h, #255, lsl #8
62 // CHECK-INST: subr z31.h, z31.h, #65280
63 // CHECK-ENCODING: [0xff,0xff,0x63,0x25]
64 // CHECK-ERROR: instruction requires: sve or sme
65 // CHECK-UNKNOWN: 2563ffff <unknown>
67 subr z31.h, z31.h, #65280
68 // CHECK-INST: subr z31.h, z31.h, #65280
69 // CHECK-ENCODING: [0xff,0xff,0x63,0x25]
70 // CHECK-ERROR: instruction requires: sve or sme
71 // CHECK-UNKNOWN: 2563ffff <unknown>
73 subr z0.s, z0.s, #0
74 // CHECK-INST: subr z0.s, z0.s, #0
75 // CHECK-ENCODING: [0x00,0xc0,0xa3,0x25]
76 // CHECK-ERROR: instruction requires: sve or sme
77 // CHECK-UNKNOWN: 25a3c000 <unknown>
79 subr z0.s, z0.s, #0, lsl #8
80 // CHECK-INST: subr z0.s, z0.s, #0, lsl #8
81 // CHECK-ENCODING: [0x00,0xe0,0xa3,0x25]
82 // CHECK-ERROR: instruction requires: sve or sme
83 // CHECK-UNKNOWN: 25a3e000 <unknown>
85 subr z31.s, z31.s, #255, lsl #8
86 // CHECK-INST: subr z31.s, z31.s, #65280
87 // CHECK-ENCODING: [0xff,0xff,0xa3,0x25]
88 // CHECK-ERROR: instruction requires: sve or sme
89 // CHECK-UNKNOWN: 25a3ffff <unknown>
91 subr z31.s, z31.s, #65280
92 // CHECK-INST: subr z31.s, z31.s, #65280
93 // CHECK-ENCODING: [0xff,0xff,0xa3,0x25]
94 // CHECK-ERROR: instruction requires: sve or sme
95 // CHECK-UNKNOWN: 25a3ffff <unknown>
97 subr z0.d, z0.d, #0
98 // CHECK-INST: subr z0.d, z0.d, #0
99 // CHECK-ENCODING: [0x00,0xc0,0xe3,0x25]
100 // CHECK-ERROR: instruction requires: sve or sme
101 // CHECK-UNKNOWN: 25e3c000 <unknown>
103 subr z0.d, z0.d, #0, lsl #8
104 // CHECK-INST: subr z0.d, z0.d, #0, lsl #8
105 // CHECK-ENCODING: [0x00,0xe0,0xe3,0x25]
106 // CHECK-ERROR: instruction requires: sve or sme
107 // CHECK-UNKNOWN: 25e3e000 <unknown>
109 subr z31.d, z31.d, #255, lsl #8
110 // CHECK-INST: subr z31.d, z31.d, #65280
111 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
112 // CHECK-ERROR: instruction requires: sve or sme
113 // CHECK-UNKNOWN: 25e3ffff <unknown>
115 subr z31.d, z31.d, #65280
116 // CHECK-INST: subr z31.d, z31.d, #65280
117 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
118 // CHECK-ERROR: instruction requires: sve or sme
119 // CHECK-UNKNOWN: 25e3ffff <unknown>
122 // --------------------------------------------------------------------------//
123 // Test compatibility with MOVPRFX instruction.
125 movprfx z5.d, p0/z, z7.d
126 // CHECK-INST: movprfx z5.d, p0/z, z7.d
127 // CHECK-ENCODING: [0xe5,0x20,0xd0,0x04]
128 // CHECK-ERROR: instruction requires: sve or sme
129 // CHECK-UNKNOWN: 04d020e5 <unknown>
131 subr z5.d, p0/m, z5.d, z0.d
132 // CHECK-INST: subr z5.d, p0/m, z5.d, z0.d
133 // CHECK-ENCODING: [0x05,0x00,0xc3,0x04]
134 // CHECK-ERROR: instruction requires: sve or sme
135 // CHECK-UNKNOWN: 04c30005 <unknown>
137 movprfx z5, z7
138 // CHECK-INST: movprfx z5, z7
139 // CHECK-ENCODING: [0xe5,0xbc,0x20,0x04]
140 // CHECK-ERROR: instruction requires: sve or sme
141 // CHECK-UNKNOWN: 0420bce5 <unknown>
143 subr z5.d, p0/m, z5.d, z0.d
144 // CHECK-INST: subr z5.d, p0/m, z5.d, z0.d
145 // CHECK-ENCODING: [0x05,0x00,0xc3,0x04]
146 // CHECK-ERROR: instruction requires: sve or sme
147 // CHECK-UNKNOWN: 04c30005 <unknown>
149 movprfx z31, z6
150 // CHECK-INST: movprfx z31, z6
151 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
152 // CHECK-ERROR: instruction requires: sve or sme
153 // CHECK-UNKNOWN: 0420bcdf <unknown>
155 subr z31.d, z31.d, #65280
156 // CHECK-INST: subr z31.d, z31.d, #65280
157 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
158 // CHECK-ERROR: instruction requires: sve or sme
159 // CHECK-UNKNOWN: 25e3ffff <unknown>