Skip to content

Commit

Permalink
Revert "aarch64: reenable tests that are no longer regressed"
Browse files Browse the repository at this point in the history
This reverts commit 3370d58.

This commit was done with an LLVM build that did not have assertions
enabled. There are LLVM assertions being triggered due to this commit.

Reopens #10627
Reopens #12013
Reopens #12027
  • Loading branch information
andrewrk committed Dec 28, 2022
1 parent 3f1cfcb commit 5ca1753
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/std/fmt/parse_float.zig
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ test "fmt.parseFloat" {
}

test "fmt.parseFloat nan and inf" {
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12027
return error.SkipZigTest;
}

inline for ([_]type{ f16, f32, f64, f128 }) |T| {
const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits);

Expand Down
16 changes: 16 additions & 0 deletions lib/std/math.zig
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T {
}

test "shl" {
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}
try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000);
try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0);
try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0);
Expand Down Expand Up @@ -570,6 +574,10 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T {
}

test "shr" {
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}
try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111);
try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0);
try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0);
Expand Down Expand Up @@ -611,6 +619,10 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T {
}

test "rotr" {
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}
try testing.expect(rotr(u0, 0b0, @as(usize, 3)) == 0b0);
try testing.expect(rotr(u5, 0b00001, @as(usize, 0)) == 0b00001);
try testing.expect(rotr(u6, 0b000001, @as(usize, 7)) == 0b100000);
Expand Down Expand Up @@ -651,6 +663,10 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T {
}

test "rotl" {
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}
try testing.expect(rotl(u0, 0b0, @as(usize, 3)) == 0b0);
try testing.expect(rotl(u5, 0b00001, @as(usize, 0)) == 0b00001);
try testing.expect(rotl(u6, 0b000001, @as(usize, 7)) == 0b000010);
Expand Down
4 changes: 4 additions & 0 deletions lib/std/simd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ pub fn extract(
}

test "vector patterns" {
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 };

Expand Down
11 changes: 11 additions & 0 deletions test/behavior/atomics.zig
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ test "cmpxchg on a global variable" {
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO

if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// https://github.com/ziglang/zig/issues/10627
return error.SkipZigTest;
}

_ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .Acquire, .Monotonic);
try expect(a_global_variable == 42);
}
Expand Down Expand Up @@ -213,6 +218,12 @@ test "atomicrmw with floats" {
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO

if ((builtin.zig_backend == .stage2_llvm or builtin.zig_backend == .stage2_c) and
builtin.cpu.arch == .aarch64)
{
// https://github.com/ziglang/zig/issues/10627
return error.SkipZigTest;
}
try testAtomicRmwFloat();
comptime try testAtomicRmwFloat();
}
Expand Down
6 changes: 6 additions & 0 deletions test/behavior/math.zig
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ test "@ctz vectors" {
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO

if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// This regressed with LLVM 14:
// https://github.com/ziglang/zig/issues/12013
return error.SkipZigTest;
}

try testCtzVectors();
comptime try testCtzVectors();
}
Expand Down
6 changes: 6 additions & 0 deletions test/behavior/vector.zig
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ test "tuple to vector" {
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO

if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) {
// Regressed with LLVM 14:
// https://github.com/ziglang/zig/issues/12012
return error.SkipZigTest;
}

const S = struct {
fn doTheTest() !void {
const Vec3 = @Vector(3, i32);
Expand Down

0 comments on commit 5ca1753

Please sign in to comment.