From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A0963858D35; Wed, 6 Mar 2024 23:15:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A0963858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709766904; bh=iFu+xDp2NdPF8S1yVJYCueeJZHKMSG2b1Onstp7L8kE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PvbOd8qDQsBuSTqd4VYCrPeR7XBepmKGNelw71fubNTgsOZqto4Rlu8jvc0TnRGrg xhMkUtbmYtd4rxtj4P24nquf/FXf+auKOaZS3lVtyH3Htwlc+v5/zqB8AJ2G2fMfF/ AM59CWt2LIdpW5NA51Yo3BjQFsPmszrdVpJ7Oiuc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/101523] Huge number of combine attempts Date: Wed, 06 Mar 2024 23:15:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D101523 --- Comment #18 from Andrew Pinski --- Hmm, looking at what is done in combine, I wonder why forwprop didn't do the address add into the memory. That would definitely decrease the # of combin= es being done. Maybe it is because it is used more than once. But still seems like another pass should have done the a=3Db+c; d=3De*[a] into a=3Db+c; d=3De*[b+c] befo= re hand. Maybe there is some address cost going wrong here that forwprop is causing issues. And it just happens combine does not take that into account due to = rtl cost not taking address cost into account.=