From a9584d8e3cdba2b7043b1a66b4a8486b4a3947d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Wed, 30 Oct 2024 14:41:50 +0000 Subject: [PATCH] Fix clang6 failures. --- Eigen/src/Geometry/arch/Geometry_SIMD.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Eigen/src/Geometry/arch/Geometry_SIMD.h b/Eigen/src/Geometry/arch/Geometry_SIMD.h index 80d61d3f9..5601a473e 100644 --- a/Eigen/src/Geometry/arch/Geometry_SIMD.h +++ b/Eigen/src/Geometry/arch/Geometry_SIMD.h @@ -73,12 +73,10 @@ struct cross3_impl { Packet4f b = rhs_eval.template packet(0); Packet4f mul1 = pmul(vec4f_swizzle1(a, 1, 2, 0, 3), vec4f_swizzle1(b, 2, 0, 1, 3)); Packet4f mul2 = pmul(vec4f_swizzle1(a, 2, 0, 1, 3), vec4f_swizzle1(b, 1, 2, 0, 3)); - a = psub(mul1, mul2); - // Zero-out last component in case of inf/nan. - const __m128i mask = _mm_setr_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0); - a = _mm_castsi128_ps(_mm_and_si128(mask, _mm_castps_si128(a))); DstPlainType res; - pstoret(res.data(), a); + pstoret(res.data(), psub(mul1, mul2)); + // Ensure last component is 0 in case original a or b contain inf/nan. + res[3] = 0.0f; return res; } };