OSDN Git Service

* emit-rtl.c (set_mem_attributes): Get alignments for constants.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Nov 2001 22:48:29 +0000 (22:48 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Nov 2001 22:48:29 +0000 (22:48 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46896 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c

index 573cb92..59683bd 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 9bbaee4..9242e79 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.  */