diff options
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index b1c4be9fef..ca571370ad 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3430,10 +3430,12 @@ fn airPrefetch(self: *Self, inst: Air.Inst.Index) InnerError!WValue { } fn airWasmMemorySize(self: *Self, inst: Air.Inst.Index) !WValue { - const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; + if (self.liveness.isUnused(inst)) return WValue{ .none = {} }; + + const pl_op = self.air.instructions.items(.data)[inst].pl_op; const result = try self.allocLocal(self.air.typeOfIndex(inst)); - try self.addLabel(.memory_size, ty_pl.payload); + try self.addLabel(.memory_size, pl_op.payload); try self.addLabel(.local_set, result.local); return result; } |
