From bf09dd87b6bde0c7af6b9415661be07b250afa27 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 20 Jul 2021 19:30:30 -0700 Subject: [PATCH] codegen: fix lowering of AIR br instruction It incorrectly did not process the death of its operand. --- src/codegen.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.zig b/src/codegen.zig index 84a47a70ac..bf7f167849 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -3404,7 +3404,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { fn airBr(self: *Self, inst: Air.Inst.Index) !void { const branch = self.air.instructions.items(.data)[inst].br; try self.br(branch.block_inst, branch.operand); - return self.finishAirBookkeeping(); + return self.finishAir(inst, .dead, .{ branch.operand, .none, .none }); } fn airBoolOp(self: *Self, inst: Air.Inst.Index) !void {