authorgravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2026-03-22 08:07:03+08:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-08-06 14:55:59+02:00
log6e61a77ec80b2974961bcc460c34af3385c101a0
tree603b3f2d84c7978e0e4cbb0822eabca38f97b4d7
parent16b42da3fd359bf5ae602aa0153e3ec1d6d14822

aarch64: fix Select enum where enum tag is simple type

Tag type can be c_int or something similiar. Change-Id: I41a03860327774586239c5d523180d85d7cc52d7

1 files changed, 2 insertions(+), 6 deletions(-)

src/codegen/aarch64/Select.zig+2-6
...@@ -12176,9 +12176,7 @@ pub const CallAbiIterator = struct {...@@ -12176,9 +12176,7 @@ pub const CallAbiIterator = struct {
12176 const loaded_struct = ip.loadStructType(ty.toIntern());12176 const loaded_struct = ip.loadStructType(ty.toIntern());
12177 switch (loaded_struct.layout) {12177 switch (loaded_struct.layout) {
12178 .auto, .@"extern" => {},12178 .auto, .@"extern" => {},
12179 .@"packed" => continue :type_key .{12179 .@"packed" => continue :type_key ip.indexToKey(loaded_struct.packed_backing_int_type),
12180 .int_type = ip.indexToKey(loaded_struct.packed_backing_int_type).int_type,
12181 },
12182 }12180 }
12183 const size = wip_vi.size(isel);12181 const size = wip_vi.size(isel);
12184 if (size <= 16 * 4) homogeneous_aggregate: {12182 if (size <= 16 * 4) homogeneous_aggregate: {
...@@ -12300,9 +12298,7 @@ pub const CallAbiIterator = struct {...@@ -12300,9 +12298,7 @@ pub const CallAbiIterator = struct {
12300 }12298 }
12301 },12299 },
12302 .opaque_type, .func_type => continue :type_key .{ .simple_type = .anyopaque },12300 .opaque_type, .func_type => continue :type_key .{ .simple_type = .anyopaque },
12303 .enum_type => continue :type_key .{12301 .enum_type => continue :type_key ip.indexToKey(ip.loadEnumType(ty.toIntern()).int_tag_type),
12304 .int_type = ip.indexToKey(ip.loadEnumType(ty.toIntern()).int_tag_type).int_type,
12305 },
12306 .error_set_type,12302 .error_set_type,
12307 .inferred_error_set_type,12303 .inferred_error_set_type,
12308 => continue :type_key .{ .simple_type = .anyerror },12304 => continue :type_key .{ .simple_type = .anyerror },