Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2022 21:02:08 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Christian Weisgerber <naddy@mips.inka.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Did clang 14 lose some intrinsics support?
Message-ID:  <zgen-6zwv-wny@FreeBSD.org>
In-Reply-To: <YzCL/%2BUEhLy7kHaL@lorvorc.mips.inka.de> (Christian Weisgerber's message of "Sun, 25 Sep 2022 19:12:31 %2B0200")
References:  <YzCL/%2BUEhLy7kHaL@lorvorc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Christian Weisgerber <naddy@mips.inka.de> writes:

> Did we lose support for SSSE3 and AVX2 intrinsics on amd64 with
> clang 14?

__builtin_* appear unstable unlike _mm* intrinsics. Clang 15 seems
to hide more but I'm not sure about the cause (need bisecting).

===> clang version 15.0.1
#define SSE2_SUPPORTED 1
#define SSE_SUPPORTED 1

===> clang version 15.0.1 with -march=native
#define AVX_SUPPORTED 1
#define FMA_SUPPORTED 1
#define SSE2_SUPPORTED 1
#define SSE4_1_SUPPORTED 1
#define SSE_SUPPORTED 1

> #if __has_builtin(__builtin_ia32_pabsd128)
>   #define SSSE3_SUPPORTED 1
> #endif
[...]
> #if __has_builtin(__builtin_ia32_pabsd256)
>   #define AVX2_SUPPORTED 1
> #endif

See https://github.com/llvm/llvm-project/commit/e5147f82e1cb

- Instead of __builtin_ia32_pabsd128 maybe use _mm_abs_epi32
- Instead of __builtin_ia32_pabsd256 maybe use _mm256_abs_epi32



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zgen-6zwv-wny>