Convert _mm_shuffle_epi32 to C expression for the permutation?
I'm working on a port of SSE2 to NEON. The port is early stage and it's producing incorrect results. Part of the reason for the incorrect results is _mm_shuffle_epi32 and the NEON instructions I selected. The documentation for _mm_shuffle_epi32 is on the lean side from Microsoft . The Intel documentation is better, but it's not clear to me what some of the pseudo-code is doing. SELECT4(src, control) { CASE(control[1:0]) 0: tmp[31:0] := src[31:0] 1: tmp[31:0] := src[63:32] 2: tmp[31:0] := src[95:64] 3: tmp[31:0] := src[127:96] ESAC RETURN tmp[31:0] } dst[31:0] := SELECT4(a[127:0], imm8[1:0])