Hi Tamar,
> +@mdindex extract_first_@var{m}
> +@item @code{extract_first_@var{m}}
> +Find the first set bit in mask operand 1 and extract the associated element
> +of vector operand 2. Store the result in scalar operand 0. Operand 2
> +has vector mode @var{m} while operand 0 has the mode appropriate for one
> +element of @var{m}. Operand 1 has the usual mask mode for vectors of mode
> +@var{m}; see @code{TARGET_VECTORIZE_GET_MASK_MODE}.
This is mostly bikeshedding and I realize it is modelled after
extract_last but I'd find it clearer if we called them
extract_first_live and extract_last_live. Or extract_first/last_active
to directly match count_active? That would also directly hint at the
riscv fallback which needs to do idx = COUNT_ACTIVE (mask/len),
"vec_extract (vec, idx)" (or idx = INDEX_FIRST_ACTIVE).
--
Regards
Robin