cse.c (cse_set_around_loop): Don't do optimization when new pseudos are created.

* cse.c (cse_set_around_loop): Don't do optimization when
	new pseudos are created.

From-SVN: r19404
This commit is contained in:
J"orn Rennecke 1998-04-24 13:03:42 +00:00 committed by Joern Rennecke
parent 36d86db060
commit e89d3e6faf
2 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Fri Apr 24 20:55:47 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* cse.c (cse_set_around_loop): Don't do optimization when
new pseudos are created.
Fri Apr 24 11:00:18 1998 Jeffrey A Law (law@cygnus.com)
* dbxout.c (dbxout_type_fields): Use HOST_WIDE_INT_PRINT_DEC

View File

@ -8018,9 +8018,24 @@ cse_set_around_loop (x, insn, loop_start)
if (cse_check_loop_start_value
&& validate_change (insn, &SET_SRC (x),
src_elt->exp, 0))
emit_insn_after (gen_move_insn (src_elt->exp,
SET_DEST (set)),
p);
{
/* If this creates new pseudos, this is unsafe,
because the regno of new pseudo is unsuitable
to index into reg_qty when cse_insn processes
the new insn. Therefore, if a new pseudo was
created, discard this optimization. */
int nregs = max_reg_num ();
rtx move
= gen_move_insn (src_elt->exp, SET_DEST (set));
if (nregs != max_reg_num ())
{
if (! validate_change (insn, &SET_SRC (x),
SET_SRC (set), 0))
abort ();
}
else
emit_insn_after (move, p);
}
break;
}
}