facepalm: _mm_andnot is ~A&B not A&~B as the name would suggest

This commit is contained in:
kd-11 2018-02-23 16:00:42 +03:00
parent fa6d03d557
commit a64bb4a0ec

View file

@ -348,7 +348,8 @@ public:
else if (sanitize)
{
//Lower NaNs to 0
_mm_stream_si128((__m128i*)dst, (__m128i&)_mm_andnot_ps((__m128&)shuffled_vector, _mm_cmpunord_ps((__m128&)shuffled_vector, _mm_set1_ps(1.f))));
const auto mask = _mm_cmpunord_ps((__m128&)shuffled_vector, _mm_set1_ps(1.f));
_mm_stream_si128((__m128i*)dst, (__m128i&)_mm_andnot_ps(mask, (__m128&)shuffled_vector));
}
else
{