From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C74AC385DC02; Mon, 9 Aug 2021 21:19:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C74AC385DC02 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101755] [12 regression] gcc.target/arm/reg_equal_test.c fails on arm since r12-2637 Date: Mon, 09 Aug 2021 21:19:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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, 09 Aug 2021 21:19:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101755 --- Comment #2 from Andrew Pinski --- d =3D a | -2; b =3D (d =3D=3D 0) ? c : (c % d); d can never be 0, VRP figures this out now. so we end up with: d =3D a | -2; b =3D 0xc7d24b5e % d; if (b !=3D 0xc7d24b5e) abort(); and b cannot be 0xc7d24b5e because d is negative :). So VRP is optimizing this all the way out. The test was trying to make sure the value 0xc7d24b5e was emitted as a REG_EQUAL note when splitting up the constant (for the forming) in RTL. https://gcc.gnu.org/pipermail/gcc-patches/2015-June/422430.html https://gcc.gnu.org/pipermail/gcc-patches/2015-June/422432.html=