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