From d288e53d0c83a81e8001d3661b4bfc455c1ebb18 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 10 Jan 2002 18:20:03 +0000 Subject: [PATCH] alias.c (find_base_value): Add cases for HIGH... 2002-01-10 David Edelsohn * 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 --- gcc/ChangeLog | 7 +++++++ gcc/alias.c | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2926a783c43..5a5e12e735a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-01-10 David Edelsohn + + * 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. + 2002-01-10 Kazu Hirata * config/h8300/h8300.md: Remove constraints from expanders. diff --git a/gcc/alias.c b/gcc/alias.c index 9843d0605b5..a84d89439a7 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: -- 2.30.2