From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 403733858C2C; Fri, 21 Jan 2022 10:18:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 403733858C2C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/102478] [9/10/11/12 Regression] during RTL pass: ce3: ICE: in gen_reg_rtx, at emit-rtl.c:1167 with -O2 -fno-if-conversion Date: Fri, 21 Jan 2022 10:18:02 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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:18:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102478 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c2d9159717b474f9c06dde4d32b48b87164deb50 commit r12-6786-gc2d9159717b474f9c06dde4d32b48b87164deb50 Author: Jakub Jelinek Date: Fri Jan 21 11:16:50 2022 +0100 optabs: Don't create pseudos in prepare_cmp_insn when not allowed [PR102478] cond traps can be created during ce3 after reload (and e.g. PR103028 recently fixed some ce3 cond trap related bug, so I think often that works fine and we shouldn't disable cond traps after RA altogether), but it calls prepare_cmp_insn. This function can fail, so I don't see why we couldn't make it work after RA (in most cases it already just works). The first hunk is just an optimization which doesn't make sense after RA, so I've guarded it with can_create_pseudo_p. The second hunk is just a theoretical case, I don't have a testcase for= it. prepare_cmp_insn has some other spots that can create pseudos, like when both operands have VOIDmode, or when it is BLKmode comparison, or not OPTAB_DIRECT, but I think none of that applies to ce3, we punt on BLKmode earlier, use OPTAB_DIRECT and shouldn't be comparing two VOIDmode CONST_INTs. 2022-01-21 Jakub Jelinek PR rtl-optimization/102478 * optabs.cc (prepare_cmp_insn): If !can_create_pseudo_p (), don= 't force_reg constants and for -fnon-call-exceptions fail if copy_to_reg would be needed. * gcc.dg/pr102478.c: New test.=