[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE / subr.s
blobec6fa65c962124c91b167f364994a6461dbc19da
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
11 subr z0.b, p0/m, z0.b, z0.b
12 // CHECK-INST: subr z0.b, p0/m, z0.b, z0.b
13 // CHECK-ENCODING: [0x00,0x00,0x03,0x04]
14 // CHECK-ERROR: instruction requires: sve
15 // CHECK-UNKNOWN: 00 00 03 04 <unknown>
17 subr z0.h, p0/m, z0.h, z0.h
18 // CHECK-INST: subr z0.h, p0/m, z0.h, z0.h
19 // CHECK-ENCODING: [0x00,0x00,0x43,0x04]
20 // CHECK-ERROR: instruction requires: sve
21 // CHECK-UNKNOWN: 00 00 43 04 <unknown>
23 subr z0.s, p0/m, z0.s, z0.s
24 // CHECK-INST: subr z0.s, p0/m, z0.s, z0.s
25 // CHECK-ENCODING: [0x00,0x00,0x83,0x04]
26 // CHECK-ERROR: instruction requires: sve
27 // CHECK-UNKNOWN: 00 00 83 04 <unknown>
29 subr z0.d, p0/m, z0.d, z0.d
30 // CHECK-INST: subr z0.d, p0/m, z0.d, z0.d
31 // CHECK-ENCODING: [0x00,0x00,0xc3,0x04]
32 // CHECK-ERROR: instruction requires: sve
33 // CHECK-UNKNOWN: 00 00 c3 04 <unknown>
35 subr z0.b, z0.b, #0
36 // CHECK-INST: subr z0.b, z0.b, #0
37 // CHECK-ENCODING: [0x00,0xc0,0x23,0x25]
38 // CHECK-ERROR: instruction requires: sve
39 // CHECK-UNKNOWN: 00 c0 23 25 <unknown>
41 subr z31.b, z31.b, #255
42 // CHECK-INST: subr z31.b, z31.b, #255
43 // CHECK-ENCODING: [0xff,0xdf,0x23,0x25]
44 // CHECK-ERROR: instruction requires: sve
45 // CHECK-UNKNOWN: ff df 23 25 <unknown>
47 subr z0.h, z0.h, #0
48 // CHECK-INST: subr z0.h, z0.h, #0
49 // CHECK-ENCODING: [0x00,0xc0,0x63,0x25]
50 // CHECK-ERROR: instruction requires: sve
51 // CHECK-UNKNOWN: 00 c0 63 25 <unknown>
53 subr z0.h, z0.h, #0, lsl #8
54 // CHECK-INST: subr z0.h, z0.h, #0, lsl #8
55 // CHECK-ENCODING: [0x00,0xe0,0x63,0x25]
56 // CHECK-ERROR: instruction requires: sve
57 // CHECK-UNKNOWN: 00 e0 63 25 <unknown>
59 subr z31.h, z31.h, #255, lsl #8
60 // CHECK-INST: subr z31.h, z31.h, #65280
61 // CHECK-ENCODING: [0xff,0xff,0x63,0x25]
62 // CHECK-ERROR: instruction requires: sve
63 // CHECK-UNKNOWN: ff ff 63 25 <unknown>
65 subr z31.h, z31.h, #65280
66 // CHECK-INST: subr z31.h, z31.h, #65280
67 // CHECK-ENCODING: [0xff,0xff,0x63,0x25]
68 // CHECK-ERROR: instruction requires: sve
69 // CHECK-UNKNOWN: ff ff 63 25 <unknown>
71 subr z0.s, z0.s, #0
72 // CHECK-INST: subr z0.s, z0.s, #0
73 // CHECK-ENCODING: [0x00,0xc0,0xa3,0x25]
74 // CHECK-ERROR: instruction requires: sve
75 // CHECK-UNKNOWN: 00 c0 a3 25 <unknown>
77 subr z0.s, z0.s, #0, lsl #8
78 // CHECK-INST: subr z0.s, z0.s, #0, lsl #8
79 // CHECK-ENCODING: [0x00,0xe0,0xa3,0x25]
80 // CHECK-ERROR: instruction requires: sve
81 // CHECK-UNKNOWN: 00 e0 a3 25 <unknown>
83 subr z31.s, z31.s, #255, lsl #8
84 // CHECK-INST: subr z31.s, z31.s, #65280
85 // CHECK-ENCODING: [0xff,0xff,0xa3,0x25]
86 // CHECK-ERROR: instruction requires: sve
87 // CHECK-UNKNOWN: ff ff a3 25 <unknown>
89 subr z31.s, z31.s, #65280
90 // CHECK-INST: subr z31.s, z31.s, #65280
91 // CHECK-ENCODING: [0xff,0xff,0xa3,0x25]
92 // CHECK-ERROR: instruction requires: sve
93 // CHECK-UNKNOWN: ff ff a3 25 <unknown>
95 subr z0.d, z0.d, #0
96 // CHECK-INST: subr z0.d, z0.d, #0
97 // CHECK-ENCODING: [0x00,0xc0,0xe3,0x25]
98 // CHECK-ERROR: instruction requires: sve
99 // CHECK-UNKNOWN: 00 c0 e3 25 <unknown>
101 subr z0.d, z0.d, #0, lsl #8
102 // CHECK-INST: subr z0.d, z0.d, #0, lsl #8
103 // CHECK-ENCODING: [0x00,0xe0,0xe3,0x25]
104 // CHECK-ERROR: instruction requires: sve
105 // CHECK-UNKNOWN: 00 e0 e3 25 <unknown>
107 subr z31.d, z31.d, #255, lsl #8
108 // CHECK-INST: subr z31.d, z31.d, #65280
109 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
110 // CHECK-ERROR: instruction requires: sve
111 // CHECK-UNKNOWN: ff ff e3 25 <unknown>
113 subr z31.d, z31.d, #65280
114 // CHECK-INST: subr z31.d, z31.d, #65280
115 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
116 // CHECK-ERROR: instruction requires: sve
117 // CHECK-UNKNOWN: ff ff e3 25 <unknown>
120 // --------------------------------------------------------------------------//
121 // Test compatibility with MOVPRFX instruction.
123 movprfx z5.d, p0/z, z7.d
124 // CHECK-INST: movprfx z5.d, p0/z, z7.d
125 // CHECK-ENCODING: [0xe5,0x20,0xd0,0x04]
126 // CHECK-ERROR: instruction requires: sve
127 // CHECK-UNKNOWN: e5 20 d0 04 <unknown>
129 subr z5.d, p0/m, z5.d, z0.d
130 // CHECK-INST: subr z5.d, p0/m, z5.d, z0.d
131 // CHECK-ENCODING: [0x05,0x00,0xc3,0x04]
132 // CHECK-ERROR: instruction requires: sve
133 // CHECK-UNKNOWN: 05 00 c3 04 <unknown>
135 movprfx z5, z7
136 // CHECK-INST: movprfx z5, z7
137 // CHECK-ENCODING: [0xe5,0xbc,0x20,0x04]
138 // CHECK-ERROR: instruction requires: sve
139 // CHECK-UNKNOWN: e5 bc 20 04 <unknown>
141 subr z5.d, p0/m, z5.d, z0.d
142 // CHECK-INST: subr z5.d, p0/m, z5.d, z0.d
143 // CHECK-ENCODING: [0x05,0x00,0xc3,0x04]
144 // CHECK-ERROR: instruction requires: sve
145 // CHECK-UNKNOWN: 05 00 c3 04 <unknown>
147 movprfx z31, z6
148 // CHECK-INST: movprfx z31, z6
149 // CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
150 // CHECK-ERROR: instruction requires: sve
151 // CHECK-UNKNOWN: df bc 20 04 <unknown>
153 subr z31.d, z31.d, #65280
154 // CHECK-INST: subr z31.d, z31.d, #65280
155 // CHECK-ENCODING: [0xff,0xff,0xe3,0x25]
156 // CHECK-ERROR: instruction requires: sve
157 // CHECK-UNKNOWN: ff ff e3 25 <unknown>