aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir_ssa.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-11 12:14:09 +0200
committerlemon <lsof@mailbox.org>2026-04-11 12:14:09 +0200
commit757b5735f44e9a9454f12612ec00c38d81f5f32c (patch)
treef6470c4704bd1690a6476b2bb2140d10c5f4057c /src/ir_ssa.c
parent116a53553bfc3f5c55fb532550b97be8fab4c200 (diff)
backend: run mem2reg after inlining
Diffstat (limited to 'src/ir_ssa.c')
-rw-r--r--src/ir_ssa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ir_ssa.c b/src/ir_ssa.c
index 6e7945b..a1d960f 100644
--- a/src/ir_ssa.c
+++ b/src/ir_ssa.c
@@ -35,6 +35,8 @@ copyopt(Function *fn)
if (ins->cls != k) continue;
replcuses(var, arg);
+ if (arg.t == RTMP)
+ deluse(blk, var.i, arg);
*ins = mkinstr0(Onop,0);
deluses(var.i);
}