1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
7 define <vscale x 16 x i1> @brka_m_b8(<vscale x 16 x i1> %inactive, <vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
8 ; CHECK-LABEL: brka_m_b8:
9 ; CHECK: brka p0.b, p1/m, p2.b
11 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.nxv16i1(<vscale x 16 x i1> %inactive,
12 <vscale x 16 x i1> %pg,
13 <vscale x 16 x i1> %a)
14 ret <vscale x 16 x i1> %out
17 define <vscale x 16 x i1> @brka_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
18 ; CHECK-LABEL: brka_z_b8:
19 ; CHECK: brka p0.b, p0/z, p1.b
21 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brka.z.nxv16i1(<vscale x 16 x i1> %pg,
22 <vscale x 16 x i1> %a)
23 ret <vscale x 16 x i1> %out
30 define <vscale x 16 x i1> @brkb_m_b8(<vscale x 16 x i1> %inactive, <vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
31 ; CHECK-LABEL: brkb_m_b8:
32 ; CHECK: brkb p0.b, p1/m, p2.b
34 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.nxv16i1(<vscale x 16 x i1> %inactive,
35 <vscale x 16 x i1> %pg,
36 <vscale x 16 x i1> %a)
37 ret <vscale x 16 x i1> %out
40 define <vscale x 16 x i1> @brkb_z_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
41 ; CHECK-LABEL: brkb_z_b8:
42 ; CHECK: brkb p0.b, p0/z, p1.b
44 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkb.z.nxv16i1(<vscale x 16 x i1> %pg,
45 <vscale x 16 x i1> %a)
46 ret <vscale x 16 x i1> %out
53 define <vscale x 16 x i1> @brkn_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
54 ; CHECK-LABEL: brkn_b8:
55 ; CHECK: brkn p2.b, p0/z, p1.b, p2.b
56 ; CHECK-NEXT: mov p0.b, p2.b
58 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkn.z.nxv16i1(<vscale x 16 x i1> %pg,
59 <vscale x 16 x i1> %a,
60 <vscale x 16 x i1> %b)
61 ret <vscale x 16 x i1> %out
68 define <vscale x 16 x i1> @brkpa_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
69 ; CHECK-LABEL: brkpa_b8:
70 ; CHECK: brkpa p0.b, p0/z, p1.b, p2.b
72 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpa.z.nxv16i1(<vscale x 16 x i1> %pg,
73 <vscale x 16 x i1> %a,
74 <vscale x 16 x i1> %b)
75 ret <vscale x 16 x i1> %out
82 define <vscale x 16 x i1> @brkpb_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a, <vscale x 16 x i1> %b) {
83 ; CHECK-LABEL: brkpb_b8:
84 ; CHECK: brkpb p0.b, p0/z, p1.b, p2.b
86 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.brkpb.z.nxv16i1(<vscale x 16 x i1> %pg,
87 <vscale x 16 x i1> %a,
88 <vscale x 16 x i1> %b)
89 ret <vscale x 16 x i1> %out
96 define <vscale x 16 x i1> @pfirst_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
97 ; CHECK-LABEL: pfirst_b8:
98 ; CHECK: pfirst p1.b, p0, p1.b
99 ; CHECK-NEXT: mov p0.b, p1.b
101 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1> %pg,
102 <vscale x 16 x i1> %a)
103 ret <vscale x 16 x i1> %out
110 define <vscale x 16 x i1> @pnext_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
111 ; CHECK-LABEL: pnext_b8:
112 ; CHECK: pnext p1.b, p0, p1.b
113 ; CHECK-NEXT: mov p0.b, p1.b
115 %out = call <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1> %pg,
116 <vscale x 16 x i1> %a)
117 ret <vscale x 16 x i1> %out
120 define <vscale x 8 x i1> @pnext_b16(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a) {
121 ; CHECK-LABEL: pnext_b16:
122 ; CHECK: pnext p1.h, p0, p1.h
123 ; CHECK-NEXT: mov p0.b, p1.b
125 %out = call <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1> %pg,
126 <vscale x 8 x i1> %a)
127 ret <vscale x 8 x i1> %out
130 define <vscale x 4 x i1> @pnext_b32(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a) {
131 ; CHECK-LABEL: pnext_b32:
132 ; CHECK: pnext p1.s, p0, p1.s
133 ; CHECK-NEXT: mov p0.b, p1.b
135 %out = call <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1> %pg,
136 <vscale x 4 x i1> %a)
137 ret <vscale x 4 x i1> %out
140 define <vscale x 2 x i1> @pnext_b64(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a) {
141 ; CHECK-LABEL: pnext_b64:
142 ; CHECK: pnext p1.d, p0, p1.d
143 ; CHECK-NEXT: mov p0.b, p1.b
145 %out = call <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1> %pg,
146 <vscale x 2 x i1> %a)
147 ret <vscale x 2 x i1> %out
154 define <vscale x 8 x i1> @punpkhi_b16(<vscale x 16 x i1> %a) {
155 ; CHECK-LABEL: punpkhi_b16
156 ; CHECK: punpkhi p0.h, p0.b
158 %res = call <vscale x 8 x i1> @llvm.aarch64.sve.punpkhi.nxv8i1(<vscale x 16 x i1> %a)
159 ret <vscale x 8 x i1> %res
162 define <vscale x 4 x i1> @punpkhi_b8(<vscale x 8 x i1> %a) {
163 ; CHECK-LABEL: punpkhi_b8
164 ; CHECK: punpkhi p0.h, p0.b
166 %res = call <vscale x 4 x i1> @llvm.aarch64.sve.punpkhi.nxv4i1(<vscale x 8 x i1> %a)
167 ret <vscale x 4 x i1> %res
170 define <vscale x 2 x i1> @punpkhi_b4(<vscale x 4 x i1> %a) {
171 ; CHECK-LABEL: punpkhi_b4
172 ; CHECK: punpkhi p0.h, p0.b
174 %res = call <vscale x 2 x i1> @llvm.aarch64.sve.punpkhi.nxv2i1(<vscale x 4 x i1> %a)
175 ret <vscale x 2 x i1> %res
182 define <vscale x 8 x i1> @punpklo_b16(<vscale x 16 x i1> %a) {
183 ; CHECK-LABEL: punpklo_b16
184 ; CHECK: punpklo p0.h, p0.b
186 %res = call <vscale x 8 x i1> @llvm.aarch64.sve.punpklo.nxv8i1(<vscale x 16 x i1> %a)
187 ret <vscale x 8 x i1> %res
190 define <vscale x 4 x i1> @punpklo_b8(<vscale x 8 x i1> %a) {
191 ; CHECK-LABEL: punpklo_b8
192 ; CHECK: punpklo p0.h, p0.b
194 %res = call <vscale x 4 x i1> @llvm.aarch64.sve.punpklo.nxv4i1(<vscale x 8 x i1> %a)
195 ret <vscale x 4 x i1> %res
198 define <vscale x 2 x i1> @punpklo_b4(<vscale x 4 x i1> %a) {
199 ; CHECK-LABEL: punpklo_b4
200 ; CHECK: punpklo p0.h, p0.b
202 %res = call <vscale x 2 x i1> @llvm.aarch64.sve.punpklo.nxv2i1(<vscale x 4 x i1> %a)
203 ret <vscale x 2 x i1> %res
206 declare <vscale x 16 x i1> @llvm.aarch64.sve.brka.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
207 declare <vscale x 16 x i1> @llvm.aarch64.sve.brka.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
208 declare <vscale x 16 x i1> @llvm.aarch64.sve.brkb.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
209 declare <vscale x 16 x i1> @llvm.aarch64.sve.brkb.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
210 declare <vscale x 16 x i1> @llvm.aarch64.sve.brkn.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
211 declare <vscale x 16 x i1> @llvm.aarch64.sve.brkpa.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
212 declare <vscale x 16 x i1> @llvm.aarch64.sve.brkpb.z.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>)
214 declare <vscale x 16 x i1> @llvm.aarch64.sve.pfirst.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
216 declare <vscale x 16 x i1> @llvm.aarch64.sve.pnext.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
217 declare <vscale x 8 x i1> @llvm.aarch64.sve.pnext.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>)
218 declare <vscale x 4 x i1> @llvm.aarch64.sve.pnext.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>)
219 declare <vscale x 2 x i1> @llvm.aarch64.sve.pnext.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>)
221 declare <vscale x 8 x i1> @llvm.aarch64.sve.punpkhi.nxv8i1(<vscale x 16 x i1>)
222 declare <vscale x 4 x i1> @llvm.aarch64.sve.punpkhi.nxv4i1(<vscale x 8 x i1>)
223 declare <vscale x 2 x i1> @llvm.aarch64.sve.punpkhi.nxv2i1(<vscale x 4 x i1>)
225 declare <vscale x 8 x i1> @llvm.aarch64.sve.punpklo.nxv8i1(<vscale x 16 x i1>)
226 declare <vscale x 4 x i1> @llvm.aarch64.sve.punpklo.nxv4i1(<vscale x 8 x i1>)
227 declare <vscale x 2 x i1> @llvm.aarch64.sve.punpklo.nxv2i1(<vscale x 4 x i1>)