]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/42429 (Miscompilation of 2fish on s390)
authorJakub Jelinek <jakub@redhat.com>
Mon, 21 Dec 2009 16:32:44 +0000 (17:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 21 Dec 2009 16:32:44 +0000 (17:32 +0100)
PR rtl-optimization/42429
* reload.c (find_reloads_subreg_address): When adjusting mode of
MEM, update also MEM_SIZE if it is set.

From-SVN: r155374

gcc/ChangeLog
gcc/reload.c

index 7eef1e8400f30eb0cb8291d19b562cf96b851ce6..4dde7e48f032e09c869ed0094542c039e7d979e0 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/42429
+       * reload.c (find_reloads_subreg_address): When adjusting mode of
+       MEM, update also MEM_SIZE if it is set.
+
 2009-12-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR bootstrap/42345
index 97c6bacf25bc59fc552c441a1c411b7196a5af4f..4601b4aeacd672fc09e80c410626c449b3a66484 100644 (file)
@@ -6149,6 +6149,9 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum,
              PUT_MODE (tem, GET_MODE (x));
              if (MEM_OFFSET (tem))
                set_mem_offset (tem, plus_constant (MEM_OFFSET (tem), offset));
+             if (MEM_SIZE (tem)
+                 && INTVAL (MEM_SIZE (tem)) != (HOST_WIDE_INT) outer_size)
+               set_mem_size (tem, GEN_INT (outer_size));
 
              /* If this was a paradoxical subreg that we replaced, the
                 resulting memory must be sufficiently aligned to allow