aboutsummaryrefslogtreecommitdiff
path: root/lib/std/simd.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-10-19 02:08:34 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-10-21 10:55:41 -0400
commit2e6e39a7004dae626ad3088cbf1e652f157e6db8 (patch)
tree5f166132424d3da5d6e372ce836f7dbdc2e75987 /lib/std/simd.zig
parentc880644d929ff8e403494ff7e6e347b4857db263 (diff)
downloadzig-2e6e39a7004dae626ad3088cbf1e652f157e6db8.tar.gz
zig-2e6e39a7004dae626ad3088cbf1e652f157e6db8.zip
x86_64: fix bugs and disable erroring tests
Diffstat (limited to 'lib/std/simd.zig')
-rw-r--r--lib/std/simd.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/simd.zig b/lib/std/simd.zig
index 93e8534f4a..7629dfac1a 100644
--- a/lib/std/simd.zig
+++ b/lib/std/simd.zig
@@ -196,10 +196,13 @@ pub fn extract(
}
test "vector patterns" {
+ if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
+
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}
+
const base = @Vector(4, u32){ 10, 20, 30, 40 };
const other_base = @Vector(4, u32){ 55, 66, 77, 88 };
@@ -269,6 +272,8 @@ pub fn reverseOrder(vec: anytype) @TypeOf(vec) {
}
test "vector shifting" {
+ if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
+
const base = @Vector(4, u32){ 10, 20, 30, 40 };
try std.testing.expectEqual([4]u32{ 30, 40, 999, 999 }, shiftElementsLeft(base, 2, 999));
@@ -333,6 +338,8 @@ pub fn countElementsWithValue(vec: anytype, value: std.meta.Child(@TypeOf(vec)))
}
test "vector searching" {
+ if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
+
const base = @Vector(8, u32){ 6, 4, 7, 4, 4, 2, 3, 7 };
try std.testing.expectEqual(@as(?u3, 1), firstIndexOfValue(base, 4));
@@ -424,6 +431,8 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a
}
test "vector prefix scan" {
+ if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
+
if (comptime builtin.cpu.arch.isMIPS()) {
return error.SkipZigTest;
}