]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC, and POS_DEC.
authorJeffrey A Law <law@cygnus.com>
Sun, 26 Oct 1997 17:38:13 +0000 (17:38 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 26 Oct 1997 17:38:13 +0000 (10:38 -0700)
        * 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.

From-SVN: r16182

gcc/ChangeLog
gcc/alias.c

index 9b397f9288c51a8fe2e4d93e37cace6772935ceb..c27ecb19101fe88f420196ca19ef634b98f2314d 100644 (file)
@@ -5,6 +5,12 @@ Sun Oct 26 10:06:11 1997  Toon Moene  <toon@moene.indiv.nluug.nl>
 
 Sun Oct 26 09:21:40 1997  Jeffrey A Law  (law@cygnus.com)
 
+       * 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.
+
        * toplev.c (flag_rerun_loop_opt): New variable.
        (f_options): Handle -frerun-loop-opt.
        (rest_of_compilation): If -frerun-loop-opt, then run the loop
index eb28526c8d243c0b142aa5bd1b4e1a47d251caaf..ea62cd56fe2f32e3a3cbfad488bb285b6320dec5 100644 (file)
@@ -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