aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-07-08 01:58:58 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-07 19:58:58 -0600
commitb98b49ac727f969a64be0dcd20d5493cdd325ac8 (patch)
treea9d248d08ea5c8ed84300784f2a81fc120b1d6e0 /gcc/reload.c
parent67a00b49d6b636472ade6a137e818bdc2c003f5f (diff)
downloadgcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.zip
gcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.tar.gz
gcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.tar.bz2
rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART.
* rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART. If either argument is CONSTANT_P, then return zero. * reload.c (reg_overlap_mentioned_for_reload_p): Similarly. From-SVN: r21005
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 0520554..0b76bb7 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5822,7 +5822,14 @@ reg_overlap_mentioned_for_reload_p (x, in)
{
int regno, endregno;
- if (GET_CODE (x) == SUBREG)
+ /* Overly conservative. */
+ if (GET_CODE (x) == STRICT_LOW_PART)
+ x = XEXP (x, 0);
+
+ /* If either argument is a constant, then modifying X can not affect IN. */
+ if (CONSTANT_P (x) || CONSTANT_P (in))
+ return 0;
+ else if (GET_CODE (x) == SUBREG)
{
regno = REGNO (SUBREG_REG (x));
if (regno < FIRST_PSEUDO_REGISTER)
@@ -5844,8 +5851,6 @@ reg_overlap_mentioned_for_reload_p (x, in)
abort ();
}
}
- else if (CONSTANT_P (x))
- return 0;
else if (GET_CODE (x) == MEM)
return refers_to_mem_for_reload_p (in);
else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC