Index: src/opts/SkNx_sse.h |
diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h |
index bdc6d77ce728bbfd74b0d280800b0fe250e690ff..9751c4db9141246681d8905bbaf2f5220fb293c2 100644 |
--- a/src/opts/SkNx_sse.h |
+++ b/src/opts/SkNx_sse.h |
@@ -124,8 +124,12 @@ public: |
bool anyTrue() const { return 0x0000 != _mm_movemask_epi8(_mm_castps_si128(fVec)); } |
SkNx thenElse(const SkNx& t, const SkNx& e) const { |
+#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 |
+ return _mm_blendv_ps(e.fVec, t.fVec, fVec); |
+#else |
return _mm_or_ps(_mm_and_ps (fVec, t.fVec), |
_mm_andnot_ps(fVec, e.fVec)); |
+#endif |
} |
__m128 fVec; |