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: r155375
This commit is contained in:
Jakub Jelinek 2009-12-21 17:34:26 +01:00 committed by Jakub Jelinek
parent 65c4d69165
commit 8de0c218e4
2 changed files with 9 additions and 0 deletions

View 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-17 Dave Korn <dave.korn.cygwin@gmail.com>
* config/i386/cygwin.h (LINK_SPEC): Add -tsaware flag if !mno-cygwin.

View File

@ -6096,6 +6096,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