From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 60D253858D39; Fri, 24 Nov 2023 08:46:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60D253858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700815614; bh=gbT4hwJghi1jGX8Yw+JG57Nec2SAEPWaOvljBgmAG5k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wTi6jXWCKmVsw4qwTpPXoZPd/qC1d2+jMxrbopM3KDS4vbZuiG5eid5ZpLAx2vAZh 0FkkNUaWWQsfa75RDaO4ZfYf9PrGxLNaGlbri4YqcuvYjmCRU8EC6uL3Vt2LZ3Nt5F gQf/8LqGdPugJRP+WqTN7z6kcurNeaQgbjUJ7ND4= From: "jskumari at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96017] Powerpc suboptimal register spill in likely path Date: Fri, 24 Nov 2023 08:46:46 +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: 9.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jskumari 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: 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=3D96017 --- Comment #13 from Surya Kumari Jangala --- With the patch at https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631849.html, the testcase gets shrink wrapped. This is the assembly produced: addis 2,12,.TOC.-.LCF0@ha addi 2,2,.TOC.-.LCF0@l lwz %r10,0(%r3) addis %r9,%r2,.LC0@toc@ha ld %r9,.LC0@toc@l(%r9) cmpwi %cr0,%r10,0 lwz %r9,0(%r9) bne %cr0,.L11 extsw %r3,%r9 blr .L11: mflr %r0 std %r0,16(%r1) stdu %r1,-48(%r1) stw %r9,32(%r1) bl slowpath nop lwz %r9,32(%r1) addi %r1,%r1,48 ld %r0,16(%r1) extsw %r3,%r9 mtlr %r0 blr=