SVE Instruction List by Dougall Johnson
PTEST: Set condition flags for predicate
PTEST Pg, Pn.B (SVE (SME
bool svptest_any(svbool_t pg, svbool_t op)
bool svptest_first(svbool_t pg, svbool_t op)
bool svptest_last(svbool_t pg, svbool_t op)
128-bit SVE

Set flags (NZCV) based on a governing predicate (1), and a predicate (2).
Non-zero bits in the governing predicate (1) indicate active lanes. Bits from inactive lanes of (2) are ignored.
The flags are set as follows:
- N (FIRST): 1 if the lowest active lane in (2) is non-zero, otherwise 0
- Z (NONE): 1 if all active lanes in (2) are zero, otherwise 0
- C (!LAST): 1 if the highest active lane in (2) is zero, otherwise 0
- V: always set to 0
256-bit SVE

Set flags (NZCV) based on a governing predicate (1), and a predicate (2).
Non-zero bits in the governing predicate (1) indicate active lanes. Bits from inactive lanes of (2) are ignored.
The flags are set as follows:
- N (FIRST): 1 if the lowest active lane in (2) is non-zero, otherwise 0
- Z (NONE): 1 if all active lanes in (2) are zero, otherwise 0
- C (!LAST): 1 if the highest active lane in (2) is zero, otherwise 0
- V: always set to 0
512-bit SVE

Set flags (NZCV) based on a governing predicate (1), and a predicate (2).
Non-zero bits in the governing predicate (1) indicate active lanes. Bits from inactive lanes of (2) are ignored.
The flags are set as follows:
- N (FIRST): 1 if the lowest active lane in (2) is non-zero, otherwise 0
- Z (NONE): 1 if all active lanes in (2) are zero, otherwise 0
- C (!LAST): 1 if the highest active lane in (2) is zero, otherwise 0
- V: always set to 0
Larger sizes
1024-bit SVE

Set flags (NZCV) based on a governing predicate (1), and a predicate (2).
Non-zero bits in the governing predicate (1) indicate active lanes. Bits from inactive lanes of (2) are ignored.
The flags are set as follows:
- N (FIRST): 1 if the lowest active lane in (2) is non-zero, otherwise 0
- Z (NONE): 1 if all active lanes in (2) are zero, otherwise 0
- C (!LAST): 1 if the highest active lane in (2) is zero, otherwise 0
- V: always set to 0
2048-bit SVE

Set flags (NZCV) based on a governing predicate (1), and a predicate (2).
Non-zero bits in the governing predicate (1) indicate active lanes. Bits from inactive lanes of (2) are ignored.
The flags are set as follows:
- N (FIRST): 1 if the lowest active lane in (2) is non-zero, otherwise 0
- Z (NONE): 1 if all active lanes in (2) are zero, otherwise 0
- C (!LAST): 1 if the highest active lane in (2) is zero, otherwise 0
- V: always set to 0
Report mistakes or give feedback
Inspired by and based on the x86/x64 SIMD Instruction List by Daytime.