From nobody Sun Sep 25 19:02:08 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MbFd32QXkz4ch7l for ; Sun, 25 Sep 2022 19:02:31 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MbFd31vcSz3LVZ; Sun, 25 Sep 2022 19:02:31 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664132551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aWNJSFOSeauX9YwdfhBcRoDms4bkaDoD+yPPBFknfUw=; b=OgD4Lje9LYHHjyLz8fVX9ATNg5eq7hFjXsM7LyzsCyoL2uKqcXwwQhY/mblzBD7k2LXNk8 gt1eb8t5VXA+dVAFSBDq3g3V2jvJqUIoH8tlVbphH0K6C91x14i+IohyLvfscrlG1t127F H/i8DDeESd4tt6rj5dnTQlbWtGXAPIBNEFL6y8fySJtSxjBJENciIz5ktf6sc6BjvNuV7f DCO5gcwQLgw97XeS+dOpag9hyAsjx9sGle9XaDN9K+gc7lQN3u7aqp1awAwMICNjrzlhU9 sGRUMhEkZZR70bt1J84UrZaTm3gEVkKmaA0B9rTNM/bP1BIMWmD2V+RjWKmyRg== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 27D9C8E0E; Sun, 25 Sep 2022 19:02:31 +0000 (UTC) From: Jan Beich To: Christian Weisgerber Cc: freebsd-current@freebsd.org Subject: Re: Did clang 14 lose some intrinsics support? In-Reply-To: (Christian Weisgerber's message of "Sun, 25 Sep 2022 19:12:31 +0200") References: Date: Sun, 25 Sep 2022 21:02:08 +0200 Message-ID: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664132551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aWNJSFOSeauX9YwdfhBcRoDms4bkaDoD+yPPBFknfUw=; b=c3rZDH8GV1DUdRWM1X6TMlhCJ5OMM7xagzSIkM82PtOkUT1A9LIyGYKiG3qXdDfsO3OBTC VlW1vwhOjM6WycO0WBnAF89A2XYKGvrJeGl2MBFDvBQNAIlv6ej5NLemRooqA+9NBlzm0j ATaKqgt/vspdKv+rWhrPBwhSAEOaweJfxv+JuXwpRiW+kKNmsnE03IxuE7r/f6xIi1LH5B 326ELQk2adkVdgIFnFNX3+hIGVLhh4FVJlP9OO1uSiEaKZlTYQDKkVJlk415F11W8107v0 HiAeThE66ZepeUK/9SeB1+WHYEkHo4Ehd46pAeGmoTTEmFsH00MzK5P6cSpVrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664132551; a=rsa-sha256; cv=none; b=U9HWYz1fhIc87nvo07mCN/G5JwZOq9KYewIq01hz2YmdYI1gCL7vAKIvGXzKHbARS3WX/x 5xYaBWokIiFF5f/xbI8h+07kOH6Gl7MLF346d/x+BJ1KCuq8Ew9ofgEYBG1xA685COq7T1 VbeKc7gNAkv2ItJPrb4Xfzqo9h9wpWQWrJh3V2Di39i2UimGbgj+C9K5mCsDiZSgWB2D+i p+3hw4/WjLjRvX/UJOBOBQRfpnNRfVlV6w6aZhYdxcvZ6I2H69GJ6fmbiAqFutzz9g29BF ykP3cY+9q6u70xneRoYwprpdzYpBhIzzPgqEIVXlj38yyvfs1+zJp8S0ky7csg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N Christian Weisgerber 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