From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7FF1F384B06A; Mon, 8 Apr 2024 20:22:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FF1F384B06A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712607772; bh=IBkSOmBiPuVeainmAap1p3SuFmltYZcLtCuQgzCndYM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D21xASHkpn9TjEUH98t/qxrjI7Lfe7/0iApAvs0kbFg3NwOjgsju/l259ny4QsRVe PXEDowyIGKpUbONHWPXdRV6+udeUKbSUjnrxyphB/vSMN/PzDnjXTosXFmSPlCTfd7 Bgem8iWstZWoVtYe9SGDmPJkGEihVOIYDMvI96oc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/112560] [14 Regression] ICE in try_combine on pr112494.c Date: Mon, 08 Apr 2024 20:22:50 +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: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112560 --- Comment #7 from GCC Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:eaccdba315b86d374a4e72b9dd8fefb0fc3cc5ee commit r14-9847-geaccdba315b86d374a4e72b9dd8fefb0fc3cc5ee Author: Uros Bizjak Date: Mon Apr 8 20:54:30 2024 +0200 combine: Fix ICE in try_combine on pr112494.c [PR112560] The compiler, configured with --enable-checking=3Dyes,rtl,extra ICEs wi= th: internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'E' (rtx unspec) in try_combine, at combine.cc:3237 This is 3236 /* Just replace the CC reg with a new mode. = */ 3237 SUBST (XEXP (*cc_use_loc, 0), newpat_dest); 3238 undobuf.other_insn =3D cc_use_insn; in combine.cc, where *cc_use_loc is (unspec:DI [ (reg:CC 17 flags) ] UNSPEC_PUSHFL) combine assumes CC must be used inside of a comparison and uses XEXP (.= .., 0) without checking on the RTX type of the argument. Replace cc_use_loc with the entire new RTX only in case cc_use_loc satisfies COMPARISON_P predicate. Otherwise scan the entire cc_use_loc RTX for CC reg to be updated with a new mode. PR rtl-optimization/112560 gcc/ChangeLog: * combine.cc (try_combine): Replace cc_use_loc with the entire new RTX only in case cc_use_loc satisfies COMPARISON_P predicat= e. Otherwise scan the entire cc_use_loc RTX for CC reg to be updat= ed with a new mode. * config/i386/i386.md (@pushf2): Allow all CC modes for operand 1.=