From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D52F3857C5E; Fri, 2 Feb 2024 15:24:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D52F3857C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706887464; bh=E7hUGxoH46WkRpyhK0SIakKPnNOTDxQX3QCdBl02CZg=; h=From:To:Subject:Date:From; b=VGCr0ab94/9jB3uUIz5j1Vr5SfhZ+9bU+zCS00UzyBrrPNOuEQNncE6E1Is7h8TzG gYw4wNrTxERkMuIc+1V3KwdNtfqLSQEFYKc19bRXt/9ZOvm4u3zL0R17vpHpILbm2F qPDFvKxa119UKLQ5RKhJ9+yQLRlPkCIzcCE9nbWE= From: "bouanto at zoho dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug regression/113722] New: Folding of __builtin_bswap128 doesn't work anymore Date: Fri, 02 Feb 2024 15:24:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: regression X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bouanto at zoho 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D113722 Bug ID: 113722 Summary: Folding of __builtin_bswap128 doesn't work anymore Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression Assignee: unassigned at gcc dot gnu.org Reporter: bouanto at zoho dot com Target Milestone: --- With the following code: #include int main(int argc, char* argv[]) { __uint128_t res =3D __builtin_bswap128 (2); printf("Value: %ld\n", res >> 64); res =3D __builtin_bswap128 (argc + 1); printf("Value: %ld\n", res >> 64); } it gives the following output in gcc 13.2.1: Value: 144115188075855872 Value: 144115188075855872 while it gives the following output in the master branch, commit 2c27aa8d75113f404bf9cd39364611af386d9719: Value: 0 Value: 144115188075855872 So it seems to be a regression in the folding of wide_int::bswap.=