1. One or more storage media storing instructions which, when executed by one or more processors, cause: storing, in a first register, a plurality of matching data elements, each of which indicates whether a corresponding input data element in a plurality of input data elements is to be stored in a set of output data elements; executing a first vectorized instruction against the plurality of the matching data elements in the first register to generate a first result; based on the first result, identifying a shuffle mask from among a plurality of shuffle masks; storing the shuffle mask in a second register; storing the plurality of input data elements in a third register that is different than the second register; executing a second vectorized instruction against the plurality of input data elements in the third register and the shuffle mask in the second register to generate a second result; storing one or more output data elements based on the second result.