zoo icon indicating copy to clipboard operation
zoo copied to clipboard

Plural right shift

Open jamierpond opened this issue 8 months ago • 0 comments

Now is correct. Godbolt for your amusement. https://godbolt.org/z/T51GPhT8M

Generate the smallest mask required to blit out the overflow using (2^shift_size - 1) which basially transforms shift size into a tally representation of itself in binary. Such that 2 -> 11; 3 -> 111; 4 -> 1111; etc. This then only requires the lane index mask and a shift, then or'ing it all back into the result.

jamierpond avatar Jun 05 '24 03:06 jamierpond