From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B14EB385802D; Mon, 31 Jan 2022 10:13:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B14EB385802D From: "rdapp at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104198] [12 regression] ifcvt change breaks 64-bit SPARC bootstrap Date: Mon, 31 Jan 2022 10:13:56 +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: 12.0 X-Bugzilla-Keywords: build, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rdapp at linux dot ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 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, 31 Jan 2022 10:13:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104198 --- Comment #14 from rdapp at linux dot ibm.com --- Ok, this is triggered by the copy_rtx I introduced for the or1k failure: + rtx rev_cc_cmp =3D copy_rtx (cond_exec_get_condition (jump, /* get_rever= sed */ true)); because copy_rtx is called with NULL_RTX here. I'm now testing with --- a/gcc/ifcvt.cc +++ b/gcc/ifcvt.cc @@ -3390,8 +3390,12 @@ noce_convert_multiple_sets_1 (struct noce_if_info *if_info, /* Decompose the condition attached to the jump. */ rtx cond =3D noce_get_condition (jump, &cond_earliest, false); - rtx cc_cmp =3D copy_rtx (cond_exec_get_condition (jump)); - rtx rev_cc_cmp =3D copy_rtx (cond_exec_get_condition (jump, /* get_rever= sed */ true)); + rtx cc_cmp =3D cond_exec_get_condition (jump); + if (cc_cmp) + cc_cmp =3D copy_rtx (cc_cmp); + rtx rev_cc_cmp =3D cond_exec_get_condition (jump, /* get_reversed */ tru= e); + if (rev_cc_cmp) + rev_cc_cmp =3D copy_rtx (rev_cc_cmp); but the reg_overlap_mentioned_p part still needs to be improved (independently).=