opitimize mat2 operations with fma

This commit is contained in:
Recep Aslantas
2021-04-18 13:51:09 +03:00
parent 7cc4c37afb
commit 7df5aa2e26

View File

@@ -26,11 +26,11 @@ glm_mat2_mul_sse2(mat2 m1, mat2 m2, mat2 dest) {
dest[1][0] = a * g + c * h;
dest[1][1] = b * g + d * h;
*/
x0 = _mm_mul_ps(_mm_movelh_ps(x1, x1), glmm_shuff1(x2, 2, 2, 0, 0));
x1 = _mm_mul_ps(_mm_movehl_ps(x1, x1), glmm_shuff1(x2, 3, 3, 1, 1));
x1 = _mm_add_ps(x0, x1);
x0 = glmm_fmadd(_mm_movelh_ps(x1, x1), glmm_shuff1(x2, 2, 2, 0, 0),
_mm_mul_ps(_mm_movehl_ps(x1, x1),
glmm_shuff1(x2, 3, 3, 1, 1)));
glmm_store(dest[0], x1);
glmm_store(dest[0], x0);
}
CGLM_INLINE