From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8BF23858C98; Thu, 4 Apr 2024 19:03:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8BF23858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712257430; bh=FnuJtl9CtVhwKTwCTm85anN/dMTN77yr40NwF/IZcDc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sLVgNAAjz/JdcGTJqoUW3gGB/EHTM5xc6LaHt1mrI8g2Rj+6Zvyj6W3utWdbjNn58 cWPENliEeDnn3/jEPuUR1uyZDSOf3L/F6FRZaR/MxQbbEpKz5me7XLRoJrR7+KNPY7 FuTIB4GRRJwv4Ovrx0eQDYeR7bGI7cG3P6u7QZ2U= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114591] rtl-reload introduce an extra load operation since gcc-12 Date: Thu, 04 Apr 2024 19:03:50 +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: 13.2.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: cf_reconfirmed_on cf_gcctarget everconfirmed bug_status component 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=3D114591 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-04-04 Target| |x86_64 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Component|rtl-optimization |target --- Comment #1 from Andrew Pinski --- IRA in GCC 12+ has: ``` Loop 0 (parent -1, header bb2, depth 0) bbs: 2 all: 0r85 1r82 modified regnos: 82 85 border: Pressure: GENERAL_REGS=3D1 Hard reg set forest: 0:( 0-6 8-15 20-51)@0 1:( 0-6 36-43)@26000 Spill a1(r82,l0) Allocno a0r85 of GENERAL_REGS(15) has 15 avail. regs 0-6 36-43, node= :=20 0-6 36-43 (confl regs =3D 7-35 44-75) Forming thread from colorable bucket: Forming thread by copy 0:a0r85-a1r82 (freq=3D1000): Result (freq=3D5000): a0r85(2000) a1r82(3000) Pushing a0(r85,l0)(cost 0) Popping a0(r85,l0) -- assign reg 0 Disposition: 1:r82 l0 mem 0:r85 l0 0 New iteration of spill/restore move +++Costs: overall 1000, reg -1000, mem 2000, ld 0, st 0, move 0 +++ move loops 0, new jumps 0 ``` While before it was: ``` Loop 0 (parent -1, header bb2, depth 0) bbs: 2 all: 0r85 1r82 modified regnos: 82 85 border: Pressure: GENERAL_REGS=3D1 Hard reg set forest: 0:( 0-6 8-15 20-51)@0 1:( 0-6 36-43)@46000 Allocno a0r85 of GENERAL_REGS(15) has 15 avail. regs 0-6 36-43, node= :=20 0-6 36-43 (confl regs =3D 7-35 44-75) Allocno a1r82 of GENERAL_REGS(15) has 15 avail. regs 0-6 36-43, node= :=20 0-6 36-43 (confl regs =3D 7-35 44-75) Forming thread from colorable bucket: Forming thread by copy 0:a0r85-a1r82 (freq=3D1000): Result (freq=3D5000): a0r85(2000) a1r82(3000) Pushing a0(r85,l0)(cost 0) Pushing a1(r82,l0)(cost 0) Popping a1(r82,l0) -- assign reg 0 Popping a0(r85,l0) -- assign reg 0 Disposition: 1:r82 l0 0 0:r85 l0 0 New iteration of spill/restore move +++Costs: overall 5000, reg 5000, mem 0, ld 0, st 0, move 0 +++ move loops 0, new jumps 0 ``` Notice: ` Spill a1(r82,l0)` in GCC 12+=