authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-03-02 23:10:29-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-03-02 20:14:10-08:00
log0c06a1885fad9a9bb85342632a0b7c8a3a0733e9
tree91b1ddcc7cbadd9c38f588ca46aba966fce44620
parent8ca299ddbe36b755b3579b81b877ef2e96e23056

disable failing behavior tests with llvm 12

- consolidate into single code block See #8130 See #8131

1 files changed, 24 insertions(+), 8 deletions(-)

test/stage1/behavior/vector.zig+24-8
......@@ -510,6 +510,28 @@ test "vector reduce operation" {
510510 const N = @typeInfo(@TypeOf(x)).Array.len;
511511 const TX = @typeInfo(@TypeOf(x)).Array.child;
512512
513 // LLVM ERROR: Cannot select: intrinsic %llvm.aarch64.neon.fminnmv
514 // https://github.com/ziglang/zig/issues/8130
515 // wasmtime: unknown import: `env::fminf` has not been defined
516 // https://github.com/ziglang/zig/issues/8131
517 switch (std.builtin.arch) {
518 .aarch64 => switch (TX) {
519 f16 => switch (op) {
520 .Min, .Max, => return,
521 else => {},
522 },
523 else => {},
524 },
525 .wasm32 => switch (@typeInfo(TX)) {
526 .Float => switch (op) {
527 .Min, .Max, => return,
528 else => {},
529 },
530 else => {},
531 },
532 else => {},
533 }
534
513535 var r = @reduce(op, @as(Vector(N, TX), x));
514536 switch (@typeInfo(TX)) {
515537 .Int, .Bool => expectEqual(expected, r),
......@@ -556,10 +578,7 @@ test "vector reduce operation" {
556578
557579 doTheTestReduce(.Min, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, -386));
558580 doTheTestReduce(.Min, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 9));
559 if (std.builtin.arch != .aarch64) {
560 // https://github.com/ziglang/zig/issues/8130
561 doTheTestReduce(.Min, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, -100.0));
562 }
581 doTheTestReduce(.Min, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, -100.0));
563582 doTheTestReduce(.Min, [4]f32{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f32, -100.0));
564583 doTheTestReduce(.Min, [4]f64{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f64, -100.0));
565584
......@@ -577,10 +596,7 @@ test "vector reduce operation" {
577596
578597 doTheTestReduce(.Max, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, 1234567));
579598 doTheTestReduce(.Max, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 99999));
580 if (std.builtin.arch != .aarch64) {
581 // https://github.com/ziglang/zig/issues/8130
582 doTheTestReduce(.Max, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, 10.0e9));
583 }
599 doTheTestReduce(.Max, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, 10.0e9));
584600 doTheTestReduce(.Max, [4]f32{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f32, 10.0e9));
585601 doTheTestReduce(.Max, [4]f64{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f64, 10.0e9));
586602