diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2016-06-13 10:03:30 +0000 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2016-06-13 10:03:30 +0000 |
commit | df92ec17b2b5fe43de7b6cce0509676aa1a137d0 (patch) | |
tree | ca39a7a2ed13b42defa9fec4e15499074aa92875 | |
parent | 33313f44a24da90879da7bb9e1d2469a6a0eed13 (diff) |
Backport from MainlineARM/embedded-5-branch-2016q2
2015-09-25 Vladimir Makarov <vmakarov@redhat.com>
PR target/61578
* lra-constarints.c (match_reload): Check presence of the input pseudo
in the output pseudo.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ARM/embedded-5-branch@237371 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.arm | 9 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog.arm b/gcc/ChangeLog.arm index ba34cc3ae3e..de2cdf4b169 100644 --- a/gcc/ChangeLog.arm +++ b/gcc/ChangeLog.arm @@ -1,6 +1,15 @@ 2016-06-13 Andre Vieira <andre.simoesdiasvieira@arm.com> Backport from Mainline + 2015-09-25 Vladimir Makarov <vmakarov@redhat.com> + + PR target/61578 + * lra-constarints.c (match_reload): Check presence of the input pseudo + in the output pseudo. + +2016-06-13 Andre Vieira <andre.simoesdiasvieira@arm.com> + + Backport from Mainline 2015-09-01 Vladimir Makarov <vmakarov@redhat.com> PR target/61578 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index b30f0c7c860..92e49dee0bd 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -957,6 +957,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, "")); |