From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 839B93858D32; Fri, 14 Apr 2023 08:17:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 839B93858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681460260; bh=EgamwY74obOFwIZUKv8c95vzuEuWUyWUc9WJ474TAXs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=umtFDufB3Ntb2ZmFaAngEY3c6BK934+HmIYwefvDBbbngODj/qbP+FZBy1Vvl3c6s wqkJqN6hfsvq8Ha4Gm8IqQxJu3mnkeseNeBfTP7h1rSqlfDZZhRP96DddHGMTZ7v5f DA20nRpH0XrgiYivDlJ3vdUu+n+uVmZIbrjNXnQM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109504] [12/13 Regression] Compilation fails with pragma GCC target sse4.1 and immintrin.h Date: Fri, 14 Apr 2023 08:17:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109504 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- Note, until then we could perhaps do something like: --- gcc/config/i386/avx512fp16intrin.h.jj 2023-01-16 11:52:15.9467360= 83 +0100 +++ gcc/config/i386/avx512fp16intrin.h 2023-04-14 10:13:30.054297659 +0200 @@ -28,6 +28,8 @@ #ifndef __AVX512FP16INTRIN_H_INCLUDED #define __AVX512FP16INTRIN_H_INCLUDED +#ifdef __FLT16_DIG__ + #ifndef __AVX512FP16__ #pragma GCC push_options #pragma GCC target("avx512fp16") @@ -7216,4 +7218,6 @@ _mm512_set1_pch (_Float16 _Complex __A) #pragma GCC pop_options #endif /* __DISABLE_AVX512FP16__ */ +#endif + #endif /* __AVX512FP16INTRIN_H_INCLUDED */ --- gcc/config/i386/avx512fp16vlintrin.h.jj 2023-01-16 11:52:15.9467360= 83 +0100 +++ gcc/config/i386/avx512fp16vlintrin.h 2023-04-14 10:13:54.1529464= 27 +0200 @@ -28,6 +28,8 @@ #ifndef __AVX512FP16VLINTRIN_H_INCLUDED #define __AVX512FP16VLINTRIN_H_INCLUDED +#ifdef __FLT16_DIG__ + #if !defined(__AVX512VL__) || !defined(__AVX512FP16__) #pragma GCC push_options #pragma GCC target("avx512fp16,avx512vl") @@ -3359,4 +3361,6 @@ _mm_set1_pch (_Float16 _Complex __A) #pragma GCC pop_options #endif /* __DISABLE_AVX512FP16VL__ */ +#endif + #endif /* __AVX512FP16VLINTRIN_H_INCLUDED */ --- gcc/config/i386/avxneconvertintrin.h.jj 2023-01-16 11:52:15.9497360= 39 +0100 +++ gcc/config/i386/avxneconvertintrin.h 2023-04-14 10:14:51.2801138= 13 +0200 @@ -48,6 +48,7 @@ _mm256_bcstnebf16_ps (const void *__P) return (__m256) __builtin_ia32_vbcstnebf162ps256 ((const __bf16 *) __P); } +#ifdef __FLT16_DIG__ extern __inline __m128 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _mm_bcstnesh_ps (const void *__P) @@ -61,6 +62,7 @@ _mm256_bcstnesh_ps (const void *__P) { return (__m256) __builtin_ia32_vbcstnesh2ps256 ((const _Float16 *) __P); } +#endif extern __inline __m128 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) i.e. if _Float16 type isn't usable, just hide all the _Float16 related stuff from the headers. But don't we need the same thing for __bf16 too? There I'm afraid aren't macros for that.=