diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2005-11-11 09:38:52 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2005-11-11 09:38:52 +0000 |
commit | 8a4c09c8336cb51f5ab9712da5eaf49d3f25ecc6 (patch) | |
tree | a1dbc619ca5be6a6d5067cc8fa12dc177b80bbd4 /gcc | |
parent | a5df14d4e57b9bad4095c48f09f7712fdcaffe14 (diff) | |
download | gcc-8a4c09c8336cb51f5ab9712da5eaf49d3f25ecc6.zip gcc-8a4c09c8336cb51f5ab9712da5eaf49d3f25ecc6.tar.gz gcc-8a4c09c8336cb51f5ab9712da5eaf49d3f25ecc6.tar.bz2 |
postreload.c (reload_cse_simplify_operands): Fix bug in sorting algorithm so as to choose the best, not the worst, alternative.
* postreload.c (reload_cse_simplify_operands): Fix bug in sorting
algorithm so as to choose the best, not the worst, alternative.
Reset accumulated register class before processing next alternative.
From-SVN: r106780
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/postreload.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ec775d2..0337eb2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-11-11 Ulrich Weigand <uweigand@de.ibm.com> + + * postreload.c (reload_cse_simplify_operands): Fix bug in sorting + algorithm so as to choose the best, not the worst, alternative. + Reset accumulated register class before processing next alternative. + 2005-11-11 Kaz Kojima <kkojima@gcc.gnu.org> PR target/24445 diff --git a/gcc/postreload.c b/gcc/postreload.c index d164ae1..76d54fa 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -575,6 +575,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) op_alt_regno[i][j] = regno; } j++; + class = (int) NO_REGS; break; } p += CONSTRAINT_LEN (c, p); @@ -607,7 +608,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) int this_nregs = alternative_nregs[alternative_order[j]]; if (this_reject < best_reject - || (this_reject == best_reject && this_nregs < best_nregs)) + || (this_reject == best_reject && this_nregs > best_nregs)) { best = j; best_reject = this_reject; |