Commit 8a4c09c8 by Ulrich Weigand Committed by Ulrich Weigand

postreload.c (reload_cse_simplify_operands): Fix bug in sorting algorithm so as…

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
parent a5df14d4
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> 2005-11-11 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/24445 PR target/24445
......
...@@ -575,6 +575,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -575,6 +575,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
op_alt_regno[i][j] = regno; op_alt_regno[i][j] = regno;
} }
j++; j++;
class = (int) NO_REGS;
break; break;
} }
p += CONSTRAINT_LEN (c, p); p += CONSTRAINT_LEN (c, p);
...@@ -607,7 +608,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -607,7 +608,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
int this_nregs = alternative_nregs[alternative_order[j]]; int this_nregs = alternative_nregs[alternative_order[j]];
if (this_reject < best_reject if (this_reject < best_reject
|| (this_reject == best_reject && this_nregs < best_nregs)) || (this_reject == best_reject && this_nregs > best_nregs))
{ {
best = j; best = j;
best_reject = this_reject; best_reject = this_reject;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment