Skip to content

Commit ba5f5b6

Browse files
committed
Core (Memory): Use _mm_set_epi16() for broadcasting the 16-bit value to set.
1 parent c431a24 commit ba5f5b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libvisual/libvisual/lv_mem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ static void *mem_set16_c (void *dest, int c, visual_size_t n)
140140
void *mem_set16_x86_sse2 (void *dest, int c, size_t n)
141141
{
142142
const uint16_t copy = c & 0xffff;
143-
const uint32_t copy_2x = copy | (copy << 16);
144-
const __m128i copy_4x = _mm_set_epi32 (copy_2x, copy_2x, copy_2x, copy_2x);
143+
const __m128i copy_4x = _mm_set_epi16 (copy, copy, copy, copy, copy, copy, copy, copy);
145144

146145
__m128i *m128i_ptr = (__m128i *) dest;
147146

0 commit comments

Comments
 (0)