From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 607F53858412; Sat, 2 Dec 2023 23:44:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 607F53858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701560641; bh=ZO7TnyIn/s3L1kyFZ0yh0J4y2eiyLfFiONPnIIqhlAo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fL0Yzbv4QVmWDsC7v09q533da9JdnoYJgfLdWK9cWuGCluYGBCf+bPaSLydOnsZxu L+cD2GiP83qwjHYRZrsswF3j2kxIuxvF8LoYVYXUAicpezQryLmt/rnmcsfyYGVu3T LRn40NIxLHJ1DSBa00tDTxRwJka1zFnHuhEtaPGc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112789] Missing clang __builtin_ctzs for short Date: Sat, 02 Dec 2023 23:44:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D112789 --- Comment #10 from Andrew Pinski --- (In reply to gnzlbg from comment #8) > Oh! Sorry! I see this was resolved as WONTFIX. >=20 > Does that mean that GCC, in contrast with the LLVM community - which is > always super helpful and friendly when it comes to trying to enable their > toolchains to compile SW developed with GNU - intentionally does not want= to > enable the GNU toolchains to compile SW developed with clang?=20 Wait, there is a builtin that does exactly the same as what you need/wanted= to do. Is there a need for another builtin? >=20 > If that's the case, and this is community policy, and the person who clos= ed > this as WONTFIX speaks for the entirety of the GNU community, such that no > patches to fix this will be accepted, then thank you for your time > considering this issue and for your prompt response! Since there is a new builtin included already to do the same thing as __builtin_ctzs but in a generic fashion (added to support _BitInt and the C= 23 bit functions), why add another builtin that is just there. Also reading the history on __builtin_ctzs for clang and even for GCC (it exists as an x86_64 target builtin with a specific option but undocumented because it was only to be used by the intrinics), you will see clang added = it as a generic builtin and didn't document the behavior or anything. The history here seems clang added it to be compatiable with GCC's internal intrinsics implementation and exposed it for all targets but didn't document it. So the situtation we are at right now, add the builtin as a non-target spec= ific builtin for GCC just to be compatiable with clang but we have no idea what = the semantics of the builtin is because it is not documented.=