aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2025-01-23 05:31:46 -0500
committerJacob Young <jacobly0@users.noreply.github.com>2025-01-24 20:56:11 -0500
commitb1fa89439ae56001779061c42a08cf9db7906432 (patch)
tree6fb1bc031d9ae39b9f12d70bc5e8994c1da497c4 /src/InternPool.zig
parentae3d95fc8dc10c0902dee0605421cec2dbd316b0 (diff)
downloadzig-b1fa89439ae56001779061c42a08cf9db7906432.tar.gz
zig-b1fa89439ae56001779061c42a08cf9db7906432.zip
x86_64: rewrite float vector `@abs` and equality comparisons
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index a92e93705c..04783e2a9c 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -4559,12 +4559,21 @@ pub const Index = enum(u32) {
null_type,
undefined_type,
enum_literal_type,
+
manyptr_u8_type,
manyptr_const_u8_type,
manyptr_const_u8_sentinel_0_type,
single_const_pointer_to_comptime_int_type,
slice_const_u8_type,
slice_const_u8_sentinel_0_type,
+
+ vector_4_f16_type,
+ vector_8_f16_type,
+ vector_4_f32_type,
+ vector_8_f32_type,
+ vector_2_f64_type,
+ vector_4_f64_type,
+
optional_noreturn_type,
anyerror_void_error_union_type,
/// Used for the inferred error set of inline/comptime function calls.
@@ -5055,6 +5064,19 @@ pub const static_keys = [_]Key{
},
} },
+ // @Vector(4, f16)
+ .{ .vector_type = .{ .len = 4, .child = .f16_type } },
+ // @Vector(8, f16)
+ .{ .vector_type = .{ .len = 8, .child = .f16_type } },
+ // @Vector(4, f32)
+ .{ .vector_type = .{ .len = 4, .child = .f32_type } },
+ // @Vector(8, f32)
+ .{ .vector_type = .{ .len = 8, .child = .f32_type } },
+ // @Vector(2, f64)
+ .{ .vector_type = .{ .len = 2, .child = .f64_type } },
+ // @Vector(4, f64)
+ .{ .vector_type = .{ .len = 4, .child = .f64_type } },
+
// ?noreturn
.{ .opt_type = .noreturn_type },
@@ -11681,6 +11703,12 @@ pub fn typeOf(ip: *const InternPool, index: Index) Index {
.single_const_pointer_to_comptime_int_type,
.slice_const_u8_type,
.slice_const_u8_sentinel_0_type,
+ .vector_4_f16_type,
+ .vector_8_f16_type,
+ .vector_4_f32_type,
+ .vector_8_f32_type,
+ .vector_2_f64_type,
+ .vector_4_f64_type,
.optional_noreturn_type,
.anyerror_void_error_union_type,
.adhoc_inferred_error_set_type,
@@ -11998,6 +12026,14 @@ pub fn zigTypeTag(ip: *const InternPool, index: Index) std.builtin.TypeId {
.slice_const_u8_sentinel_0_type,
=> .pointer,
+ .vector_4_f16_type,
+ .vector_8_f16_type,
+ .vector_4_f32_type,
+ .vector_8_f32_type,
+ .vector_2_f64_type,
+ .vector_4_f64_type,
+ => .vector,
+
.optional_noreturn_type => .optional,
.anyerror_void_error_union_type => .error_union,
.empty_tuple_type => .@"struct",