https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112560
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=yes,rtl,extra on x86_64-linux: Executing on host: /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 (timeout = 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 <https://gcc.gnu.org/bugs/> 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 = 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=112494 [Bug 112494] ICE in ix86_cc_mode, at config/i386/i386.cc:16477