From 96909eef31ccc0e11b13b3ff0a1d0b6f699ad8cc Mon Sep 17 00:00:00 2001 From: Thomas Vegas Date: Wed, 28 Feb 2024 10:17:49 +0200 Subject: [PATCH] UCT/IB/MLX5: Prevent compiler to replace SSE instructions by memmove() --- src/uct/ib/mlx5/ib_mlx5.inl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uct/ib/mlx5/ib_mlx5.inl b/src/uct/ib/mlx5/ib_mlx5.inl index e7a1a4f1010..8046a6333a4 100644 --- a/src/uct/ib/mlx5/ib_mlx5.inl +++ b/src/uct/ib/mlx5/ib_mlx5.inl @@ -507,14 +507,15 @@ static UCS_F_ALWAYS_INLINE void uct_ib_mlx5_bf_copy_bb(void * restrict dst, #if defined(__ARM_NEON) vst4q_u64(dst, vld4q_u64(src)); #else -#if defined( __SSE4_2__) +#if defined(__SSE4_2__) typedef __m128i uct_ib_mlx5_send_wqe_bb_block_t; #else typedef uint8_t uct_ib_mlx5_send_wqe_bb_block_t; #endif /* Prevent compiler to replace by memmove() */ typedef struct { - uct_ib_mlx5_send_wqe_bb_block_t data[MLX5_SEND_WQE_BB / sizeof(uct_ib_mlx5_send_wqe_bb_block_t)]; + uct_ib_mlx5_send_wqe_bb_block_t + data[MLX5_SEND_WQE_BB / sizeof(uct_ib_mlx5_send_wqe_bb_block_t)]; } UCS_S_PACKED uct_ib_mlx5_send_wqe_bb_t; UCS_WORD_COPY(uct_ib_mlx5_send_wqe_bb_t, dst,