alias.c (find_base_value): Add cases for HIGH...
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 10 Jan 2002 18:20:03 +0000 (18:20 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 10 Jan 2002 18:20:03 +0000 (13:20 -0500)
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

gcc/ChangeLog
gcc/alias.c

index 2926a783c43c49281ce906361abb8120e4059fb8..5a5e12e735a77eb250071faa13900b6fbfd0c55f 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2002-01-10  Kazu Hirata  <kazu@hxi.com>
 
        * config/h8300/h8300.md: Remove constraints from expanders.
index 9843d0605b53ae6c4c9778a01f55973503cad415..a84d89439a7389a5818a1855888f672068137f30 100644 (file)
@@ -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: