aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-05-29 06:44:10 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-05-29 06:44:10 -0400
commit05c33dd84f1492e862012cad8b1e371d617a82bf (patch)
treef320a242ba8d607ea025171f932da7b21f3364c9 /gcc
parent1b43e280f9102cc9fe5f729b2bf4099fdc87fe0d (diff)
downloadgcc-05c33dd84f1492e862012cad8b1e371d617a82bf.zip
gcc-05c33dd84f1492e862012cad8b1e371d617a82bf.tar.gz
gcc-05c33dd84f1492e862012cad8b1e371d617a82bf.tar.bz2
*** empty log message ***
From-SVN: r1120
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index dc7096b..4a51d42 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5754,7 +5754,7 @@ cse_insn (insn, in_libcall_block)
possibilities. Prefer items not in the hash table to ones
that are when they are equal cost. Note that we can never
worsen an insn as the current contents will also succeed.
- If we find an equivalent identical to the source, use it as best,
+ If we find an equivalent identical to the destination, use it as best,
since this insn will probably be eliminated in that case. */
if (src)
{
@@ -5829,7 +5829,7 @@ cse_insn (insn, in_libcall_block)
trial = src_related, src_related_cost = 10000;
else
{
- trial = canon_reg (copy_rtx (elt->exp), 0);
+ trial = copy_rtx (elt->exp);
elt = elt->next_same_value;
src_elt_cost = 10000;
}
@@ -5866,7 +5866,10 @@ cse_insn (insn, in_libcall_block)
/* Look for a substitution that makes a valid insn. */
else if (validate_change (insn, &SET_SRC (sets[i].rtl), trial, 0))
- break;
+ {
+ SET_SRC (sets[i].rtl) = canon_reg (SET_SRC (sets[i].rtl), insn);
+ break;
+ }
/* If we previously found constant pool entries for
constants and this is a constant, try making a