combine.c (nonzero_bits): Re-introduce special case for sp/fp/ap wrt REGNO_POINTER_ALIGN.
authorRichard Henderson <rth@redhat.com>
Mon, 4 Feb 2002 23:06:04 +0000 (15:06 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 4 Feb 2002 23:06:04 +0000 (15:06 -0800)
        * combine.c (nonzero_bits): Re-introduce special case for
        sp/fp/ap wrt REGNO_POINTER_ALIGN.

From-SVN: r49501

gcc/ChangeLog
gcc/combine.c

index bf46b29b504a13d72c64ff9e0eea3fd7b2129177..c38eaa4d162cd01ed9f2613d9311f234ab565fe8 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-04  Richard Henderson  <rth@redhat.com>
+
+       * combine.c (nonzero_bits): Re-introduce special case for
+       sp/fp/ap wrt REGNO_POINTER_ALIGN.
+
 2002-02-05  Aldy Hernandez  <aldyh@redhat.com>
 
         * doc/extend.texi: Warn about unsupported usage of altivec
index 7662b9b69087028db46d5f11be593332a09cd813..269731ff972927f09fc238b0f4dca6b0bd1f412e 100644 (file)
@@ -7896,8 +7896,13 @@ nonzero_bits (x, mode)
 #endif
 
       /* Include declared information about alignment of pointers.  */
-
-      if (REG_POINTER (x) && REGNO_POINTER_ALIGN (REGNO (x)))
+      /* ??? We don't properly preserve REG_POINTER changes across
+        pointer-to-integer casts, so we can't trust it except for
+        things that we know must be pointers.  See execute/960116-1.c.  */
+      if ((x == stack_pointer_rtx
+          || x == frame_pointer_rtx
+          || x == arg_pointer_rtx)
+         && REGNO_POINTER_ALIGN (REGNO (x)))
        {
          unsigned HOST_WIDE_INT alignment
            = REGNO_POINTER_ALIGN (REGNO (x)) / BITS_PER_UNIT;