From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B52C3858D1E; Tue, 18 Apr 2023 06:39:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B52C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681799972; bh=mIkVSpqSb5sH3riuPwZ1f61AhCXuJ7qmJ1najxjOhwo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E7PY2WWP/dtzdDiEI8rvFX/lmCk4bLQaXLOcFOxZPl7x33GGU+17edbgJBd/iRoiN mSBXB3k+odrWYAIqVmQj4EmRe5LSODCX+5SEozbX9TOQ6+bDHUk5m7FdubM7ZEGh0K 0xdEXnyOBzAUc7AK3Zp5QN4FX0Yyti2dapdS6ubk= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109504] [12/13/14 Regression] Compilation fails with pragma GCC target sse4.1 and immintrin.h Date: Tue, 18 Apr 2023 06:39:31 +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: crazylht at gmail dot com 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 #7 from Hongtao.liu --- (In reply to Hongtao.liu from comment #6) > (In reply to Jakub Jelinek from comment #4) > > Yeah. Enable all the time and have say the > > targetm.invalid_conversion, targetm.invalid_unary_op, > > targetm.invalid_binary_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 > > where 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 > > change libstdc++ > > such that for x86 it adds similarly to x86 intrin headers something like > Can we just cpp_undef _STDCPP_FLOAT16_T__ and __STDCPP_BFLOAT16_T__ for C= ++ > in ix86_target_macros when !TARGET_SSE2 so that no need to change libstdc= ++ > part. Also need to undef __LIBGCC_HAS_%d_MODE__, __LIBGCC_%d_FUNC_EXT__,__LIBGCC_%d_MANT_DIG__, __LIBGCC_%d_EXCESS_PRECISION__, __LIBGCC_%d_EPSILON__, __LIBGCC_%d_MAX__, __LIBGCC_%d_MIN__ Which are used for building libgcc(found in libbid) And then ix86_emit_support_tinfos is not needed any more since type is alwa= ys supported? Or just adjust to - gcc_checking_assert (!float16_type_node && !bfloat16_type_node); - float16_type_node =3D ix86_float16_type_node; - bfloat16_type_node =3D ix86_bf16_type_node; + float16_type_node + =3D float16_type_node ? float16_type_node : ix86_float16_type_node; + bfloat16_type_node + =3D bfloat16_type_node ? bfloat16_type_node : ix86_bf16_type_node;=