> -----Original Message-----
> From: Robin Dapp <[email protected]>
> Sent: 14 September 2026 11:56
> To: Tamar Christina <[email protected]>; [email protected]
> Cc: nd <[email protected]>; [email protected]; Robin Dapp
> <[email protected]>
> Subject: Re: [patch 1/14]middle-end: add new vector control flow IFNs and
> optabs
>
> 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).
Sure, I have no problem with this renaming them, but perhaps a standard
nomenclature? maybe extract_{first/last}_active?
Thanks,
Tamar
>
> --
> Regards
> Robin