diff --git a/include/eve/module/core/regular/logical_and.hpp b/include/eve/module/core/regular/logical_and.hpp index fa9a492cda..243e640402 100644 --- a/include/eve/module/core/regular/logical_and.hpp +++ b/include/eve/module/core/regular/logical_and.hpp @@ -20,7 +20,14 @@ namespace eve constexpr EVE_FORCEINLINE common_logical_t operator()(T a, U b) const noexcept requires (same_lanes_or_scalar && !arithmetic_simd_value && !arithmetic_simd_value) { - return EVE_DISPATCH_CALL(a, b); + if constexpr (has_emulated_abi_v>) + { + return convert(EVE_DISPATCH_CALL(a, b), as_element>{}); + } + else + { + return EVE_DISPATCH_CALL(a, b); + } } EVE_CALLABLE_OBJECT(logical_and_t, logical_and_); @@ -77,14 +84,13 @@ namespace eve template EVE_FORCEINLINE constexpr common_logical_t logical_and_(EVE_REQUIRES(cpu_), O const&, T a, U b) noexcept { - if constexpr ((scalar_value || std::same_as) - && (scalar_value || std::same_as)) return a && b; + if constexpr (std::same_as && std::same_as) return a && b; else if constexpr (std::same_as) return logical_and(U{a}, b); else if constexpr (std::same_as) return logical_and(a, T{b}); - else if constexpr (simd_value && scalar_value) return logical_and(a, T{b}); - else if constexpr (scalar_value && simd_value) return logical_and(b, U{a}); + else if constexpr (logical_simd_value && scalar_value) return logical_and(a, T{b}); + else if constexpr (scalar_value && logical_simd_value) return logical_and(b, U{a}); else if constexpr (std::same_as) return bit_cast(a.bits() & b.bits(), as>{}); - else return logical_and(a, convert(b, as{})); + else return logical_and(a, convert(b, as>{})); } } }