re PR rtl-optimization/12441 (Can't spill register bug)

PR opt/12441
        Revert: Sat Mar 30 14:08:55 CET 2002  Jan Hubicka  <jh@suse.cz>
        * i386.c (aligned_operand): Be prepared for SUBREGed registers.
        (ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
        (ix86_address_cost): Be prepared for SUBREGed registers.
        (legitimate_address_p): Accept SUBREGed registers.

From-SVN: r75568
This commit is contained in:
Richard Henderson 2004-01-08 18:31:40 -08:00 committed by Richard Henderson
parent a6a5e4c91b
commit 90e4e4c58d
2 changed files with 16 additions and 29 deletions

View File

@ -1,3 +1,12 @@
2004-01-08 Richard Henderson <rth@redhat.com>
PR opt/12441
Revert: Sat Mar 30 14:08:55 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (aligned_operand): Be prepared for SUBREGed registers.
(ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
(ix86_address_cost): Be prepared for SUBREGed registers.
(legitimate_address_p): Accept SUBREGed registers.
2004-01-08 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in: Rename configure.in to configure.ac

View File

@ -4257,11 +4257,6 @@ aligned_operand (rtx op, enum machine_mode mode)
if (! ix86_decompose_address (op, &parts))
abort ();
if (parts.base && GET_CODE (parts.base) == SUBREG)
parts.base = SUBREG_REG (parts.base);
if (parts.index && GET_CODE (parts.index) == SUBREG)
parts.index = SUBREG_REG (parts.index);
/* Look for some component that isn't known to be aligned. */
if (parts.index)
{
@ -5480,7 +5475,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
int retval = 1;
enum ix86_address_seg seg = SEG_DEFAULT;
if (REG_P (addr) || GET_CODE (addr) == SUBREG)
if (GET_CODE (addr) == REG || GET_CODE (addr) == SUBREG)
base = addr;
else if (GET_CODE (addr) == PLUS)
{
@ -5632,11 +5627,6 @@ ix86_address_cost (rtx x)
if (!ix86_decompose_address (x, &parts))
abort ();
if (parts.base && GET_CODE (parts.base) == SUBREG)
parts.base = SUBREG_REG (parts.base);
if (parts.index && GET_CODE (parts.index) == SUBREG)
parts.index = SUBREG_REG (parts.index);
/* More complex memory references are better. */
if (parts.disp && parts.disp != const0_rtx)
cost--;
@ -5981,15 +5971,9 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
if (base)
{
rtx reg;
reason_rtx = base;
if (GET_CODE (base) == SUBREG)
reg = SUBREG_REG (base);
else
reg = base;
if (GET_CODE (reg) != REG)
if (GET_CODE (base) != REG)
{
reason = "base is not a register";
goto report_error;
@ -6001,8 +5985,8 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
goto report_error;
}
if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg))
|| (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (reg)))
if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base))
|| (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base)))
{
reason = "base is not valid";
goto report_error;
@ -6017,15 +6001,9 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
if (index)
{
rtx reg;
reason_rtx = index;
if (GET_CODE (index) == SUBREG)
reg = SUBREG_REG (index);
else
reg = index;
if (GET_CODE (reg) != REG)
if (GET_CODE (index) != REG)
{
reason = "index is not a register";
goto report_error;
@ -6037,8 +6015,8 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
goto report_error;
}
if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (reg))
|| (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (reg)))
if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (index))
|| (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (index)))
{
reason = "index is not valid";
goto report_error;