Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / insr.s
blob09d2a9a6aeb4d54aae65edcc924ff1e9fbc2f53d
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 -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10 // RUN: | llvm-objdump -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12 insr z0.b, w0
13 // CHECK-INST: insr z0.b, w0
14 // CHECK-ENCODING: [0x00,0x38,0x24,0x05]
15 // CHECK-ERROR: instruction requires: sve or sme
16 // CHECK-UNKNOWN: 05243800 <unknown>
18 insr z0.h, w0
19 // CHECK-INST: insr z0.h, w0
20 // CHECK-ENCODING: [0x00,0x38,0x64,0x05]
21 // CHECK-ERROR: instruction requires: sve or sme
22 // CHECK-UNKNOWN: 05643800 <unknown>
24 insr z0.s, w0
25 // CHECK-INST: insr z0.s, w0
26 // CHECK-ENCODING: [0x00,0x38,0xa4,0x05]
27 // CHECK-ERROR: instruction requires: sve or sme
28 // CHECK-UNKNOWN: 05a43800 <unknown>
30 insr z0.d, x0
31 // CHECK-INST: insr z0.d, x0
32 // CHECK-ENCODING: [0x00,0x38,0xe4,0x05]
33 // CHECK-ERROR: instruction requires: sve or sme
34 // CHECK-UNKNOWN: 05e43800 <unknown>
36 insr z31.b, wzr
37 // CHECK-INST: insr z31.b, wzr
38 // CHECK-ENCODING: [0xff,0x3b,0x24,0x05]
39 // CHECK-ERROR: instruction requires: sve or sme
40 // CHECK-UNKNOWN: 05243bff <unknown>
42 insr z31.h, wzr
43 // CHECK-INST: insr z31.h, wzr
44 // CHECK-ENCODING: [0xff,0x3b,0x64,0x05]
45 // CHECK-ERROR: instruction requires: sve or sme
46 // CHECK-UNKNOWN: 05643bff <unknown>
48 insr z31.s, wzr
49 // CHECK-INST: insr z31.s, wzr
50 // CHECK-ENCODING: [0xff,0x3b,0xa4,0x05]
51 // CHECK-ERROR: instruction requires: sve or sme
52 // CHECK-UNKNOWN: 05a43bff <unknown>
54 insr z31.d, xzr
55 // CHECK-INST: insr z31.d, xzr
56 // CHECK-ENCODING: [0xff,0x3b,0xe4,0x05]
57 // CHECK-ERROR: instruction requires: sve or sme
58 // CHECK-UNKNOWN: 05e43bff <unknown>
60 insr z31.b, b31
61 // CHECK-INST: insr z31.b, b31
62 // CHECK-ENCODING: [0xff,0x3b,0x34,0x05]
63 // CHECK-ERROR: instruction requires: sve or sme
64 // CHECK-UNKNOWN: 05343bff <unknown>
66 insr z31.h, h31
67 // CHECK-INST: insr z31.h, h31
68 // CHECK-ENCODING: [0xff,0x3b,0x74,0x05]
69 // CHECK-ERROR: instruction requires: sve or sme
70 // CHECK-UNKNOWN: 05743bff <unknown>
72 insr z31.s, s31
73 // CHECK-INST: insr z31.s, s31
74 // CHECK-ENCODING: [0xff,0x3b,0xb4,0x05]
75 // CHECK-ERROR: instruction requires: sve or sme
76 // CHECK-UNKNOWN: 05b43bff <unknown>
78 insr z31.d, d31
79 // CHECK-INST: insr z31.d, d31
80 // CHECK-ENCODING: [0xff,0x3b,0xf4,0x05]
81 // CHECK-ERROR: instruction requires: sve or sme
82 // CHECK-UNKNOWN: 05f43bff <unknown>
85 // --------------------------------------------------------------------------//
86 // Test compatibility with MOVPRFX instruction.
88 movprfx z31, z6
89 // CHECK-INST: movprfx z31, z6
90 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
91 // CHECK-ERROR: instruction requires: sve or sme
92 // CHECK-UNKNOWN: 0420bcdf <unknown>
94 insr z31.d, xzr
95 // CHECK-INST: insr z31.d, xzr
96 // CHECK-ENCODING: [0xff,0x3b,0xe4,0x05]
97 // CHECK-ERROR: instruction requires: sve or sme
98 // CHECK-UNKNOWN: 05e43bff <unknown>
100 movprfx z4, z6
101 // CHECK-INST: movprfx z4, z6
102 // CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
103 // CHECK-ERROR: instruction requires: sve or sme
104 // CHECK-UNKNOWN: 0420bcc4 <unknown>
106 insr z4.d, d31
107 // CHECK-INST: insr z4.d, d31
108 // CHECK-ENCODING: [0xe4,0x3b,0xf4,0x05]
109 // CHECK-ERROR: instruction requires: sve or sme
110 // CHECK-UNKNOWN: 05f43be4 <unknown>