From 8dcf3e38ba9913021ce6a831836a59217e21baf2 Mon Sep 17 00:00:00 2001 From: Chip-Kerchner Date: Mon, 16 Aug 2021 20:26:50 -0500 Subject: [PATCH] Fix unaligned loads in ploadLhs & ploadRhs for P8. --- Eigen/src/Core/arch/AltiVec/MatrixProduct.h | 2 +- Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h index 380dc623b..3f79b97df 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h @@ -1113,7 +1113,7 @@ EIGEN_ALWAYS_INLINE void pgerc(PacketBlock* accReal, PacketBlock EIGEN_ALWAYS_INLINE Packet ploadLhs(const Scalar* lhs) { - return *reinterpret_cast(const_cast(lhs)); + return ploadu(lhs); } // Zero the accumulator on PacketBlock. diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h b/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h index 41b27bf3d..33d543494 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h @@ -214,7 +214,7 @@ EIGEN_ALWAYS_INLINE void bcouple_common(PacketBlock EIGEN_ALWAYS_INLINE Packet ploadRhs(const Scalar* rhs) { - return *reinterpret_cast(const_cast(rhs)); + return ploadu(rhs); } } // end namespace internal