SVE Instruction List by Dougall Johnson
See "HISTCNT" in the exploration tools

HISTCNT: Count matching elements in vector

HISTCNT Zd.D, Pg/Z, Zn.D, Zm.D (SVE2+NS
svuint64_t svhistcnt[_s64]_z(svbool_t pg, svint64_t op1, svint64_t op2)
svuint64_t svhistcnt[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2)

128-bit SVE

For each 64-bit element from (3), count the equal corresponding or preceding 64-bit elements from (2), and write the count to (4). If the predicate bit from (1) is zero, the corresponding element in (2) is not included in any counts, and the corresponding element in (4) is zeroed.

256-bit SVE

For each 64-bit element from (3), count the equal corresponding or preceding 64-bit elements from (2), and write the count to (4). If the predicate bit from (1) is zero, the corresponding element in (2) is not included in any counts, and the corresponding element in (4) is zeroed.

512-bit SVE

For each 64-bit element from (3), count the equal corresponding or preceding 64-bit elements from (2), and write the count to (4). If the predicate bit from (1) is zero, the corresponding element in (2) is not included in any counts, and the corresponding element in (4) is zeroed.

Larger sizes

1024-bit SVE

For each 64-bit element from (3), count the equal corresponding or preceding 64-bit elements from (2), and write the count to (4). If the predicate bit from (1) is zero, the corresponding element in (2) is not included in any counts, and the corresponding element in (4) is zeroed.

2048-bit SVE

For each 64-bit element from (3), count the equal corresponding or preceding 64-bit elements from (2), and write the count to (4). If the predicate bit from (1) is zero, the corresponding element in (2) is not included in any counts, and the corresponding element in (4) is zeroed.

Report mistakes or give feedback
Inspired by and based on the x86/x64 SIMD Instruction List by Daytime.