diff options
author | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-16 09:58:34 +0000 |
---|---|---|
committer | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-16 09:58:34 +0000 |
commit | 89bf872d635067915f1fedb1472f90a350a5aa48 (patch) | |
tree | 70be1e8b60ecb58a413009265fa099cb4d87d3b0 /gcc/lra-lives.c | |
parent | 8cab13cfdd756f6763a19363e3bc5dd50d915b05 (diff) | |
download | gcc-89bf872d635067915f1fedb1472f90a350a5aa48.tar.gz |
2014-06-16 Chung-Lin Tang <cltang@codesourcery.com>
PR middle-end/61430
* lra-lives.c (process_bb_lives): Skip creating copy during
insn scan when src/dest has constrained to same regno.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211701 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-lives.c')
-rw-r--r-- | gcc/lra-lives.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 26ba0d259c0..1e7bb59678e 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -558,7 +558,11 @@ process_bb_lives (basic_block bb, int &curr_point) /* It might be 'inheritance pseudo <- reload pseudo'. */ || (src_regno >= lra_constraint_new_regno_start && ((int) REGNO (SET_DEST (set)) - >= lra_constraint_new_regno_start)))) + >= lra_constraint_new_regno_start) + /* Remember to skip special cases where src/dest regnos are + the same, e.g. insn SET pattern has matching constraints + like =r,0. */ + && src_regno != (int) REGNO (SET_DEST (set))))) { int hard_regno = -1, regno = -1; |