Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SME2 / sclamp.s
blobaaef4ab3ecbe3567dcc2f07a4ac88e35e8ad0110
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %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=+sme2 < %s \
6 // RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
8 // RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
10 // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
11 // RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \
12 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
15 sclamp {z0.h, z1.h}, z0.h, z0.h // 11000001-01100000-11000100-00000000
16 // CHECK-INST: sclamp { z0.h, z1.h }, z0.h, z0.h
17 // CHECK-ENCODING: [0x00,0xc4,0x60,0xc1]
18 // CHECK-ERROR: instruction requires: sme2
19 // CHECK-UNKNOWN: c160c400 <unknown>
21 sclamp {z20.h, z21.h}, z10.h, z21.h // 11000001-01110101-11000101-01010100
22 // CHECK-INST: sclamp { z20.h, z21.h }, z10.h, z21.h
23 // CHECK-ENCODING: [0x54,0xc5,0x75,0xc1]
24 // CHECK-ERROR: instruction requires: sme2
25 // CHECK-UNKNOWN: c175c554 <unknown>
27 sclamp {z22.h, z23.h}, z13.h, z8.h // 11000001-01101000-11000101-10110110
28 // CHECK-INST: sclamp { z22.h, z23.h }, z13.h, z8.h
29 // CHECK-ENCODING: [0xb6,0xc5,0x68,0xc1]
30 // CHECK-ERROR: instruction requires: sme2
31 // CHECK-UNKNOWN: c168c5b6 <unknown>
33 sclamp {z30.h, z31.h}, z31.h, z31.h // 11000001-01111111-11000111-11111110
34 // CHECK-INST: sclamp { z30.h, z31.h }, z31.h, z31.h
35 // CHECK-ENCODING: [0xfe,0xc7,0x7f,0xc1]
36 // CHECK-ERROR: instruction requires: sme2
37 // CHECK-UNKNOWN: c17fc7fe <unknown>
40 sclamp {z0.s, z1.s}, z0.s, z0.s // 11000001-10100000-11000100-00000000
41 // CHECK-INST: sclamp { z0.s, z1.s }, z0.s, z0.s
42 // CHECK-ENCODING: [0x00,0xc4,0xa0,0xc1]
43 // CHECK-ERROR: instruction requires: sme2
44 // CHECK-UNKNOWN: c1a0c400 <unknown>
46 sclamp {z20.s, z21.s}, z10.s, z21.s // 11000001-10110101-11000101-01010100
47 // CHECK-INST: sclamp { z20.s, z21.s }, z10.s, z21.s
48 // CHECK-ENCODING: [0x54,0xc5,0xb5,0xc1]
49 // CHECK-ERROR: instruction requires: sme2
50 // CHECK-UNKNOWN: c1b5c554 <unknown>
52 sclamp {z22.s, z23.s}, z13.s, z8.s // 11000001-10101000-11000101-10110110
53 // CHECK-INST: sclamp { z22.s, z23.s }, z13.s, z8.s
54 // CHECK-ENCODING: [0xb6,0xc5,0xa8,0xc1]
55 // CHECK-ERROR: instruction requires: sme2
56 // CHECK-UNKNOWN: c1a8c5b6 <unknown>
58 sclamp {z30.s, z31.s}, z31.s, z31.s // 11000001-10111111-11000111-11111110
59 // CHECK-INST: sclamp { z30.s, z31.s }, z31.s, z31.s
60 // CHECK-ENCODING: [0xfe,0xc7,0xbf,0xc1]
61 // CHECK-ERROR: instruction requires: sme2
62 // CHECK-UNKNOWN: c1bfc7fe <unknown>
65 sclamp {z0.d, z1.d}, z0.d, z0.d // 11000001-11100000-11000100-00000000
66 // CHECK-INST: sclamp { z0.d, z1.d }, z0.d, z0.d
67 // CHECK-ENCODING: [0x00,0xc4,0xe0,0xc1]
68 // CHECK-ERROR: instruction requires: sme2
69 // CHECK-UNKNOWN: c1e0c400 <unknown>
71 sclamp {z20.d, z21.d}, z10.d, z21.d // 11000001-11110101-11000101-01010100
72 // CHECK-INST: sclamp { z20.d, z21.d }, z10.d, z21.d
73 // CHECK-ENCODING: [0x54,0xc5,0xf5,0xc1]
74 // CHECK-ERROR: instruction requires: sme2
75 // CHECK-UNKNOWN: c1f5c554 <unknown>
77 sclamp {z22.d, z23.d}, z13.d, z8.d // 11000001-11101000-11000101-10110110
78 // CHECK-INST: sclamp { z22.d, z23.d }, z13.d, z8.d
79 // CHECK-ENCODING: [0xb6,0xc5,0xe8,0xc1]
80 // CHECK-ERROR: instruction requires: sme2
81 // CHECK-UNKNOWN: c1e8c5b6 <unknown>
83 sclamp {z30.d, z31.d}, z31.d, z31.d // 11000001-11111111-11000111-11111110
84 // CHECK-INST: sclamp { z30.d, z31.d }, z31.d, z31.d
85 // CHECK-ENCODING: [0xfe,0xc7,0xff,0xc1]
86 // CHECK-ERROR: instruction requires: sme2
87 // CHECK-UNKNOWN: c1ffc7fe <unknown>
90 sclamp {z0.b, z1.b}, z0.b, z0.b // 11000001-00100000-11000100-00000000
91 // CHECK-INST: sclamp { z0.b, z1.b }, z0.b, z0.b
92 // CHECK-ENCODING: [0x00,0xc4,0x20,0xc1]
93 // CHECK-ERROR: instruction requires: sme2
94 // CHECK-UNKNOWN: c120c400 <unknown>
96 sclamp {z20.b, z21.b}, z10.b, z21.b // 11000001-00110101-11000101-01010100
97 // CHECK-INST: sclamp { z20.b, z21.b }, z10.b, z21.b
98 // CHECK-ENCODING: [0x54,0xc5,0x35,0xc1]
99 // CHECK-ERROR: instruction requires: sme2
100 // CHECK-UNKNOWN: c135c554 <unknown>
102 sclamp {z22.b, z23.b}, z13.b, z8.b // 11000001-00101000-11000101-10110110
103 // CHECK-INST: sclamp { z22.b, z23.b }, z13.b, z8.b
104 // CHECK-ENCODING: [0xb6,0xc5,0x28,0xc1]
105 // CHECK-ERROR: instruction requires: sme2
106 // CHECK-UNKNOWN: c128c5b6 <unknown>
108 sclamp {z30.b, z31.b}, z31.b, z31.b // 11000001-00111111-11000111-11111110
109 // CHECK-INST: sclamp { z30.b, z31.b }, z31.b, z31.b
110 // CHECK-ENCODING: [0xfe,0xc7,0x3f,0xc1]
111 // CHECK-ERROR: instruction requires: sme2
112 // CHECK-UNKNOWN: c13fc7fe <unknown>
115 sclamp {z0.h - z3.h}, z0.h, z0.h // 11000001-01100000-11001100-00000000
116 // CHECK-INST: sclamp { z0.h - z3.h }, z0.h, z0.h
117 // CHECK-ENCODING: [0x00,0xcc,0x60,0xc1]
118 // CHECK-ERROR: instruction requires: sme2
119 // CHECK-UNKNOWN: c160cc00 <unknown>
121 sclamp {z20.h - z23.h}, z10.h, z21.h // 11000001-01110101-11001101-01010100
122 // CHECK-INST: sclamp { z20.h - z23.h }, z10.h, z21.h
123 // CHECK-ENCODING: [0x54,0xcd,0x75,0xc1]
124 // CHECK-ERROR: instruction requires: sme2
125 // CHECK-UNKNOWN: c175cd54 <unknown>
127 sclamp {z20.h - z23.h}, z13.h, z8.h // 11000001-01101000-11001101-10110100
128 // CHECK-INST: sclamp { z20.h - z23.h }, z13.h, z8.h
129 // CHECK-ENCODING: [0xb4,0xcd,0x68,0xc1]
130 // CHECK-ERROR: instruction requires: sme2
131 // CHECK-UNKNOWN: c168cdb4 <unknown>
133 sclamp {z28.h - z31.h}, z31.h, z31.h // 11000001-01111111-11001111-11111100
134 // CHECK-INST: sclamp { z28.h - z31.h }, z31.h, z31.h
135 // CHECK-ENCODING: [0xfc,0xcf,0x7f,0xc1]
136 // CHECK-ERROR: instruction requires: sme2
137 // CHECK-UNKNOWN: c17fcffc <unknown>
140 sclamp {z0.s - z3.s}, z0.s, z0.s // 11000001-10100000-11001100-00000000
141 // CHECK-INST: sclamp { z0.s - z3.s }, z0.s, z0.s
142 // CHECK-ENCODING: [0x00,0xcc,0xa0,0xc1]
143 // CHECK-ERROR: instruction requires: sme2
144 // CHECK-UNKNOWN: c1a0cc00 <unknown>
146 sclamp {z20.s - z23.s}, z10.s, z21.s // 11000001-10110101-11001101-01010100
147 // CHECK-INST: sclamp { z20.s - z23.s }, z10.s, z21.s
148 // CHECK-ENCODING: [0x54,0xcd,0xb5,0xc1]
149 // CHECK-ERROR: instruction requires: sme2
150 // CHECK-UNKNOWN: c1b5cd54 <unknown>
152 sclamp {z20.s - z23.s}, z13.s, z8.s // 11000001-10101000-11001101-10110100
153 // CHECK-INST: sclamp { z20.s - z23.s }, z13.s, z8.s
154 // CHECK-ENCODING: [0xb4,0xcd,0xa8,0xc1]
155 // CHECK-ERROR: instruction requires: sme2
156 // CHECK-UNKNOWN: c1a8cdb4 <unknown>
158 sclamp {z28.s - z31.s}, z31.s, z31.s // 11000001-10111111-11001111-11111100
159 // CHECK-INST: sclamp { z28.s - z31.s }, z31.s, z31.s
160 // CHECK-ENCODING: [0xfc,0xcf,0xbf,0xc1]
161 // CHECK-ERROR: instruction requires: sme2
162 // CHECK-UNKNOWN: c1bfcffc <unknown>
165 sclamp {z0.d - z3.d}, z0.d, z0.d // 11000001-11100000-11001100-00000000
166 // CHECK-INST: sclamp { z0.d - z3.d }, z0.d, z0.d
167 // CHECK-ENCODING: [0x00,0xcc,0xe0,0xc1]
168 // CHECK-ERROR: instruction requires: sme2
169 // CHECK-UNKNOWN: c1e0cc00 <unknown>
171 sclamp {z20.d - z23.d}, z10.d, z21.d // 11000001-11110101-11001101-01010100
172 // CHECK-INST: sclamp { z20.d - z23.d }, z10.d, z21.d
173 // CHECK-ENCODING: [0x54,0xcd,0xf5,0xc1]
174 // CHECK-ERROR: instruction requires: sme2
175 // CHECK-UNKNOWN: c1f5cd54 <unknown>
177 sclamp {z20.d - z23.d}, z13.d, z8.d // 11000001-11101000-11001101-10110100
178 // CHECK-INST: sclamp { z20.d - z23.d }, z13.d, z8.d
179 // CHECK-ENCODING: [0xb4,0xcd,0xe8,0xc1]
180 // CHECK-ERROR: instruction requires: sme2
181 // CHECK-UNKNOWN: c1e8cdb4 <unknown>
183 sclamp {z28.d - z31.d}, z31.d, z31.d // 11000001-11111111-11001111-11111100
184 // CHECK-INST: sclamp { z28.d - z31.d }, z31.d, z31.d
185 // CHECK-ENCODING: [0xfc,0xcf,0xff,0xc1]
186 // CHECK-ERROR: instruction requires: sme2
187 // CHECK-UNKNOWN: c1ffcffc <unknown>
190 sclamp {z0.b - z3.b}, z0.b, z0.b // 11000001-00100000-11001100-00000000
191 // CHECK-INST: sclamp { z0.b - z3.b }, z0.b, z0.b
192 // CHECK-ENCODING: [0x00,0xcc,0x20,0xc1]
193 // CHECK-ERROR: instruction requires: sme2
194 // CHECK-UNKNOWN: c120cc00 <unknown>
196 sclamp {z20.b - z23.b}, z10.b, z21.b // 11000001-00110101-11001101-01010100
197 // CHECK-INST: sclamp { z20.b - z23.b }, z10.b, z21.b
198 // CHECK-ENCODING: [0x54,0xcd,0x35,0xc1]
199 // CHECK-ERROR: instruction requires: sme2
200 // CHECK-UNKNOWN: c135cd54 <unknown>
202 sclamp {z20.b - z23.b}, z13.b, z8.b // 11000001-00101000-11001101-10110100
203 // CHECK-INST: sclamp { z20.b - z23.b }, z13.b, z8.b
204 // CHECK-ENCODING: [0xb4,0xcd,0x28,0xc1]
205 // CHECK-ERROR: instruction requires: sme2
206 // CHECK-UNKNOWN: c128cdb4 <unknown>
208 sclamp {z28.b - z31.b}, z31.b, z31.b // 11000001-00111111-11001111-11111100
209 // CHECK-INST: sclamp { z28.b - z31.b }, z31.b, z31.b
210 // CHECK-ENCODING: [0xfc,0xcf,0x3f,0xc1]
211 // CHECK-ERROR: instruction requires: sme2
212 // CHECK-UNKNOWN: c13fcffc <unknown>