From 79874c83bf76a5b3efd3d558933b90d9b53b829e Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 21 Mar 2026 22:20:34 +0100 Subject: IR: add 3rd operand to Instr The motivation is for aarch64 msub/madd instrs, for isel to produce. But it should be useful for other things too. --- src/ir_mem2reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ir_mem2reg.c') diff --git a/src/ir_mem2reg.c b/src/ir_mem2reg.c index 8890439..ae41833 100644 --- a/src/ir_mem2reg.c +++ b/src/ir_mem2reg.c @@ -276,7 +276,7 @@ mem2reg(Function *fn) if (oisstore(ins->op)) { writevar(&sb, var, use->blk, ins->r); - *ins = mkinstr(Onop,0,); + *ins = mkinstr0(Onop,0); } else if (oisload(ins->op)) { Ref val = readvar(&sb, var, k = ins->cls, use->blk); adduse(use->blk, use->u, val); @@ -285,7 +285,7 @@ mem2reg(Function *fn) assert(val.bits); ext = Ocopy; } - *ins = mkinstr(ext, k, val); + *ins = mkinstr1(ext, k, val); } } /* remove alloca */ -- cgit v1.2.3