1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
8 define <vscale x 16 x i1> @ctpop_nxv16i1(<vscale x 16 x i1> %a) {
9 ; CHECK-LABEL: ctpop_nxv16i1:
12 %res = call <vscale x 16 x i1> @llvm.ctpop.nxv16i1(<vscale x 16 x i1> %a)
13 ret <vscale x 16 x i1> %res
16 define <vscale x 8 x i1> @ctpop_nxv8i1(<vscale x 8 x i1> %a) {
17 ; CHECK-LABEL: ctpop_nxv8i1:
20 %res = call <vscale x 8 x i1> @llvm.ctpop.nxv8i1(<vscale x 8 x i1> %a)
21 ret <vscale x 8 x i1> %res
24 define <vscale x 4 x i1> @ctpop_nxv4i1(<vscale x 4 x i1> %a) {
25 ; CHECK-LABEL: ctpop_nxv4i1:
28 %res = call <vscale x 4 x i1> @llvm.ctpop.nxv4i1(<vscale x 4 x i1> %a)
29 ret <vscale x 4 x i1> %res
32 define <vscale x 2 x i1> @ctpop_nxv2i1(<vscale x 2 x i1> %a) {
33 ; CHECK-LABEL: ctpop_nxv2i1:
36 %res = call <vscale x 2 x i1> @llvm.ctpop.nxv2i1(<vscale x 2 x i1> %a)
37 ret <vscale x 2 x i1> %res
42 define <vscale x 16 x i1> @ctlz_nxv16i1(<vscale x 16 x i1> %a) {
43 ; CHECK-LABEL: ctlz_nxv16i1:
45 ; CHECK-NEXT: ptrue p1.b
46 ; CHECK-NEXT: not p0.b, p1/z, p0.b
48 %res = call <vscale x 16 x i1> @llvm.ctlz.nxv16i1(<vscale x 16 x i1> %a)
49 ret <vscale x 16 x i1> %res
52 define <vscale x 8 x i1> @ctlz_nxv8i1(<vscale x 8 x i1> %a) {
53 ; CHECK-LABEL: ctlz_nxv8i1:
55 ; CHECK-NEXT: ptrue p1.h
56 ; CHECK-NEXT: not p0.b, p1/z, p0.b
58 %res = call <vscale x 8 x i1> @llvm.ctlz.nxv8i1(<vscale x 8 x i1> %a)
59 ret <vscale x 8 x i1> %res
62 define <vscale x 4 x i1> @ctlz_nxv4i1(<vscale x 4 x i1> %a) {
63 ; CHECK-LABEL: ctlz_nxv4i1:
65 ; CHECK-NEXT: ptrue p1.s
66 ; CHECK-NEXT: not p0.b, p1/z, p0.b
68 %res = call <vscale x 4 x i1> @llvm.ctlz.nxv4i1(<vscale x 4 x i1> %a)
69 ret <vscale x 4 x i1> %res
72 define <vscale x 2 x i1> @ctlz_nxv2i1(<vscale x 2 x i1> %a) {
73 ; CHECK-LABEL: ctlz_nxv2i1:
75 ; CHECK-NEXT: ptrue p1.d
76 ; CHECK-NEXT: not p0.b, p1/z, p0.b
78 %res = call <vscale x 2 x i1> @llvm.ctlz.nxv2i1(<vscale x 2 x i1> %a)
79 ret <vscale x 2 x i1> %res
84 define <vscale x 16 x i1> @cttz_nxv16i1(<vscale x 16 x i1> %a) {
85 ; CHECK-LABEL: cttz_nxv16i1:
87 ; CHECK-NEXT: ptrue p1.b
88 ; CHECK-NEXT: not p0.b, p1/z, p0.b
90 %res = call <vscale x 16 x i1> @llvm.cttz.nxv16i1(<vscale x 16 x i1> %a)
91 ret <vscale x 16 x i1> %res
94 define <vscale x 8 x i1> @cttz_nxv8i1(<vscale x 8 x i1> %a) {
95 ; CHECK-LABEL: cttz_nxv8i1:
97 ; CHECK-NEXT: ptrue p1.h
98 ; CHECK-NEXT: not p0.b, p1/z, p0.b
100 %res = call <vscale x 8 x i1> @llvm.cttz.nxv8i1(<vscale x 8 x i1> %a)
101 ret <vscale x 8 x i1> %res
104 define <vscale x 4 x i1> @cttz_nxv4i1(<vscale x 4 x i1> %a) {
105 ; CHECK-LABEL: cttz_nxv4i1:
107 ; CHECK-NEXT: ptrue p1.s
108 ; CHECK-NEXT: not p0.b, p1/z, p0.b
110 %res = call <vscale x 4 x i1> @llvm.cttz.nxv4i1(<vscale x 4 x i1> %a)
111 ret <vscale x 4 x i1> %res
114 define <vscale x 2 x i1> @cttz_nxv2i1(<vscale x 2 x i1> %a) {
115 ; CHECK-LABEL: cttz_nxv2i1:
117 ; CHECK-NEXT: ptrue p1.d
118 ; CHECK-NEXT: not p0.b, p1/z, p0.b
120 %res = call <vscale x 2 x i1> @llvm.cttz.nxv2i1(<vscale x 2 x i1> %a)
121 ret <vscale x 2 x i1> %res
124 declare <vscale x 16 x i1> @llvm.ctpop.nxv16i1(<vscale x 16 x i1>)
125 declare <vscale x 8 x i1> @llvm.ctpop.nxv8i1(<vscale x 8 x i1>)
126 declare <vscale x 4 x i1> @llvm.ctpop.nxv4i1(<vscale x 4 x i1>)
127 declare <vscale x 2 x i1> @llvm.ctpop.nxv2i1(<vscale x 2 x i1>)
129 declare <vscale x 16 x i1> @llvm.ctlz.nxv16i1(<vscale x 16 x i1>)
130 declare <vscale x 8 x i1> @llvm.ctlz.nxv8i1(<vscale x 8 x i1>)
131 declare <vscale x 4 x i1> @llvm.ctlz.nxv4i1(<vscale x 4 x i1>)
132 declare <vscale x 2 x i1> @llvm.ctlz.nxv2i1(<vscale x 2 x i1>)
134 declare <vscale x 16 x i1> @llvm.cttz.nxv16i1(<vscale x 16 x i1>)
135 declare <vscale x 8 x i1> @llvm.cttz.nxv8i1(<vscale x 8 x i1>)
136 declare <vscale x 4 x i1> @llvm.cttz.nxv4i1(<vscale x 4 x i1>)
137 declare <vscale x 2 x i1> @llvm.cttz.nxv2i1(<vscale x 2 x i1>)