From faa3073bfa2b7bd5220572d0f7ccbf7a3ffd1f69 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 21 Mar 2020 07:19:43 -0400
Subject: [PATCH] Clear Vector4a using _mm_setzero_ps(); as that optimizes out
 to a nearly free instruction on modern processors vs fetching a zero array
 from memory

---
 indra/llmath/llvector4a.inl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl
index fe416d97532..3712b604714 100644
--- a/indra/llmath/llvector4a.inl
+++ b/indra/llmath/llvector4a.inl
@@ -115,7 +115,7 @@ inline void LLVector4a::set(F32 x, F32 y, F32 z, F32 w)
 // Set to all zeros
 inline void LLVector4a::clear()
 {
-	mQ = LLVector4a::getZero().mQ;
+	mQ = _mm_setzero_ps();
 }
 
 inline void LLVector4a::splat(const F32 x)
-- 
GitLab