alpha secondary reload tweek
Richard Henderson
rth@twiddle.net
Tue Jan 25 02:42:00 GMT 2000
I discovered this by noticing some -O0 code that was horrendous even
by -O0 standards. According to Jeff (who happened to be in my office
at the time) a similar clause used to exist on the PA to work around
reload not reloading out-of-range stack slots properly. Something
that has been fixed for quite some time.
r~
* alpha.c (secondary_reload_class): Don't allocate a secondary
for integral mode memories into FLOAT_REGS. Rearrange the more
complicated memory expression inward.
Index: alpha.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/alpha.c,v
retrieving revision 1.110
diff -u -p -d -r1.110 alpha.c
--- alpha.c 2000/01/24 20:10:02 1.110
+++ alpha.c 2000/01/25 10:35:54
@@ -1095,16 +1095,14 @@ secondary_reload_class (class, mode, x,
rtx x;
int in;
{
- if (GET_CODE (x) == MEM
- || (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER)
- || (GET_CODE (x) == SUBREG
- && (GET_CODE (SUBREG_REG (x)) == MEM
- || (GET_CODE (SUBREG_REG (x)) == REG
- && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER))))
+ if ((mode == QImode || mode == HImode) && ! TARGET_BWX)
{
- if (class == FLOAT_REGS && mode != DImode)
- return GENERAL_REGS;
- if ((mode == QImode || mode == HImode) && ! TARGET_BWX)
+ if (GET_CODE (x) == MEM
+ || (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER)
+ || (GET_CODE (x) == SUBREG
+ && (GET_CODE (SUBREG_REG (x)) == MEM
+ || (GET_CODE (SUBREG_REG (x)) == REG
+ && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER))))
{
if (!in || !aligned_memory_operand(x, mode))
return GENERAL_REGS;
More information about the Gcc-patches
mailing list