[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AArch64 / SME / psel.s
blobeb0c32c39813381bcf5fd740d6fb12299af0a7e6
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %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=+sme < %s \
6 // RUN: | llvm-objdump -d --mattr=+sme - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \
8 // RUN: | llvm-objdump -d --mattr=-sme - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
10 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
11 // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
12 // RUN: | llvm-mc -triple=aarch64 -mattr=+sme -disassemble -show-encoding \
13 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
15 // --------------------------------------------------------------------------//
16 // 8-bit
18 psel p0, p0, p0.b[w12, 0]
19 // CHECK-INST: psel p0, p0, p0.b[w12, 0]
20 // CHECK-ENCODING: [0x00,0x40,0x24,0x25]
21 // CHECK-ERROR: instruction requires: sme
22 // CHECK-UNKNOWN: 25244000 <unknown>
24 psel p5, p5, p10.b[w13, 6]
25 // CHECK-INST: psel p5, p5, p10.b[w13, 6]
26 // CHECK-ENCODING: [0x45,0x55,0x75,0x25]
27 // CHECK-ERROR: instruction requires: sme
28 // CHECK-UNKNOWN: 25755545 <unknown>
30 psel p7, p11, p13.b[w12, 5]
31 // CHECK-INST: psel p7, p11, p13.b[w12, 5]
32 // CHECK-ENCODING: [0xa7,0x6d,0x6c,0x25]
33 // CHECK-ERROR: instruction requires: sme
34 // CHECK-UNKNOWN: 256c6da7 <unknown>
36 psel p15, p15, p15.b[w15, 15]
37 // CHECK-INST: psel p15, p15, p15.b[w15, 15]
38 // CHECK-ENCODING: [0xef,0x7d,0xff,0x25]
39 // CHECK-ERROR: instruction requires: sme
40 // CHECK-UNKNOWN: 25ff7def <unknown>
42 // --------------------------------------------------------------------------//
43 // 16-bit
45 psel p0, p0, p0.h[w12, 0]
46 // CHECK-INST: psel p0, p0, p0.h[w12, 0]
47 // CHECK-ENCODING: [0x00,0x40,0x28,0x25]
48 // CHECK-ERROR: instruction requires: sme
49 // CHECK-UNKNOWN: 25284000 <unknown>
51 psel p5, p5, p10.h[w13, 3]
52 // CHECK-INST: psel p5, p5, p10.h[w13, 3]
53 // CHECK-ENCODING: [0x45,0x55,0x79,0x25]
54 // CHECK-ERROR: instruction requires: sme
55 // CHECK-UNKNOWN: 25795545 <unknown>
57 psel p7, p11, p13.h[w12, 2]
58 // CHECK-INST: psel p7, p11, p13.h[w12, 2]
59 // CHECK-ENCODING: [0xa7,0x6d,0x68,0x25]
60 // CHECK-ERROR: instruction requires: sme
61 // CHECK-UNKNOWN: 25686da7 <unknown>
63 psel p15, p15, p15.h[w15, 7]
64 // CHECK-INST: psel p15, p15, p15.h[w15, 7]
65 // CHECK-ENCODING: [0xef,0x7d,0xfb,0x25]
66 // CHECK-ERROR: instruction requires: sme
67 // CHECK-UNKNOWN: 25fb7def <unknown>
69 // --------------------------------------------------------------------------//
70 // 32-bit
72 psel p0, p0, p0.s[w12, 0]
73 // CHECK-INST: psel p0, p0, p0.s[w12, 0]
74 // CHECK-ENCODING: [0x00,0x40,0x30,0x25]
75 // CHECK-ERROR: instruction requires: sme
76 // CHECK-UNKNOWN: 25304000 <unknown>
78 psel p5, p5, p10.s[w13, 1]
79 // CHECK-INST: psel p5, p5, p10.s[w13, 1]
80 // CHECK-ENCODING: [0x45,0x55,0x71,0x25]
81 // CHECK-ERROR: instruction requires: sme
82 // CHECK-UNKNOWN: 25715545 <unknown>
84 psel p7, p11, p13.s[w12, 1]
85 // CHECK-INST: psel p7, p11, p13.s[w12, 1]
86 // CHECK-ENCODING: [0xa7,0x6d,0x70,0x25]
87 // CHECK-ERROR: instruction requires: sme
88 // CHECK-UNKNOWN: 25706da7 <unknown>
90 psel p15, p15, p15.s[w15, 3]
91 // CHECK-INST: psel p15, p15, p15.s[w15, 3]
92 // CHECK-ENCODING: [0xef,0x7d,0xf3,0x25]
93 // CHECK-ERROR: instruction requires: sme
94 // CHECK-UNKNOWN: 25f37def <unknown>
96 // --------------------------------------------------------------------------//
97 // 64-bit
99 psel p0, p0, p0.d[w12, 0]
100 // CHECK-INST: psel p0, p0, p0.d[w12, 0]
101 // CHECK-ENCODING: [0x00,0x40,0x60,0x25]
102 // CHECK-ERROR: instruction requires: sme
103 // CHECK-UNKNOWN: 25604000 <unknown>
105 psel p5, p5, p10.d[w13, 0]
106 // CHECK-INST: psel p5, p5, p10.d[w13, 0]
107 // CHECK-ENCODING: [0x45,0x55,0x61,0x25]
108 // CHECK-ERROR: instruction requires: sme
109 // CHECK-UNKNOWN: 25615545 <unknown>
111 psel p7, p11, p13.d[w12, 0]
112 // CHECK-INST: psel p7, p11, p13.d[w12, 0]
113 // CHECK-ENCODING: [0xa7,0x6d,0x60,0x25]
114 // CHECK-ERROR: instruction requires: sme
115 // CHECK-UNKNOWN: 25606da7 <unknown>
117 psel p15, p15, p15.d[w15, 1]
118 // CHECK-INST: psel p15, p15, p15.d[w15, 1]
119 // CHECK-ENCODING: [0xef,0x7d,0xe3,0x25]
120 // CHECK-ERROR: instruction requires: sme
121 // CHECK-UNKNOWN: 25e37def <unknown>
123 // --------------------------------------------------------------------------//
124 // Also support with predicate-as-counter
126 psel pn15, pn15, p15.b[w15, 15]
127 // CHECK-INST: psel p15, p15, p15.b[w15, 15]
128 // CHECK-ENCODING: [0xef,0x7d,0xff,0x25]
129 // CHECK-ERROR: instruction requires: sme
130 // CHECK-UNKNOWN: 25ff7def <unknown>
132 psel pn15, pn15, p15.h[w15, 7]
133 // CHECK-INST: psel p15, p15, p15.h[w15, 7]
134 // CHECK-ENCODING: [0xef,0x7d,0xfb,0x25]
135 // CHECK-ERROR: instruction requires: sme
136 // CHECK-UNKNOWN: 25fb7def <unknown>
138 psel pn15, pn15, p15.s[w15, 3]
139 // CHECK-INST: psel p15, p15, p15.s[w15, 3]
140 // CHECK-ENCODING: [0xef,0x7d,0xf3,0x25]
141 // CHECK-ERROR: instruction requires: sme
142 // CHECK-UNKNOWN: 25f37def <unknown>
144 psel pn15, pn15, p15.d[w15, 1]
145 // CHECK-INST: psel p15, p15, p15.d[w15, 1]
146 // CHECK-ENCODING: [0xef,0x7d,0xe3,0x25]
147 // CHECK-ERROR: instruction requires: sme
148 // CHECK-UNKNOWN: 25e37def <unknown>