* emit-rtl.c (set_mem_attributes): Get alignments for constants.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Fri, 9 Nov 2001 22:48:29 +0000 (22:48 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 9 Nov 2001 22:48:29 +0000 (17:48 -0500)
From-SVN: r46896

gcc/ChangeLog
gcc/emit-rtl.c

index 573cb92abc29ecd98be087889aead9fbefe54bc8..59683bdb3f499a207c5be1af25c2465cd6c5fe62 100644 (file)
@@ -1,3 +1,7 @@
+Fri Nov  9 17:51:09 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * emit-rtl.c (set_mem_attributes): Get alignments for constants.
+
 2001-11-09  Aldy Hernandez  <aldyh@redhat.com>
 
         * rs6000.h (REG_CLASS_CONTENTS): Add VRSAVE bit to ALL_REGS.
index 9bbaee4432be0f35f110509a8520c34645feadbd..9242e790d3d0ecf97275325f90679c89b079ac34 100644 (file)
@@ -1736,6 +1736,15 @@ set_mem_attributes (ref, t, objectp)
       /* If this is an INDIRECT_REF, we know its alignment.  */
       else if (TREE_CODE (t) == INDIRECT_REF)
        align = TYPE_ALIGN (type);
+
+      /* Likewise for constants.  */
+      else if (TREE_CODE_CLASS (TREE_CODE (t)) == 'c')
+       {
+         align = TYPE_ALIGN (type);
+#ifdef CONSTANT_ALIGNMENT
+         align = CONSTANT_ALIGNMENT (t, align);
+#endif
+       }
     }
 
   /* Now set the attributes we computed above.  */