From debd8f30b92c8c2fd30b04770173db9b72d055f6 Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Mon, 16 Jun 2014 09:58:34 +0000 Subject: [PATCH] re PR middle-end/61430 (ICE in lra_create_copy) 2014-06-16 Chung-Lin Tang 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 --- gcc/ChangeLog | 6 ++++++ gcc/lra-lives.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index abb63ac..802f3d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-06-16 Chung-Lin Tang + + PR middle-end/61430 + * lra-lives.c (process_bb_lives): Skip creating copy during + insn scan when src/dest has constrained to same regno. + 2014-06-15 Jan Hubicka * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Check again 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; -- 2.7.4