From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 09D2238582AB; Thu, 11 May 2023 09:49:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09D2238582AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683798564; bh=yKIrJbOMaf9Qor+RThB9zkdlWtvnxZEduoU88luLUMU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sM9ArZxt3CkdCIrHq/M6jdY1Jn701dkiWiQ88SlpUzpMvLfDuSOKnF+rLQljYaCwf Zd55hM6Hsiy4XLoETn8l/aV2b4ezNXg3+0qFUmmryUvaclFdvY8/pvCHS/1YzOpIW2 ZC8W8wi7hh1xaJ/VL7o2pxRK8ec1XEYIUVgcM1qs= From: "jskumari at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/109009] Shrink Wrap missed opportunity Date: Thu, 11 May 2023 09:49:23 +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: unknown X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jskumari at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jskumari 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=3D109009 --- Comment #7 from Surya Kumari Jangala --- There are a couple of issues in IRA: 1. In improve_allocation() routine, we are not considering save/restore cos= t of using a callee save register (r31 in the failing case). Due to this, r31 is being chosen instead of r3 for allocno r118. 2. In find_costs_and_classes(), we are not computing the cost of register m= oves when we have a 'set' insn that copies from one pseudo reg to another pseudo reg. This is resulting in r118 having ALLOCNO_CLASS_COST of 0.=