mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-08 13:40:09 +00:00
Prefer shuffle to broadcastss_ps on non-Intel processors
This commit is contained in:
parent
7faf4c00ab
commit
4d6117ccaf
@ -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
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user