A system for executing an instruction, the system comprising: a memory; a processor comprising: a fetch circuit to fetch the instruction from a code storage, the instruction comprising an opcode, a first destination identifier, a second destination identifier, a source operand identifier, and a control mask; a decode circuit to decode the fetched instruction; and an execution circuit to execute the decoded instruction to perform a method on each element of a source operand identified by the source operand identifier, the method comprising: generating a result by performing an operation on the element, the operation comprising one of compression and expansion; and determining a bit value of the control mask at a bit position corresponding to a position of the element within the source operand when the bit value has a first value, storing the result to a first location identified by the first destination identifier and incrementing the first destination identifier by a size of the result, and when the bit value has a second value, storing the result to a second location identified by the second destination identifier and incrementing the second destination identifier by the size of the result. a memory; a processor comprising: a fetch circuit to fetch the instruction from a code storage, the instruction comprising an opcode, a first destination identifier, a second destination identifier, a source operand identifier, and a control mask; a decode circuit to decode the fetched instruction; and an execution circuit to execute the decoded instruction to perform a method on each element of a source operand identified by the source operand identifier, the method comprising: generating a result by performing an operation on the element, the operation comprising one of compression and expansion; and determining a bit value of the control mask at a bit position corresponding to a position of the element within the source operand when the bit value has a first value, storing the result to a first location identified by the first destination identifier and incrementing the first destination identifier by a size of the result, and when the bit value has a second value, storing the result to a second location identified by the second destination identifier and incrementing the second destination identifier by the size of the result. a fetch circuit to fetch the instruction from a code storage, the instruction comprising an opcode, a first destination identifier, a second destination identifier, a source operand identifier, and a control mask; a decode circuit to decode the fetched instruction; and an execution circuit to execute the decoded instruction to perform a method on each element of a source operand identified by the source operand identifier, the method comprising: generating a result by performing an operation on the element, the operation comprising one of compression and expansion; and determining a bit value of the control mask at a bit position corresponding to a position of the element within the source operand when the bit value has a first value, storing the result to a first location identified by the first destination identifier and incrementing the first destination identifier by a size of the result, and when the bit value has a second value, storing the result to a second location identified by the second destination identifier and incrementing the second destination identifier by the size of the result. generating a result by performing an operation on the element, the operation comprising one of compression and expansion; and determining a bit value of the control mask at a bit position corresponding to a position of the element within the source operand when the bit value has a first value, storing the result to a first location identified by the first destination identifier and incrementing the first destination identifier by a size of the result, and when the bit value has a second value, storing the result to a second location identified by the second destination identifier and incrementing the second destination identifier by the size of the result.