[Bug target/36782] [4.3/4.4 Regression] SH: spill failure in class 'R0_REGS' with -fpic

2008-07-15 Thread kkojima at gcc dot gnu dot org


--- Comment #4 from kkojima at gcc dot gnu dot org  2008-07-15 22:36 ---
Subject: Bug 36782

Author: kkojima
Date: Tue Jul 15 22:35:48 2008
New Revision: 137853

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137853
Log:
PR target/36782
* config/sh/sh.md (symGOT_load): Don't add REG_EQUAL note.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.md


-- 


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



[Bug target/36782] [4.3/4.4 Regression] SH: spill failure in class 'R0_REGS' with -fpic

2008-07-15 Thread kkojima at gcc dot gnu dot org


--- Comment #5 from kkojima at gcc dot gnu dot org  2008-07-15 22:43 ---
Subject: Bug 36782

Author: kkojima
Date: Tue Jul 15 22:42:45 2008
New Revision: 137854

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137854
Log:
Backport from mainline:
PR target/36782
* config/sh/sh.md (symGOT_load): Don't add REG_EQUAL note.


Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/sh/sh.md


-- 


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



[Bug target/36782] [4.3/4.4 Regression] SH: spill failure in class 'R0_REGS' with -fpic

2008-07-15 Thread kkojima at gcc dot gnu dot org


--- Comment #6 from kkojima at gcc dot gnu dot org  2008-07-15 22:50 ---
Fixed.


-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug target/36782] [4.3/4.4 Regression] SH: spill failure in class 'R0_REGS' with -fpic

2008-07-12 Thread kkojima at gcc dot gnu dot org


--- Comment #3 from kkojima at gcc dot gnu dot org  2008-07-12 23:53 ---
I've added a reduced testcase and confirmed that 4.2.4 works too.
The RTL dumps show what is going on in the problematic case.
The backend creates a REG_EQUAL note for the GOT access and CSE
pass locates a memory access after the result is set to R0 according
to this note.  Unfortunately this results a spill failure because
the above memory access requires R0 for reload.
The attached patch removes this note.  I'll test it when 4.3/4.4
can be built for SH again.

--- ORIG/trunk/gcc/config/sh/sh.md  2008-04-27 13:53:04.0 +0900
+++ INTEST/trunk/gcc/config/sh/sh.md2008-07-13 08:38:15.0 +0900
@@ -8880,9 +8880,6 @@ label:
   /* ??? Should we have a special alias set for the GOT?  */
   insn = emit_move_insn (operands[0], mem);

-  set_unique_reg_note (insn, REG_EQUAL,
-  XVECEXP (XEXP (operands[1], 0), 0, 0));
-
   DONE;
 })



-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||kkojima at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||ice-on-valid-code
  Known to fail||4.3.1 4.4.0
  Known to work||4.2.4
   Last reconfirmed|-00-00 00:00:00 |2008-07-12 23:53:41
   date||
Summary|php-5.2.5, error: unable to |[4.3/4.4 Regression] SH:
   |find a register to spill in |spill failure in class
   |class 'R0_REGS' |'R0_REGS' with -fpic


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