sparc.c (mem_min_alignment): If not optimizing...
authorJakub Jelinek <jakub@redhat.com>
Wed, 22 Mar 2000 07:58:53 +0000 (08:58 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 22 Mar 2000 07:58:53 +0000 (08:58 +0100)
* config/sparc/sparc.c (mem_min_alignment): If not optimizing,
we cannot be sure that if reload_completed base register will
be properly aligned.

From-SVN: r32682

gcc/ChangeLog
gcc/config/sparc/sparc.c

index c3bc6c5e9bb6c2688120c6de638ae4415a27ae13..cd24b1eaaf2512c4d2c8cc4484396faa67394c54 100644 (file)
@@ -1,3 +1,9 @@
+2000-03-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/sparc/sparc.c (mem_min_alignment): If not optimizing,
+       we cannot be sure that if reload_completed base register will
+       be properly aligned.
+
 2000-03-21  Richard Henderson  <rth@cygnus.com>
 
         * flow.c (delete_block): Fix typo last change.
index f7e0c22a865f495b0815c3bfd3be920f1facecd6..5a9c87b1f1e89931622610e2b9c3f2642b0d3dfc 100644 (file)
@@ -2825,9 +2825,11 @@ mem_min_alignment (mem, desired)
        {
          /* Check if the compiler has recorded some information
             about the alignment of the base REG.  If reload has
-            completed, we already matched with proper alignments.  */
+            completed, we already matched with proper alignments.
+            If not running global_alloc, reload might give us
+            unaligned pointer to local stack though.  */
          if (((cfun != 0 && REGNO_POINTER_ALIGN (regno) >= desired)
-              || reload_completed)
+              || (optimize && reload_completed))
              && ((INTVAL (offset) & (desired - 1)) == 0))
            return 1;
        }