aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorJohn Wehle <john@feith.com>2001-03-09 06:28:21 +0000
committerJeff Law <law@gcc.gnu.org>2001-03-08 23:28:21 -0700
commite7d96a83089366d59415e5893a8878c7be65efe0 (patch)
treee58d0b35b7101314a27ffafff223d1f068cc7c75 /gcc/rtlanal.c
parent4ce693cd329cc4e6b7330403188c087b8abbf72c (diff)
downloadgcc-e7d96a83089366d59415e5893a8878c7be65efe0.zip
gcc-e7d96a83089366d59415e5893a8878c7be65efe0.tar.gz
gcc-e7d96a83089366d59415e5893a8878c7be65efe0.tar.bz2
rtlanal.c (rtx_varies_p): Check operand 0 of a LO_SUM unless for_alias is set.
* rtlanal.c (rtx_varies_p): Check operand 0 of a LO_SUM unless for_alias is set. From-SVN: r40340
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 237382f..be9374e 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -163,8 +163,10 @@ rtx_varies_p (x, for_alias)
case LO_SUM:
/* The operand 0 of a LO_SUM is considered constant
- (in fact is it related specifically to operand 1). */
- return rtx_varies_p (XEXP (x, 1), for_alias);
+ (in fact it is related specifically to operand 1)
+ during alias analysis. */
+ return (! for_alias && rtx_varies_p (XEXP (x, 0), for_alias))
+ || rtx_varies_p (XEXP (x, 1), for_alias);
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))