From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A60333982430; Mon, 11 Jul 2022 23:37:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A60333982430 From: "vineet.gupta at linux dot dev" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106265] RISC-V SPEC2017 507.cactu code bloat due to address generation Date: Mon, 11 Jul 2022 23:37:42 +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: 12.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: vineet.gupta at linux dot dev 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 23:37:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106265 --- Comment #4 from Vineet Gupta --- Going back to first dump (upstream 6abe341558a w/o riscv_rtx_costs() adj): = the 3rd instruction addi is marking a2 REG_DEAD at 315 cprop.hardreg --->8---- 314r.rnreg (insn 2663 2662 1714 3 (set (reg:DI 13 a3 [2815]) (plus:DI (reg:DI 12 a2 [2816]) (const_int -2024 [0xfffffffffffff818]))) "rhs-cred.cc":42:47 4 {adddi3} (expr_list:REG_EQUAL (const_int 2072 [0x818]) (nil))) --->8---- 315r.cprop_hardreg (insn 2663 2662 1714 3 (set (reg:DI 13 a3 [2815]) (plus:DI (reg:DI 12 a2 [2816]) (const_int -2024 [0xfffffffffffff818]))) "rhs-cred.cc":42:47 4 {adddi3} (expr_list:REG_DEAD (reg:DI 12 a2 [2816]) (expr_list:REG_EQUAL (const_int 2072 [0x818]) (nil)))) Not sure if that is the issue or the compiler just deducing that a2 is dead given that the next instruction sets it up again was introduced much earlie= r in 300r.reload=