diff --git a/Eigen/src/Core/arch/AVX/MathFunctions.h b/Eigen/src/Core/arch/AVX/MathFunctions.h index 25cd992ef..6af67ce2d 100644 --- a/Eigen/src/Core/arch/AVX/MathFunctions.h +++ b/Eigen/src/Core/arch/AVX/MathFunctions.h @@ -366,8 +366,9 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f psqrt(const Packet8f& _x) { Packet8f half = pmul(_x, pset1(.5f)); Packet8f denormal_mask = _mm256_and_ps( - _mm256_cmpge_ps(_x, _mm256_setzero_ps()), - _mm256_cmplt_ps(_x, pset1((std::numeric_limits::min)()))); + _mm256_cmp_ps(_x, pset1((std::numeric_limits::min)()), + _CMP_LT_OQ), + _mm256_cmp_ps(_x, _mm256_setzero_ps(), _CMP_GE_OQ)); // Compute approximate reciprocal sqrt. Packet8f x = _mm256_rsqrt_ps(_x);