From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F12283858D37; Wed, 1 Feb 2023 14:32:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F12283858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675261952; bh=bkQW87JX2+zbZPLc7wygyjnhIZ4eHMeaydg40V6sPLo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gG2qET1qbXVnFLOyanzEvC/Kf1u/oy8Dxcohf3AdhJKQgWIp1qWSsZi5obOYjplmN KTP/fvK3s8KbmCh/f6pcyfcxUFVtnNfgGeNqGFInXqtSYsIgmHTdpymOx0NINSxu5A Gof4MdqbJNVPD7Tvki5KK0RdrYfylTU2kQXGZZ4k= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100758] __builtin_cpu_supports does not (always) detect "sse2" Date: Wed, 01 Feb 2023 14:32: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: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D100758 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Mayshao-oc at zhaoxin dot = com --- Comment #12 from Martin Li=C5=A1ka --- (In reply to ValdikSS from comment #11) > Well, the function is called __builtin_cpu_supports, for which one might > expect that it just checks CPUID and returns reliable results, while in > reality it operates using the build-in CPU support list. The function does > not return an error if it's unable to detect the feature, resulting in > incorrect results, which makes the function unreliable. The fact that it = may > not always detect features which are present in the CPU is not documented, > which brings the confusion among developers such as this bug. Sure, it's not perfect, I can confirm that. I'm going to introduce a documentation entry for this limitation.=20 >=20 > VIA processors have progressed into Zhaoxin CPU family which is fairly > recent (2014-2019, with plans to release new processors soon). Yep, and we support these (vendor =3D=3D signature_SHANGHAI_ebx) correctly = since r13-713-ga239aff82c3771. Maybe the author of the commit will be interested in old VIA CPUs?=