]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment information passed to...
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 12 Sep 2008 13:31:51 +0000 (13:31 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Fri, 12 Sep 2008 13:31:51 +0000 (13:31 +0000)
* emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment
information passed to mark_reg_pointer.
* explow.c (force_reg): Likewise.

From-SVN: r140318

gcc/ChangeLog
gcc/emit-rtl.c
gcc/explow.c

index 653dc51e0592a0780879dfba28245875c65f3109..f499e2fe04ab62c77fb0672bb3c05c5d0457da91 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment
+       information passed to mark_reg_pointer.
+       * explow.c (force_reg): Likewise.
+
 2008-09-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu.c (spu_override_options): Default to -mno-safe-hints
index 0efce7e24340be7eb729e65fcea68123f4cf211f..318ae77533006ae409651fdfa43a1f27bd53a51b 100644 (file)
@@ -979,7 +979,7 @@ set_reg_attrs_from_value (rtx reg, rtx x)
        REG_ATTRS (reg)
          = get_reg_attrs (MEM_EXPR (x), INTVAL (MEM_OFFSET (x)) + offset);
       if (MEM_POINTER (x))
-       mark_reg_pointer (reg, MEM_ALIGN (x));
+       mark_reg_pointer (reg, 0);
     }
   else if (REG_P (x))
     {
index a1f76506023326ab6fcac8f4f04f7b2e578f4929..498d40e284e0e394701883cf0ffdfaf29d43d6bb 100644 (file)
@@ -698,10 +698,8 @@ force_reg (enum machine_mode mode, rtx x)
 
        align = MIN (sa, ca);
       }
-    else if (MEM_P (x) && MEM_POINTER (x))
-      align = MEM_ALIGN (x);
 
-    if (align)
+    if (align || (MEM_P (x) && MEM_POINTER (x)))
       mark_reg_pointer (temp, align);
   }