x86_64: implement integer @reduce(.Min)

This commit is contained in:
Jacob Young 2025-05-27 11:02:35 -04:00
parent 7d727ed7df
commit 3fd3358f37
17 changed files with 8450 additions and 700 deletions

View File

@ -2142,7 +2142,7 @@ pub const Inst = struct {
ref_start_index = static_len,
_,
pub const static_len = 109;
pub const static_len = 117;
pub fn toRef(i: Index) Inst.Ref {
return @enumFromInt(@intFromEnum(Index.ref_start_index) + @intFromEnum(i));
@ -2229,6 +2229,7 @@ pub const Inst = struct {
vector_8_i8_type,
vector_16_i8_type,
vector_32_i8_type,
vector_64_i8_type,
vector_1_u8_type,
vector_2_u8_type,
vector_4_u8_type,
@ -2236,20 +2237,27 @@ pub const Inst = struct {
vector_16_u8_type,
vector_32_u8_type,
vector_64_u8_type,
vector_2_i16_type,
vector_4_i16_type,
vector_8_i16_type,
vector_16_i16_type,
vector_32_i16_type,
vector_4_u16_type,
vector_8_u16_type,
vector_16_u16_type,
vector_32_u16_type,
vector_4_i32_type,
vector_8_i32_type,
vector_16_i32_type,
vector_4_u32_type,
vector_8_u32_type,
vector_16_u32_type,
vector_2_i64_type,
vector_4_i64_type,
vector_8_i64_type,
vector_2_u64_type,
vector_4_u64_type,
vector_8_u64_type,
vector_1_u128_type,
vector_2_u128_type,
vector_1_u256_type,

View File

@ -1012,6 +1012,7 @@ pub const Inst = struct {
vector_8_i8_type = @intFromEnum(InternPool.Index.vector_8_i8_type),
vector_16_i8_type = @intFromEnum(InternPool.Index.vector_16_i8_type),
vector_32_i8_type = @intFromEnum(InternPool.Index.vector_32_i8_type),
vector_64_i8_type = @intFromEnum(InternPool.Index.vector_64_i8_type),
vector_1_u8_type = @intFromEnum(InternPool.Index.vector_1_u8_type),
vector_2_u8_type = @intFromEnum(InternPool.Index.vector_2_u8_type),
vector_4_u8_type = @intFromEnum(InternPool.Index.vector_4_u8_type),
@ -1019,20 +1020,27 @@ pub const Inst = struct {
vector_16_u8_type = @intFromEnum(InternPool.Index.vector_16_u8_type),
vector_32_u8_type = @intFromEnum(InternPool.Index.vector_32_u8_type),
vector_64_u8_type = @intFromEnum(InternPool.Index.vector_64_u8_type),
vector_2_i16_type = @intFromEnum(InternPool.Index.vector_2_i16_type),
vector_4_i16_type = @intFromEnum(InternPool.Index.vector_4_i16_type),
vector_8_i16_type = @intFromEnum(InternPool.Index.vector_8_i16_type),
vector_16_i16_type = @intFromEnum(InternPool.Index.vector_16_i16_type),
vector_32_i16_type = @intFromEnum(InternPool.Index.vector_32_i16_type),
vector_4_u16_type = @intFromEnum(InternPool.Index.vector_4_u16_type),
vector_8_u16_type = @intFromEnum(InternPool.Index.vector_8_u16_type),
vector_16_u16_type = @intFromEnum(InternPool.Index.vector_16_u16_type),
vector_32_u16_type = @intFromEnum(InternPool.Index.vector_32_u16_type),
vector_4_i32_type = @intFromEnum(InternPool.Index.vector_4_i32_type),
vector_8_i32_type = @intFromEnum(InternPool.Index.vector_8_i32_type),
vector_16_i32_type = @intFromEnum(InternPool.Index.vector_16_i32_type),
vector_4_u32_type = @intFromEnum(InternPool.Index.vector_4_u32_type),
vector_8_u32_type = @intFromEnum(InternPool.Index.vector_8_u32_type),
vector_16_u32_type = @intFromEnum(InternPool.Index.vector_16_u32_type),
vector_2_i64_type = @intFromEnum(InternPool.Index.vector_2_i64_type),
vector_4_i64_type = @intFromEnum(InternPool.Index.vector_4_i64_type),
vector_8_i64_type = @intFromEnum(InternPool.Index.vector_8_i64_type),
vector_2_u64_type = @intFromEnum(InternPool.Index.vector_2_u64_type),
vector_4_u64_type = @intFromEnum(InternPool.Index.vector_4_u64_type),
vector_8_u64_type = @intFromEnum(InternPool.Index.vector_8_u64_type),
vector_1_u128_type = @intFromEnum(InternPool.Index.vector_1_u128_type),
vector_2_u128_type = @intFromEnum(InternPool.Index.vector_2_u128_type),
vector_1_u256_type = @intFromEnum(InternPool.Index.vector_1_u256_type),

View File

@ -4589,6 +4589,7 @@ pub const Index = enum(u32) {
vector_8_i8_type,
vector_16_i8_type,
vector_32_i8_type,
vector_64_i8_type,
vector_1_u8_type,
vector_2_u8_type,
vector_4_u8_type,
@ -4596,20 +4597,27 @@ pub const Index = enum(u32) {
vector_16_u8_type,
vector_32_u8_type,
vector_64_u8_type,
vector_2_i16_type,
vector_4_i16_type,
vector_8_i16_type,
vector_16_i16_type,
vector_32_i16_type,
vector_4_u16_type,
vector_8_u16_type,
vector_16_u16_type,
vector_32_u16_type,
vector_4_i32_type,
vector_8_i32_type,
vector_16_i32_type,
vector_4_u32_type,
vector_8_u32_type,
vector_16_u32_type,
vector_2_i64_type,
vector_4_i64_type,
vector_8_i64_type,
vector_2_u64_type,
vector_4_u64_type,
vector_8_u64_type,
vector_1_u128_type,
vector_2_u128_type,
vector_1_u256_type,
@ -4954,7 +4962,7 @@ pub const Index = enum(u32) {
}
};
pub const static_keys = [_]Key{
pub const static_keys: [static_len]Key = .{
.{ .int_type = .{
.signedness = .unsigned,
.bits = 0,
@ -5126,6 +5134,8 @@ pub const static_keys = [_]Key{
.{ .vector_type = .{ .len = 16, .child = .i8_type } },
// @Vector(32, i8)
.{ .vector_type = .{ .len = 32, .child = .i8_type } },
// @Vector(64, i8)
.{ .vector_type = .{ .len = 64, .child = .i8_type } },
// @Vector(1, u8)
.{ .vector_type = .{ .len = 1, .child = .u8_type } },
// @Vector(2, u8)
@ -5140,34 +5150,48 @@ pub const static_keys = [_]Key{
.{ .vector_type = .{ .len = 32, .child = .u8_type } },
// @Vector(64, u8)
.{ .vector_type = .{ .len = 64, .child = .u8_type } },
// @Vector(2, i16)
.{ .vector_type = .{ .len = 2, .child = .i16_type } },
// @Vector(4, i16)
.{ .vector_type = .{ .len = 4, .child = .i16_type } },
// @Vector(8, i16)
.{ .vector_type = .{ .len = 8, .child = .i16_type } },
// @Vector(16, i16)
.{ .vector_type = .{ .len = 16, .child = .i16_type } },
// @Vector(32, i16)
.{ .vector_type = .{ .len = 32, .child = .i16_type } },
// @Vector(4, u16)
.{ .vector_type = .{ .len = 4, .child = .u16_type } },
// @Vector(8, u16)
.{ .vector_type = .{ .len = 8, .child = .u16_type } },
// @Vector(16, u16)
.{ .vector_type = .{ .len = 16, .child = .u16_type } },
// @Vector(32, u16)
.{ .vector_type = .{ .len = 32, .child = .u16_type } },
// @Vector(4, i32)
.{ .vector_type = .{ .len = 4, .child = .i32_type } },
// @Vector(8, i32)
.{ .vector_type = .{ .len = 8, .child = .i32_type } },
// @Vector(16, i32)
.{ .vector_type = .{ .len = 16, .child = .i32_type } },
// @Vector(4, u32)
.{ .vector_type = .{ .len = 4, .child = .u32_type } },
// @Vector(8, u32)
.{ .vector_type = .{ .len = 8, .child = .u32_type } },
// @Vector(16, u32)
.{ .vector_type = .{ .len = 16, .child = .u32_type } },
// @Vector(2, i64)
.{ .vector_type = .{ .len = 2, .child = .i64_type } },
// @Vector(4, i64)
.{ .vector_type = .{ .len = 4, .child = .i64_type } },
// @Vector(8, i64)
.{ .vector_type = .{ .len = 8, .child = .i64_type } },
// @Vector(2, u64)
.{ .vector_type = .{ .len = 2, .child = .u64_type } },
// @Vector(8, u64)
// @Vector(4, u64)
.{ .vector_type = .{ .len = 4, .child = .u64_type } },
// @Vector(8, u64)
.{ .vector_type = .{ .len = 8, .child = .u64_type } },
// @Vector(1, u128)
.{ .vector_type = .{ .len = 1, .child = .u128_type } },
// @Vector(2, u128)
@ -5273,10 +5297,6 @@ pub const static_keys = [_]Key{
/// assert below to break an unfortunate and arguably incorrect dependency loop
/// when compiling.
pub const static_len = Zir.Inst.Index.static_len;
comptime {
//@compileLog(static_keys.len);
assert(static_len == static_keys.len);
}
pub const Tag = enum(u8) {
/// This special tag represents a value which was removed from this pool via
@ -11833,6 +11853,7 @@ pub fn typeOf(ip: *const InternPool, index: Index) Index {
.vector_8_i8_type,
.vector_16_i8_type,
.vector_32_i8_type,
.vector_64_i8_type,
.vector_1_u8_type,
.vector_2_u8_type,
.vector_4_u8_type,
@ -11840,20 +11861,27 @@ pub fn typeOf(ip: *const InternPool, index: Index) Index {
.vector_16_u8_type,
.vector_32_u8_type,
.vector_64_u8_type,
.vector_2_i16_type,
.vector_4_i16_type,
.vector_8_i16_type,
.vector_16_i16_type,
.vector_32_i16_type,
.vector_4_u16_type,
.vector_8_u16_type,
.vector_16_u16_type,
.vector_32_u16_type,
.vector_4_i32_type,
.vector_8_i32_type,
.vector_16_i32_type,
.vector_4_u32_type,
.vector_8_u32_type,
.vector_16_u32_type,
.vector_2_i64_type,
.vector_4_i64_type,
.vector_8_i64_type,
.vector_2_u64_type,
.vector_4_u64_type,
.vector_8_u64_type,
.vector_1_u128_type,
.vector_2_u128_type,
.vector_1_u256_type,
@ -12165,6 +12193,7 @@ pub fn zigTypeTag(ip: *const InternPool, index: Index) std.builtin.TypeId {
.vector_8_i8_type,
.vector_16_i8_type,
.vector_32_i8_type,
.vector_64_i8_type,
.vector_1_u8_type,
.vector_2_u8_type,
.vector_4_u8_type,
@ -12172,20 +12201,27 @@ pub fn zigTypeTag(ip: *const InternPool, index: Index) std.builtin.TypeId {
.vector_16_u8_type,
.vector_32_u8_type,
.vector_64_u8_type,
.vector_2_i16_type,
.vector_4_i16_type,
.vector_8_i16_type,
.vector_16_i16_type,
.vector_32_i16_type,
.vector_4_u16_type,
.vector_8_u16_type,
.vector_16_u16_type,
.vector_32_u16_type,
.vector_4_i32_type,
.vector_8_i32_type,
.vector_16_i32_type,
.vector_4_u32_type,
.vector_8_u32_type,
.vector_16_u32_type,
.vector_2_i64_type,
.vector_4_i64_type,
.vector_8_i64_type,
.vector_2_u64_type,
.vector_4_u64_type,
.vector_8_u64_type,
.vector_1_u128_type,
.vector_2_u128_type,
.vector_1_u256_type,

View File

@ -36545,6 +36545,7 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value {
.vector_8_i8_type,
.vector_16_i8_type,
.vector_32_i8_type,
.vector_64_i8_type,
.vector_1_u8_type,
.vector_2_u8_type,
.vector_4_u8_type,
@ -36552,20 +36553,27 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value {
.vector_16_u8_type,
.vector_32_u8_type,
.vector_64_u8_type,
.vector_2_i16_type,
.vector_4_i16_type,
.vector_8_i16_type,
.vector_16_i16_type,
.vector_32_i16_type,
.vector_4_u16_type,
.vector_8_u16_type,
.vector_16_u16_type,
.vector_32_u16_type,
.vector_4_i32_type,
.vector_8_i32_type,
.vector_16_i32_type,
.vector_4_u32_type,
.vector_8_u32_type,
.vector_16_u32_type,
.vector_2_i64_type,
.vector_4_i64_type,
.vector_8_i64_type,
.vector_2_u64_type,
.vector_4_u64_type,
.vector_8_u64_type,
.vector_1_u128_type,
.vector_2_u128_type,
.vector_1_u256_type,

View File

@ -4110,6 +4110,7 @@ pub const slice_const_u8_sentinel_0: Type = .{ .ip_index = .slice_const_u8_senti
pub const vector_8_i8: Type = .{ .ip_index = .vector_8_i8_type };
pub const vector_16_i8: Type = .{ .ip_index = .vector_16_i8_type };
pub const vector_32_i8: Type = .{ .ip_index = .vector_32_i8_type };
pub const vector_64_i8: Type = .{ .ip_index = .vector_64_i8_type };
pub const vector_1_u8: Type = .{ .ip_index = .vector_1_u8_type };
pub const vector_2_u8: Type = .{ .ip_index = .vector_2_u8_type };
pub const vector_4_u8: Type = .{ .ip_index = .vector_4_u8_type };
@ -4117,20 +4118,27 @@ pub const vector_8_u8: Type = .{ .ip_index = .vector_8_u8_type };
pub const vector_16_u8: Type = .{ .ip_index = .vector_16_u8_type };
pub const vector_32_u8: Type = .{ .ip_index = .vector_32_u8_type };
pub const vector_64_u8: Type = .{ .ip_index = .vector_64_u8_type };
pub const vector_2_i16: Type = .{ .ip_index = .vector_2_i16_type };
pub const vector_4_i16: Type = .{ .ip_index = .vector_4_i16_type };
pub const vector_8_i16: Type = .{ .ip_index = .vector_8_i16_type };
pub const vector_16_i16: Type = .{ .ip_index = .vector_16_i16_type };
pub const vector_32_i16: Type = .{ .ip_index = .vector_32_i16_type };
pub const vector_4_u16: Type = .{ .ip_index = .vector_4_u16_type };
pub const vector_8_u16: Type = .{ .ip_index = .vector_8_u16_type };
pub const vector_16_u16: Type = .{ .ip_index = .vector_16_u16_type };
pub const vector_32_u16: Type = .{ .ip_index = .vector_32_u16_type };
pub const vector_4_i32: Type = .{ .ip_index = .vector_4_i32_type };
pub const vector_8_i32: Type = .{ .ip_index = .vector_8_i32_type };
pub const vector_16_i32: Type = .{ .ip_index = .vector_16_i32_type };
pub const vector_4_u32: Type = .{ .ip_index = .vector_4_u32_type };
pub const vector_8_u32: Type = .{ .ip_index = .vector_8_u32_type };
pub const vector_16_u32: Type = .{ .ip_index = .vector_16_u32_type };
pub const vector_2_i64: Type = .{ .ip_index = .vector_2_i64_type };
pub const vector_4_i64: Type = .{ .ip_index = .vector_4_i64_type };
pub const vector_8_i64: Type = .{ .ip_index = .vector_8_i64_type };
pub const vector_2_u64: Type = .{ .ip_index = .vector_2_u64_type };
pub const vector_4_u64: Type = .{ .ip_index = .vector_4_u64_type };
pub const vector_8_u64: Type = .{ .ip_index = .vector_8_u64_type };
pub const vector_1_u128: Type = .{ .ip_index = .vector_1_u128_type };
pub const vector_2_u128: Type = .{ .ip_index = .vector_2_u128_type };
pub const vector_1_u256: Type = .{ .ip_index = .vector_1_u256_type };

File diff suppressed because it is too large Load Diff

View File

@ -1170,11 +1170,11 @@ pub const Inst = struct {
/// Extract packed floating-point values
/// Extract packed integer values
extract,
/// Packed horizontal word minimum
hminposu,
/// Insert scalar single-precision floating-point value
/// Insert packed floating-point values
insert,
/// Packed horizontal word minimum
minposu,
/// Packed move with sign extend
movsxb,
movsxd,

View File

@ -1492,6 +1492,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_64_i8_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i8,
.len = 64,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.i8.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_1_u8_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u8,
@ -1597,6 +1612,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_2_i16_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i16,
.len = 2,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.i16.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_4_i16_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i16,
@ -1642,6 +1672,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_32_i16_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i16,
.len = 32,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.i16.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_4_u16_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u16,
@ -1687,6 +1732,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_32_u16_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u16,
.len = 32,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.u16.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_4_i32_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i32,
@ -1717,6 +1777,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_16_i32_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i32,
.len = 16,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.i32.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_4_u32_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u32,
@ -1747,6 +1822,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_16_u32_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u32,
.len = 16,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.u32.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_2_i64_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i64,
@ -1777,6 +1867,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_8_i64_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .i64,
.len = 8,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.i64.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_2_u64_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u64,
@ -1807,6 +1912,21 @@ pub const Pool = struct {
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_8_u64_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u64,
.len = 8,
});
if (!kind.isParameter()) return vector_ctype;
var fields = [_]Info.Field{
.{
.name = .{ .index = .array },
.ctype = vector_ctype,
.alignas = AlignAs.fromAbiAlignment(Type.u64.abiAlignment(zcu)),
},
};
return pool.fromFields(allocator, .@"struct", &fields, kind);
},
.vector_1_u128_type => {
const vector_ctype = try pool.getVector(allocator, .{
.elem_ctype = .u128,

View File

@ -7,8 +7,8 @@ test {
if (builtin.object_format == .macho) return error.SkipZigTest;
// COFF linker does not support the new backend.
if (builtin.object_format == .coff) return error.SkipZigTest;
_ = @import("x86_64/access.zig");
_ = @import("x86_64/binary.zig");
_ = @import("x86_64/cast.zig");
_ = @import("x86_64/mem.zig");
_ = @import("x86_64/unary.zig");
}

View File

@ -117,9 +117,9 @@ pub fn build(b: *std.Build) void {
const target = b.resolveTargetQuery(query);
const cpu = query.serializeCpuAlloc(b.allocator) catch @panic("OOM");
for ([_][]const u8{
"access.zig",
"binary.zig",
"cast.zig",
"mem.zig",
"unary.zig",
}) |path| {
const test_mod = b.createModule(.{

View File

@ -5094,6 +5094,14 @@ test reduceXor {
try test_reduce_xor.testIntVectors();
}
inline fn reduceMin(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child {
return @reduce(.Min, rhs);
}
test reduceMin {
const test_reduce_min = unary(reduceMin, .{});
try test_reduce_min.testIntVectors();
}
inline fn reduceAdd(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child {
return @reduce(.Add, rhs);
}

View File

@ -117,9 +117,9 @@ export fn testMutablePointer() void {
// tmp.zig:37:38: note: imported here
// neg_inf.zon:1:1: error: expected type '?u8'
// tmp.zig:57:28: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_509'
// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_517'
// tmp.zig:62:39: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_511'
// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_519'
// tmp.zig:67:44: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_514'
// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_522'
// tmp.zig:72:50: note: imported here

View File

@ -15,6 +15,6 @@ pub export fn entry() void {
// error
//
// :7:25: error: unable to resolve comptime value
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_483.C' must be comptime-known
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_491.C' must be comptime-known
// :4:16: note: struct requires comptime because of this field
// :4:16: note: types are not available at runtime

View File

@ -16,5 +16,5 @@ pub export fn entry2() void {
//
// :3:6: error: no field or member function named 'copy' in '[]const u8'
// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_487'
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_495'
// :12:6: note: struct declared here

View File

@ -6,6 +6,6 @@ export fn foo() void {
// error
//
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_476'
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_484'
// :3:16: note: struct declared here
// :1:11: note: struct declared here

View File

@ -44,9 +44,9 @@ comptime {
//
// :5:23: error: expected error union type, found 'comptime_int'
// :10:23: error: expected error union type, found '@TypeOf(.{})'
// :15:23: error: expected error union type, found 'tmp.test2__struct_513'
// :15:23: error: expected error union type, found 'tmp.test2__struct_521'
// :15:23: note: struct declared here
// :20:27: error: expected error union type, found 'tmp.test3__struct_515'
// :20:27: error: expected error union type, found 'tmp.test3__struct_523'
// :20:27: note: struct declared here
// :25:23: error: expected error union type, found 'struct { comptime *const [5:0]u8 = "hello" }'
// :31:13: error: expected error union type, found 'u32'