x86_64: implement strict float @reduce(.Max)

This commit is contained in:
Jacob Young 2025-05-28 05:33:14 -04:00
parent f5a1aaf2fc
commit 9f9e7e398f
3 changed files with 2325 additions and 16 deletions

File diff suppressed because it is too large Load Diff

View File

@ -756,15 +756,15 @@ test "vector shift operators" {
test "vector reduce operation" {
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091
if (builtin.cpu.arch.isSPARC()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23719
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isSPARC()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23719
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
const S = struct {
fn testReduce(comptime op: std.builtin.ReduceOp, x: anytype, expected: anytype) !void {

View File

@ -5109,6 +5109,7 @@ inline fn reduceMax(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child
test reduceMax {
const test_reduce_max = unary(reduceMax, .{});
try test_reduce_max.testIntVectors();
try test_reduce_max.testFloatVectors();
}
inline fn reduceAdd(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child {