From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69FAE3857BA4; Sun, 3 Dec 2023 12:14:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69FAE3857BA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701605648; bh=yz3716ejWJvUNT54HGd/bixqLbFyZd4YdukRVD2r4bE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Izvf2M1zcUuPeRFQNHdUSU+atHrpnLjpGBh1U70uOBR93PgdnOZYGQ4jC+kjPvPIK LsldJxvNt1omq8vEES2+C/28LJXhYLUUQmkL9KbazRa/hzGd1t4Qmp7sPXna9pdd+A OvfPwChzJWxcBG/Lt379vevCNh8Kfosqh1KLWyrM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112789] Missing clang __builtin_ctzs for short Date: Sun, 03 Dec 2023 12:14:07 +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: jakub 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 #14 from Jakub Jelinek --- One thing against adding these builtins (especially when we have a type-gen= eric builtin which can handle all types, not just some of them) is that clang has added them completely unorthogonally. GCC has __builtin_{ctz,clz,clrsb,ffs,popcount,parity}{,l,ll,imax,g} (the la= st one in GCC 14 only), while clang has __builtin_{ctz,clz,clrsb,ffs,popcount,parity}{,l,ll} and then just __builtin_c{l,t}zs for unsigned short extra, but none of the other 4 similar builtins, nor any builtin for unsigned char, etc. Why is unsigned short th= at much more important than unsigned char or unsigned __int128 or all the unsi= gned _BitInt types?=