alias.c (find_base_term, [...]): Make same change as for find_base_value.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Wed, 13 Feb 2002 14:50:53 +0000 (14:50 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 13 Feb 2002 14:50:53 +0000 (09:50 -0500)
* alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND):
Make same change as for find_base_value.

From-SVN: r49730

gcc/ChangeLog
gcc/alias.c

index c8fadb3dd30e5667ff1d637d4adc15230d208067..35aae3e976162c6d917214fbcaadd0eb184f8fe3 100644 (file)
@@ -1,3 +1,8 @@
+Wed Feb 13 09:45:08 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * alias.c (find_base_term, case ZERO_EXTEND, case SIGN_EXTEND):
+       Make same change as for find_base_value.
+
 2002-02-13  Kazu Hirata  <kazu@hxi.com>
 
        * config/h8300/h8300.h (MODES_TIEABLE_P): Accept a combination
index ca533ee4d823f6c8cdfa25f5dd2399e77928c078..fb93d658fafd75992b8955b344657e665c9eb543 100644 (file)
@@ -1242,8 +1242,6 @@ find_base_term (x)
       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:
     case PRE_INC:
     case PRE_DEC:
@@ -1253,6 +1251,19 @@ find_base_term (x)
     case POST_MODIFY:
       return find_base_term (XEXP (x, 0));
 
+    case ZERO_EXTEND:
+    case SIGN_EXTEND:  /* Used for Alpha/NT pointers */
+      {
+       rtx temp = find_base_term (XEXP (x, 0));
+
+#ifdef POINTERS_EXTEND_UNSIGNED
+       if (temp != 0 && CONSTANT_P (temp) && GET_MODE (temp) != Pmode)
+         temp = convert_memory_address (Pmode, temp);
+#endif
+
+       return temp;
+      }
+
     case VALUE:
       val = CSELIB_VAL_PTR (x);
       for (l = val->locs; l; l = l->next)