From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E10C3841465; Mon, 25 Jul 2022 10:42:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E10C3841465 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/106187] armhf: Miscompilation at O2 level (O0 / O1 are working) Date: Mon, 25 Jul 2022 10:42:24 +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: 10.4.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 10:42:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106187 --- Comment #41 from Richard Biener --- (In reply to Richard Earnshaw from comment #40) > reload_cse_noop_set_p is the function that decides the store is redundant= .=20 > For this parallel case it's being called once for each set, but all the > cases return true, so the store insn gets removed. OK, so in the end it's rtx_equal_for_cselib_1 that needs similar treatment as in r10-7635 but only for a WAR mode (when we check whether a SET_DEST already contains SET_SRC). I'm not sure if the info required is eventually available, I'd have to trace where it decides the values are the same. If we can't reasonably do that we'd have to axe reload_cse_noop_set_p when flag_strict_aliasing is in effect.=