No, there is no whole equivalent. Therefore, you must either imitate him or deceive him.
One method is to use _mm_shuffle_epi32() on A and B Then mask the desired terms and OR them back together.
It tends to be erratic and has about 5 instructions. (Or 3 if you are using SSE4.1 mixing instructions.)
Here's a SSE4.1 solution with three instructions:
__m128i A = _mm_set_epi32(13,12,11,10); __m128i B = _mm_set_epi32(23,22,21,20); A = _mm_shuffle_epi32(A,2*1 + 3*4 + 2*16 + 3*64); B = _mm_shuffle_epi32(B,2*1 + 3*4 + 2*16 + 3*64); __m128i C = _mm_blend_epi16(A,B,0xf0);
The method I prefer is to actually fool - and shuffle with a floating point, like this:
__m128i Ai,Bi,Ci; __m128 Af,Bf,Cf; Af = _mm_castsi128_ps(Ai); Bf = _mm_castsi128_ps(Bi); Cf = _mm_shuffle_ps(Af,Bf,_MM_SHUFFLE(3,2,3,2)); Ci = _mm_castps_si128(Cf);
What this means is to convert the data type to a floating point so that it can use float-shuffle. Then convert it back.
Note that these βconversionsβ are bitwise transforms (also called reinterpretations). In fact, the conversion is not performed, and they are not tied to any instructions. In the assembly, there is no difference between an integer or an SSE floating point register. These cast instincts are intended only to circumvent the type safety imposed by C / C ++.
However, keep in mind that this approach requires additional delay to move data back and forth between whole units of floating point SIMDs. This way it will be more expensive than just a shuffle command.