Skip to content

Commit 222ea69

Browse files
committed
std: disable aarch64 tests that regressed from LLVM 14
See #12012
1 parent 6164801 commit 222ea69

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

lib/std/math.zig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const builtin = @import("builtin");
12
const std = @import("std.zig");
23
const assert = std.debug.assert;
34
const mem = std.mem;
@@ -506,6 +507,12 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T {
506507
}
507508

508509
test "shl" {
510+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
511+
builtin.cpu.arch == .aarch64)
512+
{
513+
// https://github.com/ziglang/zig/issues/12012
514+
return error.SkipZigTest;
515+
}
509516
try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000);
510517
try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0);
511518
try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0);
@@ -546,6 +553,12 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T {
546553
}
547554

548555
test "shr" {
556+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
557+
builtin.cpu.arch == .aarch64)
558+
{
559+
// https://github.com/ziglang/zig/issues/12012
560+
return error.SkipZigTest;
561+
}
549562
try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111);
550563
try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0);
551564
try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0);
@@ -578,6 +591,12 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T {
578591
}
579592

580593
test "rotr" {
594+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
595+
builtin.cpu.arch == .aarch64)
596+
{
597+
// https://github.com/ziglang/zig/issues/12012
598+
return error.SkipZigTest;
599+
}
581600
try testing.expect(rotr(u8, 0b00000001, @as(usize, 0)) == 0b00000001);
582601
try testing.expect(rotr(u8, 0b00000001, @as(usize, 9)) == 0b10000000);
583602
try testing.expect(rotr(u8, 0b00000001, @as(usize, 8)) == 0b00000001);
@@ -606,6 +625,12 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T {
606625
}
607626

608627
test "rotl" {
628+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
629+
builtin.cpu.arch == .aarch64)
630+
{
631+
// https://github.com/ziglang/zig/issues/12012
632+
return error.SkipZigTest;
633+
}
609634
try testing.expect(rotl(u8, 0b00000001, @as(usize, 0)) == 0b00000001);
610635
try testing.expect(rotl(u8, 0b00000001, @as(usize, 9)) == 0b00000010);
611636
try testing.expect(rotl(u8, 0b00000001, @as(usize, 8)) == 0b00000001);
@@ -1622,6 +1647,12 @@ fn testSign() !void {
16221647
}
16231648

16241649
test "sign" {
1650+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
1651+
builtin.cpu.arch == .aarch64)
1652+
{
1653+
// https://github.com/ziglang/zig/issues/12012
1654+
return error.SkipZigTest;
1655+
}
16251656
try testSign();
16261657
comptime try testSign();
16271658
}

lib/std/simd.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ pub fn extract(
160160
}
161161

162162
test "vector patterns" {
163+
if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
164+
builtin.cpu.arch == .aarch64)
165+
{
166+
// https://github.com/ziglang/zig/issues/12012
167+
return error.SkipZigTest;
168+
}
163169
const base = @Vector(4, u32){ 10, 20, 30, 40 };
164170
const other_base = @Vector(4, u32){ 55, 66, 77, 88 };
165171

0 commit comments

Comments
 (0)