From 4dccaa587e147fd1b3b9d83a4d62a4e487a5935f Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Wed, 27 Mar 2024 14:37:52 -0700 Subject: [PATCH] Use truncation rather than rounding when casting Packet2d to Packet2l. --- Eigen/src/Core/arch/SSE/TypeCasting.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/SSE/TypeCasting.h b/Eigen/src/Core/arch/SSE/TypeCasting.h index 02a670cce..9a7732a60 100644 --- a/Eigen/src/Core/arch/SSE/TypeCasting.h +++ b/Eigen/src/Core/arch/SSE/TypeCasting.h @@ -89,7 +89,7 @@ EIGEN_STRONG_INLINE Packet4i pcast(const Packet2d& a, const template <> EIGEN_STRONG_INLINE Packet2l pcast(const Packet2d& a) { #if EIGEN_ARCH_x86_64 - return _mm_set_epi64x(_mm_cvtsd_si64(preverse(a)), _mm_cvtsd_si64(a)); + return _mm_set_epi64x(_mm_cvttsd_si64(preverse(a)), _mm_cvttsd_si64(a)); #else return _mm_set_epi64x(static_cast(pfirst(preverse(a))), static_cast(pfirst(a))); #endif