From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D19413858C2A; Tue, 29 Aug 2023 17:43:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D19413858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693331013; bh=zud1N4Y4KQ85XDbmYcVyZfnuNdSEZDQNauseuSGCtjc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b6ru0rpyis7AKAouhCc2FpaUlYbT1yp93rI2lKiqq/ss06dmalK/D0E0Jj4QQ7987 Sy6ojZ35ToiH/Cr3uyEJiEPXtK7NHg3zcXO1txYt1h+cXaGq9Xr5gXop+ds74oTa3n IkJW4Wp7+9Fz/OoxA8A9Tp99nodu8ALrU/jODP44= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/43892] PowerPC suboptimal "add with carry" optimization Date: Tue, 29 Aug 2023 17:43:33 +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: 4.3.4 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: segher 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=3D43892 --- Comment #39 from Roger Sayle --- My apologies for dropping the ball on this patch (series)... My only access= to PowerPC hardware is/was via the GCC compile farm, which complicates things. Shortly after David's approval, Segher enquired whether the patch could be modified to also handle -mcpu=3Dpower10 (which represents carry differently= ): https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586868.html Trying to (also) address this then openned up a rabbit hole/can of worms related to how middle-end (and rs6000.md) represents overflow, which includ= ed a combine patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586572.html Soon after GCC entered stage 4 (or stage 3), and the above patches (and an unsubmitted one for power10) simply got lost in the backlog. I believe this patch is sound, but unfortunately I don't have the bandwidth/patience to (re)check it against mainline on (multiple variants of) rs6000. If one of the IBM folks could take it from here, that'd be much appreciated= .=