bergner@genoa:~/gcc/BUGS/LRA/new$ cat t001_x.i typedef union { _Decimal128 a; } u_t; extern u_t fn2 (u_t); u_t fn1 (void) { return fn2 (fn1 ()); } bergner@genoa:~/gcc/BUGS/LRA/new$ /home/bergner/gcc/build/gcc-fsf-mainline-bootstrap-lra-default-7/gcc/xgcc -B/home/bergner/gcc/build/gcc-fsf-mainline-bootstrap-lra-default-7/gcc/ -mvsx -S t001_x.i t001_x.i: In function ‘fn1’: t001_x.i:7:1: internal compiler error: Max. number of generated reload insns per insn is achieved (90) } ^ 0x10689feb lra_constraints(bool) /home/bergner/gcc/gcc-fsf-mainline-bootstrap-lra-default/gcc/lra-constraints.c:4336 0x1066f79f lra(_IO_FILE*) /home/bergner/gcc/gcc-fsf-mainline-bootstrap-lra-default/gcc/lra.c:2277 0x106100cb do_reload /home/bergner/gcc/gcc-fsf-mainline-bootstrap-lra-default/gcc/ira.c:5383 0x106100cb execute /home/bergner/gcc/gcc-fsf-mainline-bootstrap-lra-default/gcc/ira.c:5554 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Mike, without looking too closely, I wonder if we need to add TDmode support to your fix in PR68805 ? I'll see if that helps.
Simpler test case??? Anyway, it fails too. typedef union { _Decimal128 a; } u_t; extern u_t fn1 (void); extern void fn2 (u_t); void foo (void) { fn2 (fn1 ()); } Before LRA, we have: (call_insn 5 2 6 2 (parallel [ (set (parallel:TI [ (expr_list:REG_DEP_TRUE (reg:TD 34 2) (const_int 0 [0])) ]) (call (mem:SI (symbol_ref:DI ("fn1") [flags 0x41] <function_decl 0x3fffb568d580 fn1>) [0 fn1 S4 A8]) (const_int 0 [0]))) (clobber (reg:DI 65 lr)) ]) foo.i:7 636 {*call_value_nonlocal_aixdi} (nil) (expr_list (use (reg:DI 2 2)) (nil))) (insn 6 5 7 2 (set (reg:TD 156) (reg:TD 34 2)) foo.i:7 450 {*movtd_64bit_nodm} (expr_list:REG_DEAD (reg:TD 34 2) (nil))) (insn 7 6 8 2 (set (reg:TI 155 [ D.2361 ]) (subreg:TI (reg:TD 156) 0)) foo.i:7 937 {*vsx_movti_64bit} (expr_list:REG_DEAD (reg:TD 156) (nil))) (insn 8 7 9 2 (set (reg:TI 157) (reg:TI 155 [ D.2361 ])) foo.i:7 937 {*vsx_movti_64bit} (expr_list:REG_DEAD (reg:TI 155 [ D.2361 ]) (nil))) (insn 9 8 10 2 (set (reg:TD 158) (subreg:TD (reg:TI 157) 0)) foo.i:7 450 {*movtd_64bit_nodm} (expr_list:REG_DEAD (reg:TI 157) (nil))) (insn 10 9 11 2 (set (reg:TD 34 2) (reg:TD 158)) foo.i:7 450 {*movtd_64bit_nodm} (expr_list:REG_DEAD (reg:TD 158) (nil))) (call_insn 11 10 14 2 (parallel [ (call (mem:SI (symbol_ref:DI ("fn2") [flags 0x41] <function_decl 0x3fffb568d660 fn2>) [0 fn2 S4 A8]) (const_int 0 [0])) (clobber (reg:DI 65 lr)) ]) foo.i:7 635 {*call_nonlocal_aixdi} (expr_list:REG_DEAD (reg:DI 2 2) (expr_list:REG_DEAD (reg:TD 34 2) (nil))) (expr_list (use (reg:DI 2 2)) (expr_list (use (reg:TD 34 2)) (nil)))) (insn 14 11 0 2 (unspec [ (const_int 0 [0]) ] UNSPEC_NOP) foo.i:8 697 {nop} (nil)) After the ICE in LRA, we have: (call_insn 5 2 6 2 (parallel [ (set (parallel:TI [ (expr_list:REG_DEP_TRUE (reg:TD 34 2) (const_int 0 [0])) ]) (call (mem:SI (symbol_ref:DI ("fn1") [flags 0x41] <function_decl 0x3fffb568d580 fn1>) [0 fn1 S4 A8]) (const_int 0 [0]))) (clobber (reg:DI 65 lr)) ]) foo.i:7 636 {*call_value_nonlocal_aixdi} (expr_list:REG_UNUSED (reg:DI 65 lr) (nil)) (expr_list (use (reg:DI 2 2)) (nil))) (insn 6 5 18 2 (set (mem/c:TD (plus:DI (reg/f:DI 113 sfp) (const_int 32 [0x20])) [1 %sfp+32 S16 A128]) (reg:TD 34 2)) foo.i:7 450 {*movtd_64bit_nodm} (expr_list:REG_DEAD (reg:TI 35 3) (expr_list:REG_DEAD (reg:TD 34 2) (nil)))) (insn 18 6 20 2 (set (reg:DI 162) (plus:DI (reg/f:DI 113 sfp) (const_int 32 [0x20]))) foo.i:7 81 {*adddi3} (nil)) (insn 20 18 19 2 (set (reg:DI 163 [162]) (reg:DI 162)) foo.i:7 540 {*movdi_internal64} (nil)) (insn 19 20 21 2 (set (reg:TD 164 [161]) (mem/c:TD (reg:DI 163 [162]) [1 %sfp+32 S16 A128])) foo.i:7 450 {*movtd_64bit_nodm} (nil)) (insn 21 19 22 2 (set (reg:TD 165 [161]) (reg:TD 164 [161])) foo.i:7 450 {*movtd_64bit_nodm} (nil)) (insn 22 21 23 2 (set (reg:TD 166 [161]) (reg:TD 165 [161])) foo.i:7 450 {*movtd_64bit_nodm} (nil)) (insn 23 22 24 2 (set (reg:TD 167 [161]) (reg:TD 166 [161])) foo.i:7 450 {*movtd_64bit_nodm} (nil)) (insn 24 23 25 2 (set (reg:TD 168 [161]) (reg:TD 167 [161])) foo.i:7 450 {*movtd_64bit_nodm} (nil)) ....
Just to be clear, does it still fail with the fix for PR 68805 installed?
(In reply to Michael Meissner from comment #2) > Just to be clear, does it still fail with the fix for PR 68805 installed? Yes, my compiler has that fix.
I don't see the error on trunk with either test case on either BE or LE. Can this be closed?
Martin, did you specify -mlra and -mvsx-timode? Peter's compiler is a test one that turns these on by default. Just want to be sure we're comparing the same things.
I don't see it on a big-endian powerpc64 even with -mlra -mvsx -mvsx-timode but I can reproduce/confirm it with those options on powerpc64le (I did miss those on my first attempt). $ cat u.c && /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -S -Wall -Wextra -S -mlra -mvsx-timode u.c typedef union { _Decimal128 a; } u_t; extern u_t fn2 (u_t); u_t fn1 (void) { return fn2 (fn1 ()); } u.c: In function ‘fn1’: u.c:7:1: internal compiler error: Max. number of generated reload insns per insn is achieved (90) } ^ 0x10a72f87 lra_constraints(bool) /src/gcc/trunk/gcc/lra-constraints.c:4336 0x10a53127 lra(_IO_FILE*) /src/gcc/trunk/gcc/lra.c:2277 0x109d0cc7 do_reload /src/gcc/trunk/gcc/ira.c:5393 0x109d1383 execute /src/gcc/trunk/gcc/ira.c:5564 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.
This appears to be fixed by git 401bd0c81, svn rev 233107, the fix for pr69461. At least, I can't reproduce the problem using the testcase here, past that point on trunk.
My analysis of the pr69461 patch, specifically the simplify_operand_subreg change, says it can indeed be expected to fix this problem. ie. this bug is fixed. *** This bug has been marked as a duplicate of bug 69461 ***