From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 859623858D28; Tue, 30 May 2023 19:05:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 859623858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685473529; bh=hFhmomMr2B7I+/QPZBIqiO8TZZOwnnRlm8Eitt6sZJw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JqouXw0PxqTwlt8j0lOhqciQkMwDtSx26lMzl9yjr3SNYEm7Ok6nVQ2LJRPILUcjt t4yKF4r79Ze8L7AYqnZojqW6sMgb3oeupuE/r6aqrsC7vZ1vZ6IKNBcPkbzHRlcJKJ vm3kvAKTiHtEhndBtR2AxIcYl6iuLws3SExNtsSM= From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/101188] [postreload] Uses content of a clobbered register Date: Tue, 30 May 2023 19:05:28 +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: 11.1.0 X-Bugzilla-Keywords: ra, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl 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=3D101188 --- Comment #11 from Georg-Johann Lay --- Created attachment 55217 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55217&action=3Dedit Proposed patch for postreload.cc to record clobbers of next insn + test cas= e. This patch solves the problem for avr and tests with no additional regressi= ons for avr. -- rtl-optimization/101188: Don't bypass clobbers of some insns that are optimized or are optimization candidates. gcc/ PR rtl-optimization/101188 * postreload.cc (reload_cse_move2add): Record clobbers of next insn using move2add_note_store. gcc/testsuite/ PR rtl-optimization/101188 * gcc.c-torture/execute/pr101188.c: New test.=