1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
11 %out = call i64 @llvm.aarch64.sve.cntb(i32 2)
15 define i64 @cntb_mul3() {
16 ; CHECK-LABEL: cntb_mul3:
17 ; CHECK: cntb x0, vl6, mul #3
19 %cnt = call i64 @llvm.aarch64.sve.cntb(i32 6)
20 %out = mul i64 %cnt, 3
24 define i64 @cntb_mul4() {
25 ; CHECK-LABEL: cntb_mul4:
26 ; CHECK: cntb x0, vl8, mul #4
28 %cnt = call i64 @llvm.aarch64.sve.cntb(i32 8)
29 %out = mul i64 %cnt, 4
41 %out = call i64 @llvm.aarch64.sve.cnth(i32 3)
45 define i64 @cnth_mul5() {
46 ; CHECK-LABEL: cnth_mul5:
47 ; CHECK: cnth x0, vl7, mul #5
49 %cnt = call i64 @llvm.aarch64.sve.cnth(i32 7)
50 %out = mul i64 %cnt, 5
54 define i64 @cnth_mul8() {
55 ; CHECK-LABEL: cnth_mul8:
56 ; CHECK: cnth x0, vl5, mul #8
58 %cnt = call i64 @llvm.aarch64.sve.cnth(i32 5)
59 %out = mul i64 %cnt, 8
71 %out = call i64 @llvm.aarch64.sve.cntw(i32 4)
75 define i64 @cntw_mul11() {
76 ; CHECK-LABEL: cntw_mul11:
77 ; CHECK: cntw x0, vl8, mul #11
79 %cnt = call i64 @llvm.aarch64.sve.cntw(i32 8)
80 %out = mul i64 %cnt, 11
84 define i64 @cntw_mul2() {
85 ; CHECK-LABEL: cntw_mul2:
86 ; CHECK: cntw x0, vl6, mul #2
88 %cnt = call i64 @llvm.aarch64.sve.cntw(i32 6)
89 %out = mul i64 %cnt, 2
101 %out = call i64 @llvm.aarch64.sve.cntd(i32 5)
105 define i64 @cntd_mul15() {
106 ; CHECK-LABEL: cntd_mul15:
107 ; CHECK: cntd x0, vl16, mul #15
109 %cnt = call i64 @llvm.aarch64.sve.cntd(i32 9)
110 %out = mul i64 %cnt, 15
114 define i64 @cntd_mul16() {
115 ; CHECK-LABEL: cntd_mul16:
116 ; CHECK: cntd x0, vl32, mul #16
118 %cnt = call i64 @llvm.aarch64.sve.cntd(i32 10)
119 %out = mul i64 %cnt, 16
127 define i64 @cntp_b8(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %a) {
128 ; CHECK-LABEL: cntp_b8:
129 ; CHECK: cntp x0, p0, p1.b
131 %out = call i64 @llvm.aarch64.sve.cntp.nxv16i1(<vscale x 16 x i1> %pg,
132 <vscale x 16 x i1> %a)
136 define i64 @cntp_b16(<vscale x 8 x i1> %pg, <vscale x 8 x i1> %a) {
137 ; CHECK-LABEL: cntp_b16:
138 ; CHECK: cntp x0, p0, p1.h
140 %out = call i64 @llvm.aarch64.sve.cntp.nxv8i1(<vscale x 8 x i1> %pg,
141 <vscale x 8 x i1> %a)
145 define i64 @cntp_b32(<vscale x 4 x i1> %pg, <vscale x 4 x i1> %a) {
146 ; CHECK-LABEL: cntp_b32:
147 ; CHECK: cntp x0, p0, p1.s
149 %out = call i64 @llvm.aarch64.sve.cntp.nxv4i1(<vscale x 4 x i1> %pg,
150 <vscale x 4 x i1> %a)
154 define i64 @cntp_b64(<vscale x 2 x i1> %pg, <vscale x 2 x i1> %a) {
155 ; CHECK-LABEL: cntp_b64:
156 ; CHECK: cntp x0, p0, p1.d
158 %out = call i64 @llvm.aarch64.sve.cntp.nxv2i1(<vscale x 2 x i1> %pg,
159 <vscale x 2 x i1> %a)
163 declare i64 @llvm.aarch64.sve.cntb(i32 %pattern)
164 declare i64 @llvm.aarch64.sve.cnth(i32 %pattern)
165 declare i64 @llvm.aarch64.sve.cntw(i32 %pattern)
166 declare i64 @llvm.aarch64.sve.cntd(i32 %pattern)
168 declare i64 @llvm.aarch64.sve.cntp.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>)
169 declare i64 @llvm.aarch64.sve.cntp.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>)
170 declare i64 @llvm.aarch64.sve.cntp.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>)
171 declare i64 @llvm.aarch64.sve.cntp.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>)