diff --git a/include/xsimd/arch/xsimd_rvv.hpp b/include/xsimd/arch/xsimd_rvv.hpp index 75f1145cd..94d6a198f 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 ), , 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(T(0), rvv {}); + return detail::rvvcompress(x, mask, zero); } /***************