http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59317
Bug ID: 59317 Summary: [4.9 Regression] [LRA,MIPS] ICE: in check_rtl, at lra.c (insn does not satisfy constraints) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: robert.suchanek at imgtec dot com CC: vmakarov at redhat dot com Created attachment 31311 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31311&action=edit testcase It appears that the change in revision r205141 throws an ICE in the regression with LRA enabled for mips16. I have attached a narrowed testcase, to reproduce it needs to be compiled with -O2 -mips32 -mips16. ia64-1_testcase.c: In function ‘main’: ia64-1_testcase.c:81:1: internal compiler error: in check_rtl, at lra.c:2036 } ^ 0x821cbc check_rtl /scratch/mips_trunk/src/gcc/gcc/lra.c:2036 0x825eb4 lra(_IO_FILE*) /scratch/mips_trunk/src/gcc/gcc/lra.c:2414 0x7e302e do_reload /scratch/mips_trunk/src/gcc/gcc/ira.c:5452 0x7e302e rest_of_handle_reload /scratch/mips_trunk/src/gcc/gcc/ira.c:5581 0x7e302e execute /scratch/mips_trunk/src/gcc/gcc/ira.c:5610 The LRA generates the following piece of RTL that fails at check_rtl(): (insn 265 54 267 2 (set (reg:SI 8 $8 [339]) (const:SI (unspec:SI [ (const_int 0 [0]) ] UNSPEC_GP))) ia64-1_testcase.c:49 295 {*movsi_mips16} (nil)) This does not satisfy the operand’s constrains in mov<mode>_mips16 pattern. The ICE appears to be triggered because of ALL_REGS assigned to new pseudos generated and the pseudo data gets expanded but I do not know how to fix it without breaking PR59133 again.