From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C71B3887F6D; Fri, 7 Jul 2023 10:28:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C71B3887F6D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688725733; bh=Fa25pAg6nwOEEu0nDvS0yUOZeHZCMN7WaXuXKBdieBg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EbX+4PWzmzNCu8aJfVQGxx95xtfMDyab8C/jRzq8PzCrOmfdCoV8K9ktqAxdcsoG5 khPe4FmMunGxAhmEIh6J5nAosme6rXDLE5E/nnJizJmdd0hXXZzmbP1EJL6zRsXMVE C1JlDmzjKM039EcCFT5q05sR2G0n0I/ClkHKQHeI= From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101469] wrong code with "-O2 -fPIE" for SH Date: Fri, 07 Jul 2023 10:28:53 +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: 10.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo 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: attachments.created 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=3D101469 --- Comment #7 from Oleg Endo --- Created attachment 55498 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55498&action=3Dedit also change address register when applying the peephole The attached patch should fix the issue without removing the peephole optimization. If the eliminated register is in the memory address operand, then the memory operand will be updated respectively. Does anybody still has access to the system where this bug happened? I'd appreciate any testing support.=