From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 311EA3858D33; Fri, 14 Apr 2023 08:01:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 311EA3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681459294; bh=xQyYiOrX8OraItxAtmL8hVznyvmDIm5ZI7Mrf5YiqBQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rhy935/yfvk1peHaoQukdPoISLNQnBuc3u1X1B/3HplRRUtRe4kW7D5EVk6RJ/qTN YvkHw9ziivsMu2H+YazHXouybLCxFB614rjcxQRD5bhjIADv1MH4hkczZfOH3mYJcf VKNhCt0dSlpCzIIjHMXK/Hzb6Rcd8qujzuz4K3Jk= 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:01:32 +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: 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 --- Comment #4 from Jakub Jelinek --- Yeah. Enable all the time and have say the targetm.invalid_conversion, targetm.invalid_unary_op, targetm.invalid_binar= y_op and something in argument/return value passing reject _Float16/__bf16 in functions without SSE2. That will not be enough though, we'll need to arrange e.g. for the spot whe= re we #undef/#define target macros based on currently active ISA in pragmas to also do that for __STDCPP_FLOAT16_T__ and __STDCPP_BFLOAT16_T__ for C++, and cha= nge libstdc++ such that for x86 it adds similarly to x86 intrin headers something like #ifndef __SSE2__ #pragma GCC push_options #pragma GCC target("sse2") #define __DISABLE_SSE2__ #endif /* __SSE2__ */ ... #ifdef __DISABLE_SSE2__ #undef __DISABLE_SSE2__ #pragma GCC pop_options #endif /* __DISABLE_SSE2__ */ around std::float16_t/std::bfloat16_t stuff. Definitely not stage4 material I'm afraid.=