From 6950ff22bab7af0464c243179fd1a8a73708257a Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Fri, 6 Dec 2024 19:52:42 +0000 Subject: [PATCH] Fix sign conversion in ws_insert --- src/util/simd/fd_avx_wh.h | 2 +- src/util/simd/fd_avx_ws.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/simd/fd_avx_wh.h b/src/util/simd/fd_avx_wh.h index 29be84f60a..89adf0c40b 100644 --- a/src/util/simd/fd_avx_wh.h +++ b/src/util/simd/fd_avx_wh.h @@ -59,7 +59,7 @@ static inline void wh_stu( void * p, wh_t i ) { _mm256_storeu_si256( (__m256i *) Note: C99 TC3 allows type punning through a union. */ #define wh_extract(a,imm) ((ushort)_mm256_extract_epi16( (a), (imm) )) -#define wh_insert(a,imm,v) _mm256_insert_epi16( (a), (int)(v), (imm) ) +#define wh_insert(a,imm,v) _mm256_insert_epi16( (a), (short)(v), (imm) ) static inline ushort wh_extract_variable( wh_t a, int n ) { diff --git a/src/util/simd/fd_avx_ws.h b/src/util/simd/fd_avx_ws.h index ead7358f73..96614486c2 100644 --- a/src/util/simd/fd_avx_ws.h +++ b/src/util/simd/fd_avx_ws.h @@ -59,7 +59,7 @@ static inline void ws_stu( void * p, ws_t i ) { _mm256_storeu_si256( (__m256i *) Note: C99 TC3 allows type punning through a union. */ #define ws_extract(a,imm) ((short)_mm256_extract_epi16( (a), (imm) )) -#define ws_insert(a,imm,v) _mm256_insert_epi16( (a), (int)(v), (imm) ) +#define ws_insert(a,imm,v) _mm256_insert_epi16( (a), (v), (imm) ) static inline short ws_extract_variable( ws_t a, int n ) {