| ... | ... | @@ -101177,8 +101177,9 @@ const Temp = struct { |
| 101177 | 101177 | const result_temp: Temp = .{ .index = result_temp_index.toIndex() }; |
| 101178 | 101178 | assert(cg.reuseTemp(result_temp.index, first_temp.index, first_temp_tracking)); |
| 101179 | 101179 | assert(cg.reuseTemp(result_temp.index, second_temp.index, second_temp_tracking)); |
| 101180 | | cg.temp_type[@intFromEnum(result_temp_index)] = .slice_const_u8; |
| 101181 | 101180 | result_temp_index.tracking(cg).* = .init(result); |
| 101181 | cg.temp_type[@intFromEnum(result_temp_index)] = .slice_const_u8; |
| 101182 | cg.next_temp_index = @enumFromInt(@intFromEnum(result_temp_index) + 1); |
| 101182 | 101183 | first_temp.* = result_temp; |
| 101183 | 101184 | second_temp.* = result_temp; |
| 101184 | 101185 | } |
| ... | ... | @@ -105837,7 +105838,8 @@ const Temp = struct { |
| 105837 | 105838 | ) InnerError!void { |
| 105838 | 105839 | const tomb_bits = cg.liveness.getTombBits(inst); |
| 105839 | 105840 | for (0.., op_refs, op_temps) |op_index, op_ref, op_temp| { |
| 105840 | | if (op_temp.index != temp.index) try op_temp.die(cg); |
| 105841 | if (op_temp.index == temp.index) continue; |
| 105842 | if (op_temp.tracking(cg).short != .dead) try op_temp.die(cg); |
| 105841 | 105843 | if (tomb_bits & @as(Liveness.Bpi, 1) << @intCast(op_index) == 0) continue; |
| 105842 | 105844 | if (cg.reused_operands.isSet(op_index)) continue; |
| 105843 | 105845 | try cg.processDeath(op_ref.toIndexAllowNone() orelse continue); |
| ... | ... | @@ -105856,6 +105858,12 @@ const Temp = struct { |
| 105856 | 105858 | assert(cg.reuseTemp(inst, temp_index.toIndex(), temp_tracking)); |
| 105857 | 105859 | }, |
| 105858 | 105860 | } |
| 105861 | for (0.., op_refs, op_temps) |op_index, op_ref, op_temp| { |
| 105862 | if (op_temp.index != temp.index) continue; |
| 105863 | if (tomb_bits & @as(Liveness.Bpi, 1) << @intCast(op_index) == 0) continue; |
| 105864 | if (cg.reused_operands.isSet(op_index)) continue; |
| 105865 | try cg.processDeath(op_ref.toIndexAllowNone() orelse continue); |
| 105866 | } |
| 105859 | 105867 | } |
| 105860 | 105868 | |
| 105861 | 105869 | fn die(temp: Temp, cg: *CodeGen) InnerError!void { |
| ... | ... | @@ -105881,7 +105889,8 @@ const Temp = struct { |
| 105881 | 105889 | } |
| 105882 | 105890 | |
| 105883 | 105891 | fn isValid(index: Index, cg: *CodeGen) bool { |
| 105884 | | return index.tracking(cg).short != .dead; |
| 105892 | return @intFromEnum(index) < @intFromEnum(cg.next_temp_index) and |
| 105893 | index.tracking(cg).short != .dead; |
| 105885 | 105894 | } |
| 105886 | 105895 | |
| 105887 | 105896 | fn typeOf(index: Index, cg: *CodeGen) Type { |