From 03f3d9333433e7c384fa58b5a891959562c7be0d Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 29 Oct 2024 09:07:46 +0100 Subject: [PATCH] Force zero tail for risc-v vcompress Fix #1060 --- include/xsimd/arch/xsimd_rvv.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/xsimd/arch/xsimd_rvv.hpp b/include/xsimd/arch/xsimd_rvv.hpp index 75f1145cd..11ac3709d 100644 --- a/include/xsimd/arch/xsimd_rvv.hpp +++ b/include/xsimd/arch/xsimd_rvv.hpp @@ -1129,13 +1129,14 @@ namespace xsimd *************/ namespace detail { - XSIMD_RVV_OVERLOAD(rvvcompress, (__riscv_vcompress), , vec(vec, bvec)) + XSIMD_RVV_OVERLOAD(rvvcompress, (__riscv_vcompress XSIMD_RVV_M), , vec(vec, bvec, vec)) } // compress template XSIMD_INLINE batch compress(batch const& x, batch_bool const& mask, requires_arch) noexcept { - return detail::rvvcompress(x, mask); + const auto zero = broadcast(U(0), rvv {}); + return detail::rvvcompress(x, mask, zero); } /***************