[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-12 Thread jakub at gcc dot gnu dot org


--- Comment #9 from jakub at gcc dot gnu dot org  2009-03-12 20:46 ---
Subject: Bug 39431

Author: jakub
Date: Thu Mar 12 20:45:39 2009
New Revision: 144825

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144825
Log:
PR target/39431
* config/i386/predicates.md (cmpxchg8b_pic_memory_operand): New
predicate.
* config/i386/sync.md (sync_compare_and_swap,
sync_compare_and_swap_cc): For DImode with -m32 -fpic check
if operands[1] is cmpxchg8b_pic_memory_operand, if not force address
into a register.
(sync_double_compare_and_swapdi_pic,
sync_double_compare_and_swap_ccdi_pic): Require operand 1 to be
cmpxchg8b_pic_memory_operand instead of just memory_operand.

* gcc.target/i386/pr39431.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr39431.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/predicates.md
trunk/gcc/config/i386/sync.md
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-12 Thread jakub at gcc dot gnu dot org


--- Comment #8 from jakub at gcc dot gnu dot org  2009-03-12 09:56 ---
Created an attachment (id=17446)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17446&action=view)
gcc44-pr39431.patch

Patch I'm bootstrapping/regtesting ATM.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread jakub at gcc dot gnu dot org


--- Comment #7 from jakub at gcc dot gnu dot org  2009-03-11 23:24 ---
The problem is that the memory_operand in the insns also needs registers, and
as the insn before RA has (mem:DI (plus:SI (reg:SI reg1) (reg:SI reg2))), it
needs
2 registers, not just one or zero.  And that is already one too much.  I'd say
we need to handle only a subset of valid memory_operand operands in these 2
patterns, those that need zero or one register.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-03-11 17:50:57 |2009-03-11 23:24:02
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread jakub at gcc dot gnu dot org


--- Comment #6 from jakub at gcc dot gnu dot org  2009-03-11 21:09 ---
Yeah, sync_double_compare_and_swapdi_pic and
sync_double_compare_and_swap_ccdi_pic insns are a little bit register hungry,
they need %eax, %edx, %ecx and one of %esi or %edi.  %ebx is reserved for PIC
pointer, without -fomit-frame-pointer %ebp is reserved as well, %esp is
reserved, so only one of %esi and %edi is left for other stuff.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-03-11 20:51 ---
Well, certainlu with i?86 and -fPIC there are not many registers available.
Using -fomit-frame-pointer may "fix" this issue in this particular case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread ubizjak at gmail dot com


--- Comment #4 from ubizjak at gmail dot com  2009-03-11 18:53 ---
This is actually a general reload problem that will be more and more visible,
as register pressure goes up due to increased register life times (due to other
optimization passes).

Search for "spill" in the bugzilla returns 20 bugs, where 14 bugs are
describing similar failure:

PR 12958 Spill failure when compiling FLAC
PR 16185 ICE: in spill_failure, at reload1.c:1892, global register...
PR 9085  Unable to find register to spill when optimizing
PR 32647 spill failures with hard-register variable
PR 35135 unable to find a register to spill in class ‘GENERAL_REGS...
PR 35664 unable to find a register to spill in class 'FP_REGS' (sp...
PR 36680 ICE in spill_failure, reload1.c:1995
PR 38403 unable to find a register to spill in class ‘CREG’ with -...
PR 38900 unable to find a register to spill
PR 39212 ice for AVR target: unable to find a register to spill in...
PR 39431 [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093
PR 38621 [4.3/4.4 Regression] sh gcc unable to spill register when...
PR 24319 [4.2/4.3/4.4 regression] amd64 register spill error with ...
PR 31786 [4.2/4.3/4.4 Regression][avr] error: unable to find a reg... 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2009-03-11 17:50 ---
This bug is introduced by revision 128012:

http://gcc.gnu.org/ml/gcc-cvs/2007-09/msg6.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-03-11 17:50:57
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 Regression] ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|[4.3/4.4 regression ICE in  |[4.3/4.4 Regression] ICE in
   |spill_failure, at   |spill_failure, at
   |reload1.c:2093  |reload1.c:2093
   Target Milestone|--- |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 regression ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread doko at ubuntu dot com


--- Comment #2 from doko at ubuntu dot com  2009-03-11 14:09 ---
tested 4.3.4 SVN 20090301 and 4.4.0 SVN 20090225.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431



[Bug target/39431] [4.3/4.4 regression ICE in spill_failure, at reload1.c:2093

2009-03-11 Thread doko at ubuntu dot com


--- Comment #1 from doko at ubuntu dot com  2009-03-11 14:07 ---
Created an attachment (id=17437)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17437&action=view)
preprocessed source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39431