| ... | @@ -135,6 +135,7 @@ test "cmp f16" { | ... | @@ -135,6 +135,7 @@ test "cmp f16" { |
| 135 | test "cmp f32" { | 135 | test "cmp f32" { |
| 136 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 136 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 137 | if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 137 | if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| | 138 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 138 | | 139 | |
| 139 | try testCmp(f32); | 140 | try testCmp(f32); |
| 140 | try comptime testCmp(f32); | 141 | try comptime testCmp(f32); |
| ... | @@ -143,7 +144,7 @@ test "cmp f32" { | ... | @@ -143,7 +144,7 @@ test "cmp f32" { |
| 143 | test "cmp f64" { | 144 | test "cmp f64" { |
| 144 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 145 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 145 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 146 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 146 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 147 | if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 |
| 147 | | 148 | |
| 148 | try testCmp(f64); | 149 | try testCmp(f64); |
| 149 | try comptime testCmp(f64); | 150 | try comptime testCmp(f64); |
| ... | @@ -236,7 +237,8 @@ test "vector cmp f16" { | ... | @@ -236,7 +237,8 @@ test "vector cmp f16" { |
| 236 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 237 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 237 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 238 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 238 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 239 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 239 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 240 | if (builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| | 241 | if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; |
| 240 | | 242 | |
| 241 | try testCmpVector(f16); | 243 | try testCmpVector(f16); |
| 242 | try comptime testCmpVector(f16); | 244 | try comptime testCmpVector(f16); |
| ... | @@ -247,7 +249,8 @@ test "vector cmp f32" { | ... | @@ -247,7 +249,8 @@ test "vector cmp f32" { |
| 247 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 249 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 248 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 250 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 249 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 251 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 250 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 252 | if (builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| | 253 | if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; |
| 251 | | 254 | |
| 252 | try testCmpVector(f32); | 255 | try testCmpVector(f32); |
| 253 | try comptime testCmpVector(f32); | 256 | try comptime testCmpVector(f32); |
| ... | @@ -258,7 +261,8 @@ test "vector cmp f64" { | ... | @@ -258,7 +261,8 @@ test "vector cmp f64" { |
| 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 261 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 259 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 262 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 260 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 263 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 261 | if (builtin.cpu.arch.isArm() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | 264 | if (builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| | 265 | if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; |
| 262 | | 266 | |
| 263 | try testCmpVector(f64); | 267 | try testCmpVector(f64); |
| 264 | try comptime testCmpVector(f64); | 268 | try comptime testCmpVector(f64); |
| ... | @@ -272,6 +276,8 @@ test "vector cmp f128" { | ... | @@ -272,6 +276,8 @@ test "vector cmp f128" { |
| 272 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 276 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 273 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 277 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 274 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 278 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| | 279 | if (builtin.cpu.arch.isArm()) return error.SkipZigTest; |
| | 280 | if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; |
| 275 | | 281 | |
| 276 | try testCmpVector(f128); | 282 | try testCmpVector(f128); |
| 277 | try comptime testCmpVector(f128); | 283 | try comptime testCmpVector(f128); |
| ... | @@ -286,7 +292,6 @@ test "vector cmp f80/c_longdouble" { | ... | @@ -286,7 +292,6 @@ test "vector cmp f80/c_longdouble" { |
| 286 | try comptime testCmpVector(c_longdouble); | 292 | try comptime testCmpVector(c_longdouble); |
| 287 | } | 293 | } |
| 288 | fn testCmpVector(comptime T: type) !void { | 294 | fn testCmpVector(comptime T: type) !void { |
| 289 | @setEvalBranchQuota(4_000); | | |
| 290 | var edges = [_]T{ | 295 | var edges = [_]T{ |
| 291 | -math.inf(T), | 296 | -math.inf(T), |
| 292 | -math.floatMax(T), | 297 | -math.floatMax(T), |