[Bug target/69773] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "assign_by_spills"

2016-03-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69773

--- Comment #5 from Uroš Bizjak  ---
(In reply to Chengnian Sun from comment #4)
> (In reply to Uroš Bizjak from comment #3)
> > Another issue with hard registers that live accros insn with single-reg
> > constraint.
> > 
> > *** This bug has been marked as a duplicate of bug 70023 ***
> 
> Hi, 
> 
> This bug was reported nearly 20 days earlier than PR70023. Should that
> report be labeled duplicate of this bug report instead?

No, this one is a special case (it explicitly uses hard reg) of the general
problem. So, the canonical PR is 70023.

[Bug target/69773] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "assign_by_spills"

2016-03-23 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69773

Chengnian Sun  changed:

   What|Removed |Added

 CC||chengniansun at gmail dot com

--- Comment #4 from Chengnian Sun  ---
(In reply to Uroš Bizjak from comment #3)
> Another issue with hard registers that live accros insn with single-reg
> constraint.
> 
> *** This bug has been marked as a duplicate of bug 70023 ***

Hi, 

This bug was reported nearly 20 days earlier than PR70023. Should that report
be labeled duplicate of this bug report instead?

Thanks.

[Bug target/69773] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "assign_by_spills"

2016-03-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69773

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Uroš Bizjak  ---
Another issue with hard registers that live accros insn with single-reg
constraint.

*** This bug has been marked as a duplicate of bug 70023 ***

[Bug target/69773] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "assign_by_spills"

2016-02-26 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69773

--- Comment #2 from Qirun Zhang  ---
pr65693 fails to compile at -O0 with the same (similar) trace.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160226 (experimental) [trunk revision 233763] (GCC) 



$ gcc-trunk pr65693.c 
pr65693.c: In function 'foo':
pr65693.c:13:1: error: unable to find a register to spill
 }
 ^
pr65693.c:13:1: error: this is the insn:
(insn 11 35 12 2 (parallel [
(set (reg:DI 96)
(udiv:DI (reg:DI 94)
(reg:DI 106)))
(set (reg:DI 107 [97])
(umod:DI (reg:DI 94)
(reg:DI 106)))
(clobber (reg:CC 17 flags))
]) pr65693.c:10 358 {*udivmoddi4}
 (expr_list:REG_UNUSED (reg:DI 107 [97])
(expr_list:REG_DEAD (reg:DI 106)
(expr_list:REG_DEAD (reg:DI 94)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))
pr65693.c:13:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1417
0xaf9138 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0x9f4515 assign_by_spills
../../gcc/gcc/lra-assigns.c:1417
0x9f4bc3 lra_assign()
../../gcc/gcc/lra-assigns.c:1590
0x9f064b lra(_IO_FILE*)
../../gcc/gcc/lra.c:2331
0x9a76f9 do_reload
../../gcc/gcc/ira.c:5396
0x9a76f9 execute
../../gcc/gcc/ira.c:5567
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/69773] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "assign_by_spills"

2016-02-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69773

Richard Biener  changed:

   What|Removed |Added

   Keywords||ra
 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-02-12
 CC||uros at gcc dot gnu.org,
   ||vmakarov at gcc dot gnu.org
  Component|tree-optimization   |target
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
With 4.7 reload fails in a similar way:

t.i:12:1: error: unable to find a register to spill in class ‘DREG’
t.i:12:1: error: this is the insn:
(insn 8 7 9 2 (parallel [
(set (reg:SI 2 cx [64])
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 4 si
[orig:65 p1_1(D)->k ] [65]))
(sign_extend:DI (reg:SI 2 cx [67])))
(const_int 32 [0x20]
(clobber (scratch:SI))
(clobber (reg:CC 17 flags))
]) t.i:8 334 {*smulsi3_highpart_1}
 (expr_list:REG_DEAD (reg:SI 2 cx [67])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_EQUAL (truncate:SI (lshiftrt:DI (mult:DI
(sign_extend:DI (reg:SI 4 si [orig:65 p1_1(D)->k ] [65]))
(const_int 1374389535 [0x51eb851f]))
(const_int 32 [0x20])))
(nil)
t.i:12:1: internal compiler error: in spill_failure, at reload1.c:2120


I think you are simply unlucky in using dx as a fixed register as that's a
special one for the division instruction.