| ... | ... | @@ -1769,8 +1769,15 @@ fn finishAirBookkeeping(func: *Func) void { |
| 1769 | 1769 | fn finishAirResult(func: *Func, inst: Air.Inst.Index, result: MCValue) void { |
| 1770 | 1770 | if (func.liveness.isUnused(inst)) switch (result) { |
| 1771 | 1771 | .none, .dead, .unreach => {}, |
| 1772 | | else => unreachable, // Why didn't the result die? |
| 1772 | // Why didn't the result die? |
| 1773 | .register => |r| if (r != .zero) unreachable, |
| 1774 | else => unreachable, |
| 1773 | 1775 | } else { |
| 1776 | switch (result) { |
| 1777 | .register => |r| if (r == .zero) unreachable, // Why did we discard a used result? |
| 1778 | else => {}, |
| 1779 | } |
| 1780 | |
| 1774 | 1781 | tracking_log.debug("%{d} => {} (birth)", .{ inst, result }); |
| 1775 | 1782 | func.inst_tracking.putAssumeCapacityNoClobber(inst, InstTracking.init(result)); |
| 1776 | 1783 | // In some cases, an operand may be reused as the result. |