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