summaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-11 09:38:52 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-11 09:38:52 +0000
commitc2d0cf412ed2005010f51de2d5dc76ec2c8fd786 (patch)
treea1dbc619ca5be6a6d5067cc8fa12dc177b80bbd4 /gcc/postreload.c
parent7b7b9e53fb49163f1dcaa512a6bd4973a9fc500d (diff)
downloadgcc-c2d0cf412ed2005010f51de2d5dc76ec2c8fd786.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106780 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index d164ae17f10..76d54fa0fa4 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;