aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-12-21 17:32:44 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-12-21 17:32:44 +0100
commitdcc1e1fab49e2b2d000b22f0053c0ffe53c44b14 (patch)
tree72b4a917e97d1d4beed7033890296db23fc20002
parent938a483f0d2d55bdb68b5f435750c22e5f6d0b95 (diff)
downloadgcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.zip
gcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.tar.gz
gcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.tar.bz2
re PR rtl-optimization/42429 (Miscompilation of 2fish on s390)
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/reload.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7eef1e8..4dde7e4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/reload.c b/gcc/reload.c
index 97c6bac..4601b4a 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -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