From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43F2F3858C2C; Fri, 21 Jan 2022 10:56:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43F2F3858C2C From: "rdapp at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104153] [12 Regression] ICE due to recent ifcvt changes Date: Fri, 21 Jan 2022 10:56:15 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rdapp at linux dot ibm.com X-Bugzilla-Status: UNCONFIRMED 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: Fri, 21 Jan 2022 10:56:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104153 --- Comment #1 from rdapp at linux dot ibm.com --- I was able to reproduce the ICE on a cross compiler. Curiously, we do not e= ven succeed with if-conversion here but nevertheless emit an insn (jump_insn 78 9 79 6 (set (pc) (if_then_else (ne:BI (reg:BI 34 ?sr_f) (reg:SI 160)) (label_ref:SI 218) (pc))) "../../../../../../..//newlib-cygwin/newlib/libm/math/s_floor.c":90:14 77 {*cbranch} (expr_list:REG_DEAD (reg:BI 34 ?sr_f) (int_list:REG_BR_PROB 536870916 (nil))) -> 218) while reg:SI 160 is nowhere to be found. Most likely the way I emit the sequences has side effects that I failed to properly revert. Everything should be inside begin_sequence () end_sequence () blocks but that is not sufficient. I guess if the optabs interfaces are exposed and used like in the patch we also need delete_insns_since () or similar? The problem is most likely latent on other targets as well.=