authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-20 13:11:37-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-20 13:11:37-07:00
logbf4e2ab8d16e74374c4769f90e1f4042c0f968a1
treeb8d90b0f5b2e578ef1b7a699a418e320cd36b5c8
parent515a4942201c802aa2254f5aa083aa249a929aec

loongarch: update Type API usage

fixes invisible merge conflicts with ba0cfda93dabd07ded441ecf475fc28a90bd495e

2 files changed, 27 insertions(+), 27 deletions(-)

src/codegen/loongarch.zig+1-1
...@@ -92,7 +92,7 @@ pub fn generate(...@@ -92,7 +92,7 @@ pub fn generate(
92 for (air_main_body) |air_inst_index| {92 for (air_main_body) |air_inst_index| {
93 if (air.instructions.items(.tag)[@backingInt(air_inst_index)] != .arg) break;93 if (air.instructions.items(.tag)[@backingInt(air_inst_index)] != .arg) break;
94 const arg = air.instructions.items(.data)[@backingInt(air_inst_index)].arg;94 const arg = air.instructions.items(.data)[@backingInt(air_inst_index)].arg;
95 const param_ty = arg.ty.toType();95 const param_ty = arg.ty;
96 if (arg.zir_param_index >= named_params_len)96 if (arg.zir_param_index >= named_params_len)
97 assert(func_type.is_var_args);97 assert(func_type.is_var_args);
98 const param_vi1 = try cc_it1.resolve(param_ty, false) orelse unreachable;98 const param_vi1 = try cc_it1.resolve(param_ty, false) orelse unreachable;
src/codegen/loongarch/Select.zig+26-26
...@@ -2487,7 +2487,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {...@@ -2487,7 +2487,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {
2487 const operands: []const Air.Inst.Ref = @ptrCast(isel.air.extra.items[extra.end..][0 .. extra.data.flags.outputs_len + extra.data.inputs_len]);2487 const operands: []const Air.Inst.Ref = @ptrCast(isel.air.extra.items[extra.end..][0 .. extra.data.flags.outputs_len + extra.data.inputs_len]);
24882488
2489 for (operands) |operand| if (operand != .none) try isel.analyzeUse(operand);2489 for (operands) |operand| if (operand != .none) try isel.analyzeUse(operand);
2490 if (ty_pl.ty != .void_type) try isel.def_order.putNoClobber(gpa, air_inst_index, {});2490 if (ty_pl.ty.ip_index != .void_type) try isel.def_order.putNoClobber(gpa, air_inst_index, {});
2491 },2491 },
2492 .not,2492 .not,
2493 .clz,2493 .clz,
...@@ -2630,7 +2630,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {...@@ -2630,7 +2630,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {
2630 },2630 },
2631 .aggregate_init => {2631 .aggregate_init => {
2632 const ty_pl = air_data[@backingInt(air_inst_index)].ty_pl;2632 const ty_pl = air_data[@backingInt(air_inst_index)].ty_pl;
2633 const elements: []const Air.Inst.Ref = @ptrCast(isel.air.extra.items[ty_pl.payload..][0..@intCast(ty_pl.ty.toType().arrayLen(zcu))]);2633 const elements: []const Air.Inst.Ref = @ptrCast(isel.air.extra.items[ty_pl.payload..][0..@intCast(ty_pl.ty.arrayLen(zcu))]);
26342634
2635 for (elements) |element| try isel.analyzeUse(element);2635 for (elements) |element| try isel.analyzeUse(element);
2636 try isel.def_order.putNoClobber(gpa, air_inst_index, {});2636 try isel.def_order.putNoClobber(gpa, air_inst_index, {});
...@@ -2664,9 +2664,9 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {...@@ -2664,9 +2664,9 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {
2664 .block => Air.Block,2664 .block => Air.Block,
2665 .dbg_inline_block => Air.DbgInlineBlock,2665 .dbg_inline_block => Air.DbgInlineBlock,
2666 }, ty_pl.payload);2666 }, ty_pl.payload);
2667 const result_ty = ty_pl.ty.toInterned().?;2667 const result_ty = ty_pl.ty;
26682668
2669 if (result_ty == .noreturn_type) {2669 if (result_ty.ip_index == .noreturn_type) {
2670 try isel.analyze(@ptrCast(isel.air.extra.items[extra.end..][0..extra.data.body_len]));2670 try isel.analyze(@ptrCast(isel.air.extra.items[extra.end..][0..extra.data.body_len]));
2671 break;2671 break;
2672 }2672 }
...@@ -2676,7 +2676,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {...@@ -2676,7 +2676,7 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void {
2676 const block_entry = isel.active_blocks.pop().?;2676 const block_entry = isel.active_blocks.pop().?;
2677 assert(block_entry.key == air_inst_index);2677 assert(block_entry.key == air_inst_index);
26782678
2679 if (result_ty != .void_type) try isel.def_order.putNoClobber(gpa, air_inst_index, {});2679 if (result_ty.ip_index != .void_type) try isel.def_order.putNoClobber(gpa, air_inst_index, {});
2680 },2680 },
2681 .call,2681 .call,
2682 .call_always_tail,2682 .call_always_tail,
...@@ -3118,14 +3118,14 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3118,14 +3118,14 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
3118 .dbg_inline_block => {3118 .dbg_inline_block => {
3119 const ty_pl = air.data(air.inst_index).ty_pl;3119 const ty_pl = air.data(air.inst_index).ty_pl;
3120 const extra = isel.air.extraData(Air.DbgInlineBlock, ty_pl.payload);3120 const extra = isel.air.extraData(Air.DbgInlineBlock, ty_pl.payload);
3121 try isel.block(air.inst_index, ty_pl.ty.toType(), @ptrCast(3121 try isel.block(air.inst_index, ty_pl.ty, @ptrCast(
3122 isel.air.extra.items[extra.end..][0..extra.data.body_len],3122 isel.air.extra.items[extra.end..][0..extra.data.body_len],
3123 ));3123 ));
3124 },3124 },
3125 .block => {3125 .block => {
3126 const ty_pl = air.data(air.inst_index).ty_pl;3126 const ty_pl = air.data(air.inst_index).ty_pl;
3127 const extra = isel.air.extraData(Air.Block, ty_pl.payload);3127 const extra = isel.air.extraData(Air.Block, ty_pl.payload);
3128 try isel.block(air.inst_index, ty_pl.ty.toType(), @ptrCast(3128 try isel.block(air.inst_index, ty_pl.ty, @ptrCast(
3129 isel.air.extra.items[extra.end..][0..extra.data.body_len],3129 isel.air.extra.items[extra.end..][0..extra.data.body_len],
3130 ));3130 ));
3131 },3131 },
...@@ -3578,7 +3578,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3578,7 +3578,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
35783578
3579 const ty_op = air.data(air.inst_index).ty_op;3579 const ty_op = air.data(air.inst_index).ty_op;
3580 const src_vi = try isel.use(ty_op.operand);3580 const src_vi = try isel.use(ty_op.operand);
3581 const ty = ty_op.ty.toType();3581 const ty = ty_op.ty;
3582 switch (ty.zigTypeTag(zcu)) {3582 switch (ty.zigTypeTag(zcu)) {
3583 .bool => {3583 .bool => {
3584 // boolean not3584 // boolean not
...@@ -3621,7 +3621,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3621,7 +3621,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
36213621
3622 const ty_op = air.data(air.inst_index).ty_op;3622 const ty_op = air.data(air.inst_index).ty_op;
3623 const src_vi = try isel.use(ty_op.operand);3623 const src_vi = try isel.use(ty_op.operand);
3624 const src_ty = ty_op.ty.toType();3624 const src_ty = ty_op.ty;
3625 const src_bits = src_ty.bitSize(zcu);3625 const src_bits = src_ty.bitSize(zcu);
3626 try res_vi.value.reextendAdvanced(3626 try res_vi.value.reextendAdvanced(
3627 isel,3627 isel,
...@@ -3691,7 +3691,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3691,7 +3691,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
3691 => if (isel.live_values.fetchRemove(air.inst_index)) |dst_vi| unused: {3691 => if (isel.live_values.fetchRemove(air.inst_index)) |dst_vi| unused: {
3692 defer dst_vi.value.deref(isel);3692 defer dst_vi.value.deref(isel);
3693 const ty_op = air.data(air.inst_index).ty_op;3693 const ty_op = air.data(air.inst_index).ty_op;
3694 const dst_ty = ty_op.ty.toType();3694 const dst_ty = ty_op.ty;
3695 const dst_tag = dst_ty.zigTypeTag(zcu);3695 const dst_tag = dst_ty.zigTypeTag(zcu);
3696 const src_ty = isel.air.typeOf(ty_op.operand, ip);3696 const src_ty = isel.air.typeOf(ty_op.operand, ip);
3697 const src_tag = src_ty.zigTypeTag(zcu);3697 const src_tag = src_ty.zigTypeTag(zcu);
...@@ -3964,7 +3964,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3964,7 +3964,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
3964 defer dst_vi.value.deref(isel);3964 defer dst_vi.value.deref(isel);
39653965
3966 const ty_op = air.data(air.inst_index).ty_op;3966 const ty_op = air.data(air.inst_index).ty_op;
3967 const dst_ty = ty_op.ty.toType();3967 const dst_ty = ty_op.ty;
3968 const dst_int_info = dst_ty.intInfo(zcu);3968 const dst_int_info = dst_ty.intInfo(zcu);
3969 const src_ty = isel.air.typeOf(ty_op.operand, ip);3969 const src_ty = isel.air.typeOf(ty_op.operand, ip);
3970 const src_int_info = src_ty.intInfo(zcu);3970 const src_int_info = src_ty.intInfo(zcu);
...@@ -4154,7 +4154,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4154,7 +4154,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
41544154
4155 const ty_pl = air.data(air.inst_index).ty_pl;4155 const ty_pl = air.data(air.inst_index).ty_pl;
4156 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;4156 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;
4157 const elem_size = ty_pl.ty.toType().childType(zcu).abiSize(zcu);4157 const elem_size = ty_pl.ty.childType(zcu).abiSize(zcu);
41584158
4159 const slice_vi = try isel.use(bin_op.lhs);4159 const slice_vi = try isel.use(bin_op.lhs);
4160 const base_ptr_mat = try slice_vi.mat(isel, .{4160 const base_ptr_mat = try slice_vi.mat(isel, .{
...@@ -4173,7 +4173,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4173,7 +4173,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
41734173
4174 const ty_pl = air.data(air.inst_index).ty_pl;4174 const ty_pl = air.data(air.inst_index).ty_pl;
4175 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;4175 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;
4176 const elem_size = ty_pl.ty.toType().childType(zcu).abiSize(zcu);4176 const elem_size = ty_pl.ty.childType(zcu).abiSize(zcu);
41774177
4178 const base_vi = try isel.use(bin_op.lhs);4178 const base_vi = try isel.use(bin_op.lhs);
4179 const base_ptr_mat = try base_vi.mat(isel, .{4179 const base_ptr_mat = try base_vi.mat(isel, .{
...@@ -4196,7 +4196,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4196,7 +4196,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
41964196
4197 const ty_pl = air.data(air.inst_index).ty_pl;4197 const ty_pl = air.data(air.inst_index).ty_pl;
4198 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;4198 const bin_op = isel.air.extraData(Air.Bin, ty_pl.payload).data;
4199 const elem_size = ty_pl.ty.toType().childType(zcu).abiSize(zcu);4199 const elem_size = ty_pl.ty.childType(zcu).abiSize(zcu);
42004200
4201 const base_vi = try isel.use(bin_op.lhs);4201 const base_vi = try isel.use(bin_op.lhs);
4202 const base_mat = try base_vi.matIntRegZeroExt(isel);4202 const base_mat = try base_vi.matIntRegZeroExt(isel);
...@@ -4266,7 +4266,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4266,7 +4266,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4266 if (isel.live_values.fetchRemove(air.inst_index)) |payload_ptr_vi| unused: {4266 if (isel.live_values.fetchRemove(air.inst_index)) |payload_ptr_vi| unused: {
4267 defer payload_ptr_vi.value.deref(isel);4267 defer payload_ptr_vi.value.deref(isel);
42684268
4269 const payload_offset = codegen.errUnionPayloadOffset(unwrapped_try.error_union_payload_ptr_ty.toType().childType(zcu), zcu);4269 const payload_offset = codegen.errUnionPayloadOffset(unwrapped_try.error_union_payload_ptr_ty.childType(zcu), zcu);
4270 if (payload_offset == 0) {4270 if (payload_offset == 0) {
4271 try payload_ptr_vi.value.defMove(isel, unwrapped_try.error_union_ptr);4271 try payload_ptr_vi.value.defMove(isel, unwrapped_try.error_union_ptr);
4272 } else {4272 } else {
...@@ -4307,7 +4307,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4307,7 +4307,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4307 defer agg_vi.value.deref(isel);4307 defer agg_vi.value.deref(isel);
43084308
4309 const ty_pl = air.data(air.inst_index).ty_pl;4309 const ty_pl = air.data(air.inst_index).ty_pl;
4310 const agg_ty = ty_pl.ty.toType();4310 const agg_ty = ty_pl.ty;
4311 switch (ip.indexToKey(agg_ty.toIntern())) {4311 switch (ip.indexToKey(agg_ty.toIntern())) {
4312 .array_type => |array_type| {4312 .array_type => |array_type| {
4313 const elem_ty = ZigType.fromInterned(array_type.child);4313 const elem_ty = ZigType.fromInterned(array_type.child);
...@@ -4380,7 +4380,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4380,7 +4380,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4380 const extra = isel.air.extraData(Air.StructField, ty_pl.payload).data;4380 const extra = isel.air.extraData(Air.StructField, ty_pl.payload).data;
4381 switch (codegen.fieldOffset(4381 switch (codegen.fieldOffset(
4382 isel.air.typeOf(extra.struct_operand, ip),4382 isel.air.typeOf(extra.struct_operand, ip),
4383 ty_pl.ty.toType(),4383 ty_pl.ty,
4384 extra.field_index,4384 extra.field_index,
4385 zcu,4385 zcu,
4386 )) {4386 )) {
...@@ -4403,7 +4403,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4403,7 +4403,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4403 const ty_op = air.data(air.inst_index).ty_op;4403 const ty_op = air.data(air.inst_index).ty_op;
4404 switch (codegen.fieldOffset(4404 switch (codegen.fieldOffset(
4405 isel.air.typeOf(ty_op.operand, ip),4405 isel.air.typeOf(ty_op.operand, ip),
4406 ty_op.ty.toType(),4406 ty_op.ty,
4407 switch (air_tag) {4407 switch (air_tag) {
4408 else => unreachable,4408 else => unreachable,
4409 .struct_field_ptr_index_0 => 0,4409 .struct_field_ptr_index_0 => 0,
...@@ -4429,7 +4429,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4429,7 +4429,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4429 const ty_pl = air.data(air.inst_index).ty_pl;4429 const ty_pl = air.data(air.inst_index).ty_pl;
4430 const extra = isel.air.extraData(Air.StructField, ty_pl.payload).data;4430 const extra = isel.air.extraData(Air.StructField, ty_pl.payload).data;
4431 const agg_ty = isel.air.typeOf(extra.struct_operand, ip);4431 const agg_ty = isel.air.typeOf(extra.struct_operand, ip);
4432 const field_ty = ty_pl.ty.toType();4432 const field_ty = ty_pl.ty;
44334433
4434 const field_bit_offset, const field_bit_size, const is_packed = switch (agg_ty.containerLayout(zcu)) {4434 const field_bit_offset, const field_bit_size, const is_packed = switch (agg_ty.containerLayout(zcu)) {
4435 .auto, .@"extern" => .{4435 .auto, .@"extern" => .{
...@@ -4476,7 +4476,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4476,7 +4476,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
44764476
4477 const ty_pl = air.data(air.inst_index).ty_pl;4477 const ty_pl = air.data(air.inst_index).ty_pl;
4478 const extra = isel.air.extraData(Air.UnionInit, ty_pl.payload).data;4478 const extra = isel.air.extraData(Air.UnionInit, ty_pl.payload).data;
4479 const union_ty = ty_pl.ty.toType();4479 const union_ty = ty_pl.ty;
4480 const loaded_union = ip.loadUnionType(union_ty.toIntern());4480 const loaded_union = ip.loadUnionType(union_ty.toIntern());
4481 const union_layout = ZigType.getUnionLayout(loaded_union, zcu);4481 const union_layout = ZigType.getUnionLayout(loaded_union, zcu);
44824482
...@@ -4549,7 +4549,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4549,7 +4549,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4549 defer opt_vi.value.deref(isel);4549 defer opt_vi.value.deref(isel);
45504550
4551 const ty_op = air.data(air.inst_index).ty_op;4551 const ty_op = air.data(air.inst_index).ty_op;
4552 if (ty_op.ty.toType().optionalReprIsPayload(zcu)) {4552 if (ty_op.ty.optionalReprIsPayload(zcu)) {
4553 try opt_vi.value.defMove(isel, ty_op.operand);4553 try opt_vi.value.defMove(isel, ty_op.operand);
4554 break :unused;4554 break :unused;
4555 }4555 }
...@@ -4568,7 +4568,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4568,7 +4568,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4568 const ty_pl = air.data(air.inst_index).ty_pl;4568 const ty_pl = air.data(air.inst_index).ty_pl;
4569 const extra = isel.air.extraData(Air.FieldParentPtr, ty_pl.payload).data;4569 const extra = isel.air.extraData(Air.FieldParentPtr, ty_pl.payload).data;
4570 switch (codegen.fieldOffset(4570 switch (codegen.fieldOffset(
4571 ty_pl.ty.toType(),4571 ty_pl.ty,
4572 isel.air.typeOf(extra.field_ptr, ip),4572 isel.air.typeOf(extra.field_ptr, ip),
4573 extra.field_index,4573 extra.field_index,
4574 zcu,4574 zcu,
...@@ -4592,7 +4592,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4592,7 +4592,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4592 isel,4592 isel,
4593 try error_union_vi.partExact(4593 try error_union_vi.partExact(
4594 isel,4594 isel,
4595 codegen.errUnionPayloadOffset(ty_op.ty.toType(), zcu),4595 codegen.errUnionPayloadOffset(ty_op.ty, zcu),
4596 payload_vi.value.size(isel),4596 payload_vi.value.size(isel),
4597 ),4597 ),
4598 );4598 );
...@@ -4616,7 +4616,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4616,7 +4616,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4616 defer error_union_vi.value.deref(isel);4616 defer error_union_vi.value.deref(isel);
46174617
4618 const ty_op = air.data(air.inst_index).ty_op;4618 const ty_op = air.data(air.inst_index).ty_op;
4619 const error_union_ty = ty_op.ty.toType();4619 const error_union_ty = ty_op.ty;
4620 const error_union_info = ip.indexToKey(error_union_ty.toIntern()).error_union_type;4620 const error_union_info = ip.indexToKey(error_union_ty.toIntern()).error_union_type;
4621 const error_set_ty: ZigType = .fromInterned(error_union_info.error_set_type);4621 const error_set_ty: ZigType = .fromInterned(error_union_info.error_set_type);
4622 const payload_ty: ZigType = .fromInterned(error_union_info.payload_type);4622 const payload_ty: ZigType = .fromInterned(error_union_info.payload_type);
...@@ -4639,7 +4639,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4639,7 +4639,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4639 defer error_union_vi.value.deref(isel);4639 defer error_union_vi.value.deref(isel);
46404640
4641 const ty_op = air.data(air.inst_index).ty_op;4641 const ty_op = air.data(air.inst_index).ty_op;
4642 const error_union_ty = ty_op.ty.toType();4642 const error_union_ty = ty_op.ty;
4643 const error_union_info = ip.indexToKey(error_union_ty.toIntern()).error_union_type;4643 const error_union_info = ip.indexToKey(error_union_ty.toIntern()).error_union_type;
4644 const error_set_ty: ZigType = .fromInterned(error_union_info.error_set_type);4644 const error_set_ty: ZigType = .fromInterned(error_union_info.error_set_type);
4645 const payload_ty: ZigType = .fromInterned(error_union_info.payload_type);4645 const payload_ty: ZigType = .fromInterned(error_union_info.payload_type);
...@@ -4658,7 +4658,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4658,7 +4658,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4658 .errunion_payload_ptr_set => if (isel.live_values.fetchRemove(air.inst_index)) |payload_ptr_vi| unused: {4658 .errunion_payload_ptr_set => if (isel.live_values.fetchRemove(air.inst_index)) |payload_ptr_vi| unused: {
4659 defer payload_ptr_vi.value.deref(isel);4659 defer payload_ptr_vi.value.deref(isel);
4660 const ty_op = air.data(air.inst_index).ty_op;4660 const ty_op = air.data(air.inst_index).ty_op;
4661 const payload_ty = ty_op.ty.toType().childType(zcu);4661 const payload_ty = ty_op.ty.childType(zcu);
4662 const eu_ty = isel.air.typeOf(ty_op.operand, ip).childType(zcu);4662 const eu_ty = isel.air.typeOf(ty_op.operand, ip).childType(zcu);
4663 const error_set_size = eu_ty.errorUnionSet(zcu).abiSize(zcu);4663 const error_set_size = eu_ty.errorUnionSet(zcu).abiSize(zcu);
46644664