From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 548FE3858D32; Tue, 4 Jul 2023 17:47:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 548FE3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688492822; bh=2P0058peq+vL1bVP0/VlnfW8BuwPpm9Zk3Qz6+ZTHIM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JK3SmTO2hpCCp6uzTpBFTgPBaMG+1TfgUBG0xLT3scepK65c7DWvG98eP/XQNgBap 9ZxZ8tzg6rINgw9JFCmKDc0N/UiAW1+K+wb9o69wZ9vslPykm9qy0Zzya1vGusscX/ L/6/tcx/GxQ00iE6hNcztSz3UO7YZ860GC3MJsgE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110551] [11/12/13/14 Regression] an extra mov when doing 128bit multiply Date: Tue, 04 Jul 2023 17:47:02 +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.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed keywords bug_status cf_reconfirmed_on cf_known_to_fail short_desc cf_known_to_work 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=3D110551 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Keywords| |ra Status|UNCONFIRMED |NEW Last reconfirmed| |2023-07-04 Known to fail| |12.1.0, 14.0, 5.1.0, 7.1.0 Summary|[11/12/13/14 regression] |[11/12/13/14 Regression] an |Suboptimal codegen for 128 |extra mov when doing 128bit |bits multiplication on |multiply |x86_64 | Known to work| |4.9.4 --- Comment #2 from Andrew Pinski --- It is an older regression though. ``` #include void mulx64(uint64_t *x, uint64_t *t) { __uint128_t r =3D (__uint128_t)*x * 0x9E3779B97F4A7C15ull; *t =3D (uint64_t)r ^ (uint64_t)( r >> 64 ); } ``` It is just an extra mov. Also the mulx should have allowed the register allocator to do better but it was worse ...=