From e4598fedbe34266afe72ee69df5bd7a1fd66877b Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Thu, 23 Feb 2023 23:24:41 +0000 Subject: [PATCH] Fix compiler versions for certain instructions on Power. --- Eigen/src/Core/arch/AltiVec/PacketMath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h index f1676afd7..e443a63ed 100644 --- a/Eigen/src/Core/arch/AltiVec/PacketMath.h +++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h @@ -256,7 +256,7 @@ struct packet_traits : default_packet_traits { HasSub = 1, HasShift = 1, HasMul = 1, -#ifdef _ARCH_PWR10 +#if defined(_ARCH_PWR10) && (EIGEN_COMP_LLVM || EIGEN_GNUC_STRICT_AT_LEAST(11,0,0)) HasDiv = 1, #else HasDiv = 0, @@ -1050,7 +1050,7 @@ template<> EIGEN_STRONG_INLINE Packet4f pdiv(const Packet4f& a, const template<> EIGEN_STRONG_INLINE Packet4i pdiv(const Packet4i& a, const Packet4i& b) { -#ifdef _ARCH_PWR10 +#if defined(_ARCH_PWR10) && (EIGEN_COMP_LLVM || EIGEN_GNUC_STRICT_AT_LEAST(11,0,0)) return vec_div(a, b); #else EIGEN_UNUSED_VARIABLE(a);