| ... | ... | @@ -104889,8 +104889,9 @@ const Temp = struct { |
| 104889 | 104889 | const result_temp: Temp = .{ .index = result_temp_index.toIndex() }; |
| 104890 | 104890 | assert(cg.reuseTemp(result_temp.index, first_temp.index, first_temp_tracking)); |
| 104891 | 104891 | assert(cg.reuseTemp(result_temp.index, second_temp.index, second_temp_tracking)); |
| 104892 | | cg.temp_type[@intFromEnum(result_temp_index)] = .slice_const_u8; |
| 104893 | 104892 | result_temp_index.tracking(cg).* = .init(result); |
| 104893 | cg.temp_type[@intFromEnum(result_temp_index)] = .slice_const_u8; |
| 104894 | cg.next_temp_index = @enumFromInt(@intFromEnum(result_temp_index) + 1); |
| 104894 | 104895 | first_temp.* = result_temp; |
| 104895 | 104896 | second_temp.* = result_temp; |
| 104896 | 104897 | } |
| ... | ... | @@ -109598,7 +109599,8 @@ const Temp = struct { |
| 109598 | 109599 | ) InnerError!void { |
| 109599 | 109600 | const tomb_bits = cg.liveness.getTombBits(inst); |
| 109600 | 109601 | for (0.., op_refs, op_temps) |op_index, op_ref, op_temp| { |
| 109601 | | if (op_temp.index != temp.index and op_temp.tracking(cg).short != .dead) try op_temp.die(cg); |
| 109602 | if (op_temp.index == temp.index) continue; |
| 109603 | if (op_temp.tracking(cg).short != .dead) try op_temp.die(cg); |
| 109602 | 109604 | if (tomb_bits & @as(Liveness.Bpi, 1) << @intCast(op_index) == 0) continue; |
| 109603 | 109605 | if (cg.reused_operands.isSet(op_index)) continue; |
| 109604 | 109606 | try cg.processDeath(op_ref.toIndexAllowNone() orelse continue); |
| ... | ... | @@ -109617,6 +109619,12 @@ const Temp = struct { |
| 109617 | 109619 | assert(cg.reuseTemp(inst, temp_index.toIndex(), temp_tracking)); |
| 109618 | 109620 | }, |
| 109619 | 109621 | } |
| 109622 | for (0.., op_refs, op_temps) |op_index, op_ref, op_temp| { |
| 109623 | if (op_temp.index != temp.index) continue; |
| 109624 | if (tomb_bits & @as(Liveness.Bpi, 1) << @intCast(op_index) == 0) continue; |
| 109625 | if (cg.reused_operands.isSet(op_index)) continue; |
| 109626 | try cg.processDeath(op_ref.toIndexAllowNone() orelse continue); |
| 109627 | } |
| 109620 | 109628 | } |
| 109621 | 109629 | |
| 109622 | 109630 | fn die(temp: Temp, cg: *CodeGen) InnerError!void { |
| ... | ... | @@ -109642,7 +109650,8 @@ const Temp = struct { |
| 109642 | 109650 | } |
| 109643 | 109651 | |
| 109644 | 109652 | fn isValid(index: Index, cg: *CodeGen) bool { |
| 109645 | | return index.tracking(cg).short != .dead; |
| 109653 | return @intFromEnum(index) < @intFromEnum(cg.next_temp_index) and |
| 109654 | index.tracking(cg).short != .dead; |
| 109646 | 109655 | } |
| 109647 | 109656 | |
| 109648 | 109657 | fn typeOf(index: Index, cg: *CodeGen) Type { |