This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
SUBREG and reload.c
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 22 Nov 2004 12:50:57 +0100
- Subject: SUBREG and reload.c
I was puzzled by the code below in reload.c
Why is it necessary to reload a PLUS, but not other
RTL(MULT/XOR/ASHIFTR, etc.), inside a SUBREG?
Suggestions for reading material most welcome.
--
Øyvind Harboe
http://www.zylin.com
Index: reload.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/reload.c,v
retrieving revision 1.258
diff -u -w -r1.258 reload.c
--- reload.c 9 Nov 2004 17:29:02 -0000 1.258
+++ reload.c 22 Nov 2004 08:18:09 -0000
@@ -2925,7 +2925,8 @@
/* Force reload if this is a constant or PLUS or if there may
be a problem accessing OPERAND in the outer mode. */
if (CONSTANT_P (operand)
- || GET_CODE (operand) == PLUS
+ /* Anything but a MEM or REG must be reloaded */
+ || ((GET_CODE (operand) != MEM) && (GET_CODE (operand) != REG))
/* We must force a reload of paradoxical SUBREGs
of a MEM because the alignment of the inner value
may not be enough to do the outer reference. On