1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-09 22:20:08 +00:00

Prefer shuffle to broadcastss_ps on non-Intel processors

This commit is contained in:
Chuck Walbourn 2020-03-06 13:15:40 -08:00
parent 7faf4c00ab
commit 4d6117ccaf
2 changed files with 2 additions and 2 deletions

View File

@ -1831,7 +1831,7 @@ namespace DirectX
template<> inline XMVECTOR XM_CALLCONV XMVectorSwizzle<1, 1, 3, 3>(FXMVECTOR V) noexcept { return _mm_movehdup_ps(V); }
#endif
#if defined(_XM_AVX2_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_)
#if defined(_XM_AVX2_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) && defined(_XM_FAVOR_INTEL_)
template<> inline XMVECTOR XM_CALLCONV XMVectorSwizzle<0, 0, 0, 0>(FXMVECTOR V) noexcept { return _mm_broadcastss_ps(V); }
#endif

View File

@ -225,7 +225,7 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatX(FXMVECTOR V) noexcept
return vResult.v;
#elif defined(_XM_ARM_NEON_INTRINSICS_)
return vdupq_lane_f32(vget_low_f32(V), 0);
#elif defined(_XM_AVX2_INTRINSICS_)
#elif defined(_XM_AVX2_INTRINSICS_) && defined(_XM_FAVOR_INTEL_)
return _mm_broadcastss_ps(V);
#elif defined(_XM_SSE_INTRINSICS_)
return XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0));