re PR rtl-optimization/17266 (Libgfortran doesn't build)

PR rtl-optimization/17266
	* regmove.c (optimize_reg_copy_3): Make a new SUBREG for each insn.

From-SVN: r87793
This commit is contained in:
Eric Botcazou 2004-09-21 07:57:55 +02:00 committed by Eric Botcazou
parent 9b60dfd716
commit 15ee342b73
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-09-21 Eric Botcazou <ebotcazou@libertysurf.fr>
PR rtl-optimization/17266
* regmove.c (optimize_reg_copy_3): Make a new SUBREG for each insn.
2004-09-21 Uros Bizjak <uros@kss-loka.si>
PR rtl-optimization/14851

View File

@ -655,7 +655,7 @@ optimize_reg_copy_3 (rtx insn, rtx dest, rtx src)
rtx src_reg = XEXP (src, 0);
int src_no = REGNO (src_reg);
int dst_no = REGNO (dest);
rtx p, set, subreg;
rtx p, set;
enum machine_mode old_mode;
if (src_no < FIRST_PSEUDO_REGISTER
@ -703,14 +703,15 @@ optimize_reg_copy_3 (rtx insn, rtx dest, rtx src)
/* Now walk forward making additional replacements. We want to be able
to undo all the changes if a later substitution fails. */
subreg = gen_lowpart_SUBREG (old_mode, src_reg);
while (p = NEXT_INSN (p), p != insn)
{
if (! INSN_P (p))
continue;
/* Make a tentative change. */
validate_replace_rtx_group (src_reg, subreg, p);
validate_replace_rtx_group (src_reg,
gen_lowpart_SUBREG (old_mode, src_reg),
p);
}
validate_replace_rtx_group (src, src_reg, insn);