From 114c3f6fca47aa7709bf2c9bd0c5cfe98621ea00 Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Tue, 28 Oct 2025 11:04:19 +0200 Subject: [PATCH] Fix neq for batch_bool on wasm --- include/xsimd/arch/xsimd_wasm.hpp | 4 ++-- test/test_batch_bool.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/xsimd/arch/xsimd_wasm.hpp b/include/xsimd/arch/xsimd_wasm.hpp index ad0867c5b..a25dbd641 100644 --- a/include/xsimd/arch/xsimd_wasm.hpp +++ b/include/xsimd/arch/xsimd_wasm.hpp @@ -1144,7 +1144,7 @@ namespace xsimd template XSIMD_INLINE batch_bool neq(batch_bool const& self, batch_bool const& other, requires_arch) noexcept { - return wasm_f32x4_ne(self, other); + return wasm_v128_xor(self, other); } template ::value, void>::type> XSIMD_INLINE batch_bool neq(batch_bool const& self, batch_bool const& other, requires_arch) noexcept @@ -1160,7 +1160,7 @@ namespace xsimd template XSIMD_INLINE batch_bool neq(batch_bool const& self, batch_bool const& other, requires_arch) noexcept { - return wasm_f64x2_ne(self, other); + return wasm_v128_xor(self, other); } // reciprocal diff --git a/test/test_batch_bool.cpp b/test/test_batch_bool.cpp index b262e65a6..1556d1edb 100644 --- a/test/test_batch_bool.cpp +++ b/test/test_batch_bool.cpp @@ -518,6 +518,7 @@ struct batch_bool_test // neq { CHECK_BATCH_EQ(xsimd::neq(bool_g.half, bool_g.ihalf), bool_g.all_true); + CHECK_BATCH_EQ(xsimd::neq(bool_g.all_true, bool_g.all_true), bool_g.all_false); } }