From 6bcd941ee3482a1524621c91e3a425dbb279f78a Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Tue, 21 Feb 2023 20:09:29 +0000 Subject: [PATCH] Use pmsub in twoprod. This speeds up pow() on Skylake by ~1%. --- Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 52d076ad7..21de0ac22 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -1248,7 +1248,7 @@ EIGEN_STRONG_INLINE void twoprod(const Packet& x, const Packet& y, Packet& p_hi, Packet& p_lo) { p_hi = pmul(x, y); - p_lo = pmadd(x, y, pnegate(p_hi)); + p_lo = pmsub(x, y, p_hi); } #else