summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 17:38:13 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 17:38:13 +0000
commit22dfec7d464f8e9f00fcfff3517423ac572e4017 (patch)
treeb0a9353b5d4b6bd9dfa4bab7a31b42ab7d18dae7 /gcc/alias.c
parenta433cd39616c0a4d7a02b4d2bc3e261faf1dcde3 (diff)
downloadgcc-22dfec7d464f8e9f00fcfff3517423ac572e4017.tar.gz
* alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC,
and POS_DEC. (find_base_term): Likewise. * alias.c (true_dependence): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16182 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index eb28526c8d2..ea62cd56fe2 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -93,6 +93,13 @@ find_base_value (src)
case LABEL_REF:
return src;
+ case PRE_INC:
+ case PRE_DEC:
+ case POST_INC:
+ case POST_DEC:
+ src = XEXP (src, 0);
+ /* fall through */
+
case REG:
/* At the start of a function argument registers have known base
values which may be lost later. Returning an ADDRESS
@@ -463,6 +470,12 @@ find_base_term (x)
case HIGH:
return find_base_term (XEXP (x, 0));
+ case PRE_INC:
+ case PRE_DEC:
+ case POST_INC:
+ case POST_DEC:
+ return find_base_term (XEXP (x, 0));
+
case CONST:
x = XEXP (x, 0);
if (GET_CODE (x) != PLUS && GET_CODE (x) != MINUS)
@@ -824,7 +837,8 @@ true_dependence (mem, mem_mode, x, varies)
if (mem_mode == VOIDmode)
mem_mode = GET_MODE (mem);
- if (! memrefs_conflict_p (mem_mode, mem_addr, SIZE_FOR_MODE (x), x_addr, 0))
+ if (! memrefs_conflict_p (SIZE_FOR_MODE (mem_mode), mem_addr,
+ SIZE_FOR_MODE (x), x_addr, 0))
return 0;
/* If both references are struct references, or both are not, nothing