stage2: fix implementation of liveness operandDies()

This commit is contained in:
Andrew Kelley
2020-07-17 17:03:24 -07:00
parent 896472c20e
commit a8065a05a5
3 changed files with 39 additions and 1 deletions

View File

@@ -407,6 +407,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
for (body.instructions) |inst| {
const new_inst = try self.genFuncInst(inst);
try inst_table.putNoClobber(self.gpa, inst, new_inst);
// TODO process operand deaths
}
}
@@ -1194,6 +1195,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
while (true) {
i -= 1;
if (self.branch_stack.items[i].inst_table.get(inst)) |mcv| {
assert(mcv != .dead);
return mcv;
}
}