Liveness: fix br instruction not tracking its operand

This commit is contained in:
Andrew Kelley 2021-07-20 16:04:46 -07:00
parent f47cf93b47
commit 91c4e28c51

View File

@ -250,7 +250,6 @@ fn analyzeInst(
.arg,
.alloc,
.br,
.constant,
.const_ty,
.breakpoint,
@ -321,6 +320,10 @@ fn analyzeInst(
const extra = a.air.extraData(Air.StructField, inst_datas[inst].ty_pl.payload).data;
return trackOperands(a, new_set, inst, main_tomb, .{ extra.struct_ptr, .none, .none });
},
.br => {
const br = inst_datas[inst].br;
return trackOperands(a, new_set, inst, main_tomb, .{ br.operand, .none, .none });
},
.assembly => {
const extra = a.air.extraData(Air.Asm, inst_datas[inst].ty_pl.payload);
const extended = a.zir.instructions.items(.data)[extra.data.zir_index].extended;