The last bit – Part 1

The RISC-V Vector Extension (RVV) includes several instructions to operate on masks and compute interesting things. One of them is vfirst.m that computes the lowest-numbered element of the mask that is set. However, there is no vlast.m instruction that computes the highest-numbered element of the mask that is set.