Created attachment 44157 [details] reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2 testcase.c testcase.c: In function 'foo': testcase.c:20:1: error: unable to find a register to spill } ^ testcase.c:20:1: error: this is the insn: (insn 214 65 201 3 (set (reg:DI 208) (reg:DI 1 dx)) "testcase.c":15 85 {*movdi_internal} (expr_list:REG_DEAD (reg:DI 1 dx) (nil))) during RTL pass: reload testcase.c:20:1: internal compiler error: in lra_split_hard_reg_for, at lra-assigns.c:1810 0x67a94c _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl-error.c:108 0xc47293 lra_split_hard_reg_for() /repo/gcc-trunk/gcc/lra-assigns.c:1810 0xc40ee9 lra(_IO_FILE*) /repo/gcc-trunk/gcc/lra.c:2507 0xbef719 do_reload /repo/gcc-trunk/gcc/ira.c:5465 0xbef719 execute /repo/gcc-trunk/gcc/ira.c:5649 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-260408-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-260408-checking-yes-rtl-df-extra-amd64 Thread model: posix gcc version 9.0.0 20180520 (experimental) (GCC)
Started with r257751.
GCC 8.2 has been released.
I cannot reproduce it anymore w/ gcc-9.0.0-alpha20181021 snapshot (r265361). Seems to be fixed on the trunk w/ recent LRA-related patches.
Created attachment 44904 [details] unreduced testcase (In reply to Arseny Solokha from comment #3) > I cannot reproduce it anymore w/ gcc-9.0.0-alpha20181021 snapshot (r265361). > Seems to be fixed on the trunk w/ recent LRA-related patches. The unreduced testcase is still failing for me. $ x86_64-pc-linux-gnu-gcc -O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2 xxx.c -w xxx.c: In function 'bar1': xxx.c:62:1: error: unable to find a register to spill 62 | } | ^ xxx.c:62:1: error: this is the insn: (insn 368 117 348 3 (set (reg:DI 338) (reg:DI 1 dx)) "xxx.c":57:12 66 {*movdi_internal} (expr_list:REG_DEAD (reg:DI 1 dx) (nil))) during RTL pass: reload xxx.c:62:1: internal compiler error: in lra_split_hard_reg_for, at lra-assigns.c:1810 0x68455b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl-error.c:108 0xc6f016 lra_split_hard_reg_for() /repo/gcc-trunk/gcc/lra-assigns.c:1810 0xc6870c lra(_IO_FILE*) /repo/gcc-trunk/gcc/lra.c:2533 0xc153e9 do_reload /repo/gcc-trunk/gcc/ira.c:5469 0xc153e9 execute /repo/gcc-trunk/gcc/ira.c:5653 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
GCC 8.3 has been released.
Author: vmakarov Date: Wed Mar 13 20:35:18 2019 New Revision: 269662 URL: https://gcc.gnu.org/viewcvs?rev=269662&root=gcc&view=rev Log: 2019-03-13 Vladimir Makarov <vmakarov@redhat.com> PR target/85860 * lra-constraints.c (inherit_in_ebb): Update potential_reload_hard_regs along with live_hard_regs. 2019-03-13 Vladimir Makarov <vmakarov@redhat.com> PR target/85860 * gcc.target/i386/pr85860.c: New. Added: trunk/gcc/testsuite/gcc.target/i386/pr85860.c Modified: trunk/gcc/ChangeLog trunk/gcc/lra-constraints.c trunk/gcc/testsuite/ChangeLog
Author: vmakarov Date: Wed Mar 13 20:44:50 2019 New Revision: 269663 URL: https://gcc.gnu.org/viewcvs?rev=269663&root=gcc&view=rev Log: 2019-03-13 Vladimir Makarov <vmakarov@redhat.com> PR target/85860 * lra-constraints.c (inherit_in_ebb): Update potential_reload_hard_regs along with live_hard_regs. 2019-03-13 Vladimir Makarov <vmakarov@redhat.com> PR target/85860 * gcc.target/i386/pr85860.c: New. Added: branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr85860.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/lra-constraints.c branches/gcc-8-branch/gcc/testsuite/ChangeLog
Fixed.