OSDN Git Service

2010-08-25 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2010 10:03:19 +0000 (10:03 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Aug 2010 10:03:19 +0000 (10:03 +0000)
PR middle-end/45379
* emit-rtl.c (set_mem_attributes_minus_bitpos): Handle
TARGET_MEM_REF in alignment computation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163540 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c

index 28a831a..f9a6082 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-25  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/45379
+       * emit-rtl.c (set_mem_attributes_minus_bitpos): Handle
+       TARGET_MEM_REF in alignment computation.
+
 2010-08-25  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/45059
index 9f96abf..2993c93 100644 (file)
@@ -1615,6 +1615,11 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
        align = MAX (align, TYPE_ALIGN (type));
     }
 
+  else if (TREE_CODE (t) == TARGET_MEM_REF)
+    /* ??? This isn't fully correct, we can't set the alignment from the
+       type in all cases.  */
+    align = MAX (align, TYPE_ALIGN (type));
+
   else if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
     {
       if (integer_zerop (TREE_OPERAND (t, 1)))