From: vmakarov Date: Fri, 25 Sep 2015 21:06:08 +0000 (+0000) Subject: 2015-09-25 Vladimir Makarov X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4b565815d00fe85471d93ab6d8d0a299f494b22;p=thirdparty%2Fgcc.git 2015-09-25 Vladimir Makarov PR target/61578 * lra-constarints.c (match_reload): Check presence of the input pseudo in the output pseudo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228153 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f102313372ef..56206f468b34 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-25 Vladimir Makarov + + PR target/61578 + * lra-constarints.c (match_reload): Check presence of the input pseudo + in the output pseudo. + 2015-09-25 Tobias Burnus * doc/invoke.texi (-fsanitize): Minor wording tweak. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index fc8e43d66d98..c6afa7a94f5e 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -945,6 +945,12 @@ match_reload (signed char out, signed char *ins, enum reg_class goal_class, = (ins[1] < 0 && REG_P (in_rtx) && (int) REGNO (in_rtx) < lra_new_regno_start && find_regno_note (curr_insn, REG_DEAD, REGNO (in_rtx)) + /* We can not use the same value if the pseudo is mentioned + in the output, e.g. as an address part in memory, + becuase output reload will actually extend the pseudo + liveness. We don't care about eliminable hard regs here + as we are interesting only in pseudos. */ + && (out < 0 || regno_use_in (REGNO (in_rtx), out_rtx) == NULL_RTX) ? lra_create_new_reg (inmode, in_rtx, goal_class, "") : lra_create_new_reg_with_unique_value (outmode, out_rtx, goal_class, ""));