From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDCEF3858C54; Thu, 16 Nov 2023 07:23:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDCEF3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700119420; bh=FydRoLgvEz4MQT/lptc93ImYCZbKogP8tsdfT4swzb4=; h=From:To:Subject:Date:From; b=hkk3YoJbL6U80jDWJy3AsV6T839FaYMG0Gh68UmT2B67qiQLHPI2Rr8vHKQpLdMc9 ttgNEM5LYJo9HCzZQt3tYbC6VyPuCYfi0pLd7vvyeVauMvSdFiCbeS7fDwTpLJQTto DfOFX0nige9cT02U1l9x+n2TM1bOONjDSh6NcgdU= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112560] New: ICE in try_combine on pr112494.c Date: Thu, 16 Nov 2023 07:23:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc dependson target_milestone cf_gcctarget Message-ID: 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 Bug ID: 112560 Summary: ICE in try_combine on pr112494.c Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: 141242068 at smail dot nju.edu.cn, ubizjak at gmail dot= com Depends on: 112494 Target Milestone: --- Target: x86_64-linux-gnu +++ This bug was initially created as a clone of Bug #112494 +++ As written in https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636503.html I see with --enable-checking=3Dyes,rtl,extra on x86_64-linux: Executing on host: /home/jakub/src/gcc/obj48/gcc/xgcc -B/home/jakub/src/gcc/obj48/gcc/=20 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr112494.c=20=20=20 -fdiagnostics-plain-output -Og -fno-tree-copy-prop -fno-tree-fre -fno-tree-ccp -fno-tree-forwprop -S -o pr112494.s (timeout =3D 300) spawn -ignore SIGHUP /home/jakub/src/gcc/obj48/gcc/xgcc -B/home/jakub/src/gcc/obj48/gcc/ /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr112494.c -fdiagnostics-plain-output -Og -fno-tree-copy-prop -fno-tree-fre -fno-tree-= ccp -fno-tree-forwprop -S -o pr112494.s during RTL pass: combine /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr112494.c: In function 'main': /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/pr112494.c:17:1: internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'E' (rtx unspec) in try_combine, at combine.cc:3237 0x834954 rtl_check_failed_type2(rtx_def const*, int, int, int, char const*, int, char const*) ../../gcc/rtl.cc:761 0xd8a46e try_combine ../../gcc/combine.cc:3237 0x25d65ff combine_instructions ../../gcc/combine.cc:1264 0x25d65ff rest_of_handle_combine ../../gcc/combine.cc:15080 0x25d65ff execute ../../gcc/combine.cc:15124 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. compiler exited with status 1 This is on 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) on which XEXP (guess combine assumes CC must be used inside of a comparison). Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112494 [Bug 112494] ICE in ix86_cc_mode, at config/i386/i386.cc:16477=