aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-05 19:10:56 +0100
committerlemon <lsof@mailbox.org>2025-12-05 19:10:56 +0100
commitaebb00df5fca3cbeb9edb415e584f36949ffb886 (patch)
treebd89442023498e8b6ca5733b4e7dcb597a82246c /amd64
parente0e6650883ce3fe9c96c0f1b1770a19de33faacc (diff)
isel: fix flipped sub not being inplace
Diffstat (limited to 'amd64')
-rw-r--r--amd64/isel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index 23ce3d2..64cda27 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -459,6 +459,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
if (isintcon(ins->l)) {
/* sub imm, x -> sub x, imm; neg x */
fixarg(&ins->l, ins, blk, curi);
+ ins->inplace = 1;
struct instr sub = *ins;
rswap(sub.l, sub.r);
ins->op = Oneg;