aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-15 13:25:06 +0200
committerlemon <lsof@mailbox.org>2023-06-15 13:25:06 +0200
commit78b7a3a6874abad6d2326093287554f3e565a382 (patch)
tree83ee881ea1df5abaae2fa983dee7fa30107557ff
parent85fed148fd68c5e621353dfcf07351f66b290ce3 (diff)
hint in-place operations to use same reg for lhs and dest
-rw-r--r--regalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regalloc.c b/regalloc.c
index a43425c..a8980cf 100644
--- a/regalloc.c
+++ b/regalloc.c
@@ -287,7 +287,7 @@ regalloc(struct function *fn)
}
def(&ra, ins, blk, i);
if (ins->op != Ocall) {
- if (ins->op == Ocopy) hint0 = ins->reg - 1;
+ if (ins->op == Ocopy || ins->inplace) hint0 = ins->reg - 1;
if (ins->op == Omove) {
if (ins->l.t == RREG) hint1 = ins->l.i;
/* MOV Rx,Rx is used by isel to indicate a clobber,