aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-lives.c
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2014-06-16 09:58:34 +0000
committerChung-Lin Tang <cltang@gcc.gnu.org>2014-06-16 09:58:34 +0000
commitdebd8f30b92c8c2fd30b04770173db9b72d055f6 (patch)
tree70be1e8b60ecb58a413009265fa099cb4d87d3b0 /gcc/lra-lives.c
parent6192fa791f5410b3ad9936c13da9992fe59631c7 (diff)
downloadgcc-debd8f30b92c8c2fd30b04770173db9b72d055f6.zip
gcc-debd8f30b92c8c2fd30b04770173db9b72d055f6.tar.gz
gcc-debd8f30b92c8c2fd30b04770173db9b72d055f6.tar.bz2
re PR middle-end/61430 (ICE in lra_create_copy)
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. From-SVN: r211701
Diffstat (limited to 'gcc/lra-lives.c')
-rw-r--r--gcc/lra-lives.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 26ba0d2..1e7bb59 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;