sse: use portable implementation to work around llvm bug
Just disabling the warning doesn't work if you pass the
fno-lax-vector-conversions flag, and clang should provide a good
implementation of the protable versions anyways.
@@ -2549,17 +2549,8 @@ simde_mm_extract_pi16 (simde__m64 a, const int imm8)
simde__m64_private a_ = simde__m64_to_private(a);
return a_.i16[imm8];
}
-#if defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_X86_MMX_NATIVE) && !defined(HEDLEY_PGI_VERSION)
-# if defined(SIMDE_BUG_CLANG_44589)
-# define simde_mm_extract_pi16(a, imm8) ( \
- HEDLEY_DIAGNOSTIC_PUSH \
- _Pragma("clang diagnostic ignored \"-Wvector-conversion\"") \
- HEDLEY_STATIC_CAST(int16_t, _mm_extract_pi16((a), (imm8))) \
- HEDLEY_DIAGNOSTIC_POP \
- )
-# else
+#if defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_X86_MMX_NATIVE) && !defined(HEDLEY_PGI_VERSION) && !defined(SIMDE_BUG_CLANG_44589)
#define simde_mm_extract_pi16(a, imm8) HEDLEY_STATIC_CAST(int16_t, _mm_extract_pi16(a, imm8))
-# endif
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#define simde_mm_extract_pi16(a, imm8) vget_lane_s16(simde__m64_to_private(a).neon_i16, imm8)
#endif
@@ -2574,25 +2565,14 @@ simde__m64
simde_mm_insert_pi16 (simde__m64 a, int16_t i, const int imm8)
SIMDE_REQUIRE_CONSTANT_RANGE(imm8, 0, 3) {
simde__m64_private
- r_,
a_ = simde__m64_to_private(a);
- r_.i64[0] = a_.i64[0];
- r_.i16[imm8] = i;
+ a_.i16[imm8] = i;
- return simde__m64_from_private(r_);
+ return simde__m64_from_private(a_);
}
-#if defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_X86_MMX_NATIVE) && !defined(__PGI)
-# if defined(SIMDE_BUG_CLANG_44589)
-# define ssimde_mm_insert_pi16(a, i, imm8) ( \
- HEDLEY_DIAGNOSTIC_PUSH \
- _Pragma("clang diagnostic ignored \"-Wvector-conversion\"") \
- (_mm_insert_pi16((a), (i), (imm8))) \
- HEDLEY_DIAGNOSTIC_POP \
- )
-# else
+#if defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_X86_MMX_NATIVE) && !defined(__PGI) && !defined(SIMDE_BUG_CLANG_44589)
#define simde_mm_insert_pi16(a, i, imm8) _mm_insert_pi16(a, i, imm8)
-# endif
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#define simde_mm_insert_pi16(a, i, imm8) simde__m64_from_neon_i16(vset_lane_s16((i), simde__m64_to_neon_i16(a), (imm8)))
#endif
