From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8BB63858410; Thu, 29 Feb 2024 21:47:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8BB63858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709243240; bh=Q+bD9J2bgPXPhzeeFl00AzhyLUHo6xDSLWsx4ycRNzI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wOS7u+GwCTnWVEr6qaNPWzs+c+1SD6wOZxxS9Ajs3hlZSSmj+/t1Vfu/iY5jw7tMB SYFEGp5dim2ud8P2CehTXgicidp/WwD2JDCxMJyMMCW9l5+TDVL8ek9lsSetl37p+H Uro0xDXUPamUDxPi6S0dRwj9IvKpZTYGiP4K1VSQ= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65010] ppc backend generates unnecessary signed extension Date: Thu, 29 Feb 2024 21:47:18 +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: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aagarwa 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=3D65010 --- Comment #13 from Segher Boessenkool --- (In reply to pthaugen from comment #11) > Another example to clean up. The back to back constant load/sign extend > sequence of rtl insns is created in each block by the block reordering pa= ss > (.bbo) duplicating the common return block. (.bbro) That pass is way late, so you do not get any of the more basic optimisations after it :-( We either need to move this pass earlier, or do this before cprop3 and cse2 as well already, or somehow do a minimal version of all that basic stuff in bbro itself?=