diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-25 07:45:30 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-25 07:45:30 +0000 |
commit | eff625312056633d1e42242f72cf416c200e9b6a (patch) | |
tree | 863527e50b8f256b7731c19a867bbf1f242bfe65 /gcc/regrename.c | |
parent | d2f2a3e5cc2129a6f5b153ca3e71ea892d4c2afb (diff) | |
download | gcc-eff625312056633d1e42242f72cf416c200e9b6a.tar.gz |
* regrename.c (build_def_use): Share RTL between MATCH_OPERATOR and
corresponding MATCH_DUP.
* gcc.c-torture/compile/20020323-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r-- | gcc/regrename.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index 6277398945d..448eeb85333 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -764,7 +764,7 @@ build_def_use (bb) rtx note; rtx old_operands[MAX_RECOG_OPERANDS]; rtx old_dups[MAX_DUP_OPERANDS]; - int i; + int i, icode; int alt; int predicated; @@ -786,6 +786,7 @@ build_def_use (bb) extract_insn (insn); constrain_operands (1); + icode = recog_memoized (insn); preprocess_constraints (); alt = which_alternative; n_ops = recog_data.n_operands; @@ -827,8 +828,16 @@ build_def_use (bb) } for (i = 0; i < recog_data.n_dups; i++) { + int dup_num = recog_data.dup_num[i]; + old_dups[i] = *recog_data.dup_loc[i]; *recog_data.dup_loc[i] = cc0_rtx; + + /* For match_dup of match_operator or match_parallel, share + them, so that we don't miss changes in the dup. */ + if (icode >= 0 + && insn_data[icode].operand[dup_num].eliminable == 0) + old_dups[i] = recog_data.operand[dup_num]; } scan_rtx (insn, &PATTERN (insn), NO_REGS, terminate_all_read, |