diff options
author | David Edelsohn <edelsohn@gnu.org> | 2002-01-10 18:20:03 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2002-01-10 13:20:03 -0500 |
commit | d288e53d0c83a81e8001d3661b4bfc455c1ebb18 (patch) | |
tree | b93f54fc44bdc3513c7b7850a0fbf80b3744001d /gcc/alias.c | |
parent | ac2ee9b7e7a43987b6b7e3b8c7e97e31157deee6 (diff) | |
download | gcc-d288e53d0c83a81e8001d3661b4bfc455c1ebb18.zip gcc-d288e53d0c83a81e8001d3661b4bfc455c1ebb18.tar.gz gcc-d288e53d0c83a81e8001d3661b4bfc455c1ebb18.tar.bz2 |
alias.c (find_base_value): Add cases for HIGH...
2002-01-10 David Edelsohn <edelsohn@gnu.org>
* alias.c (find_base_value): Add cases for HIGH, PRE_INC, PRE_DEC,
POST_INC, POST_DEC, PRE_MODIFY, and POST_MODIFY.
(find_base_term): Add cases for TRUNCATE, PRE_MODIFY, and POST_MODIFY.
Recurse for any operand of AND as long as constant is non-zero.
From-SVN: r48741
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 9843d06..a84d894 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -849,6 +849,12 @@ find_base_value (src) case ZERO_EXTEND: case SIGN_EXTEND: /* used for NT/Alpha pointers */ case HIGH: + case PRE_INC: + case PRE_DEC: + case POST_INC: + case POST_DEC: + case PRE_MODIFY: + case POST_MODIFY: return find_base_value (XEXP (src, 0)); default: @@ -1220,6 +1226,10 @@ find_base_term (x) case REG: return REG_BASE_VALUE (x); + case TRUNCATE: + if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (Pmode)) + return 0; + /* Fall through. */ case ZERO_EXTEND: case SIGN_EXTEND: /* Used for Alpha/NT pointers */ case HIGH: @@ -1227,6 +1237,8 @@ find_base_term (x) case PRE_DEC: case POST_INC: case POST_DEC: + case PRE_MODIFY: + case POST_MODIFY: return find_base_term (XEXP (x, 0)); case VALUE: @@ -1300,8 +1312,8 @@ find_base_term (x) } case AND: - if (GET_CODE (XEXP (x, 0)) == REG && GET_CODE (XEXP (x, 1)) == CONST_INT) - return REG_BASE_VALUE (XEXP (x, 0)); + if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) != 0) + return find_base_term (XEXP (x, 0)); return 0; case SYMBOL_REF: |