Commit graph

43 commits

Author SHA1 Message Date
Alex Rønne Petersen
d4d6b23d64 test: Disable @min/max for floats on mips64.
https://github.com/ziglang/zig/issues/21090
2024-08-18 07:27:23 +02:00
David Rubin
ffb63a05a3 riscv: finally fix bug + airAggregateInit
i just hadn't realized that I placed the `riscv_start` branch in the non-simplified
starts
2024-05-11 02:17:24 -07:00
David Rubin
d9e0cafe64 riscv: add stage2_riscv to test matrix and bypass failing tests 2024-05-11 02:17:24 -07:00
Robin Voetter
9641d2ebdb
spirv: vectorize max, min 2024-02-04 19:09:31 +01:00
mlugg
9c16b2370d
test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
Jacob Young
48526c0eb6 test: enable c-abi-tests for the x86_64 backend
Add testing for `x86_64_v2` and `x86_64_v3` with the x86_64 backend.
2023-10-26 21:45:58 -04:00
Robin Voetter
faad97edff
spirv: update failing / passing tests
Some tests are now failing due to debug info changes, some tests
now pass due to improved compiler functionality.
2023-10-15 20:08:18 +02:00
Robin Voetter
9c20449cc5
wasm: lower min/max for floats to compiler_rt
The min and max builtins in Zig have some intricate behavior
related to floats, that is not replicated with the min and max
wasm instructions or using simple select operations. By lowering
these instructions to compiler_rt, handling around NaNs is done
correctly.

See also https://github.com/WebAssembly/design/issues/214
2023-10-15 14:00:32 +02:00
Robin Voetter
4f279078c8
spirv: air min/max 2023-10-15 14:00:07 +02:00
Jacob Young
9fc9235ac8 x86_64: fix undersized vector binary operations 2023-10-08 04:41:55 -04:00
Jacob Young
08c24935b1 behavior: reenable passing x86_64 tests 2023-10-04 14:42:35 -04:00
Jacob Young
1eb023908d x86_64: implement float round builtins 2023-10-01 15:09:52 -04:00
Robin Voetter
075584a4d7 spirv: enable passing tests 2023-09-23 12:36:56 -07:00
Techatrix
ab970094ab wasm: enable successful behavior tests 2023-09-10 15:59:02 +02:00
Lewis Gaul
387b0ac4f1
Make NaNs quiet by default and other NaN tidy-up (#16826)
* Generalise NaN handling and make std.math.nan() give quiet NaNs

* Address uses of std.math.qnan_* and std.math.nan_* consts

* Comment out failing test due to issues with signalling NaN

* Fix issue in c_builtins.zig where we need qnan_u32
2023-08-18 02:07:49 -04:00
Jacob Young
228c956377 std: finish cleanup up asm
This also required implementing the necessary syntax in the x86_64 backend.
2023-07-31 03:49:21 -04:00
Jacob Young
9831f27238 cbe: get behavior tests running on arm
Specifically without linking libc.
2023-07-31 01:58:10 -04:00
Robin Voetter
073289d0da
spirv: disable new behavior tests that do not pass
Some new behavior tests have recently been added, and not all of these
pass with the SPIR-V backend.
2023-07-01 19:45:09 +02:00
Jacob Young
9343c31c38 Sema: fix @min/@max type resolution with all runtime args
Closes #16229
2023-06-26 18:46:25 -07:00
mlugg
c4cc796695 Sema: consider type bounds when refining result type of @min/@max
I achieved this through a major refactor of the logic of analyzeMinMax.
This change should be compatible with vectors of comptime_int, which
Andrew said are supposed to work (but which currently do not).
2023-06-16 13:33:31 -07:00
Eric Joldasov
d884d7050e
all: replace comptime try with try comptime
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-13 23:46:58 +06:00
Jacob Young
0c438ab616 x86_64: hotfix for crash during in-memory coercion of large type
Unblocks #15768
Closes #15904
2023-05-29 22:03:27 -04:00
mlugg
e2837fd224 Sema: return comptime_int if all args to @min/@max are comptime_int
Resolves: #15776
2023-05-29 11:32:13 -07:00
Robin Voetter
37aa343079
spirv: more passing tests 2023-05-20 17:30:22 +02:00
Jacob Young
403c2d91be x86_64: fix float min/max behavior 2023-05-18 20:42:38 -04:00
Andrew Kelley
958fba0eb7
Merge pull request #15713 from alichraghi/ali-spirv
spirv: get more behavior tests passing
2023-05-16 16:09:22 -07:00
Jacob Young
2cbd442a9d x86_64: implement integer vector movement 2023-05-15 03:07:51 -04:00
Ali Chraghi
9c550721e4 spirv: lower float_to_int and int_to_float 2023-05-15 03:04:17 +03:30
Ali Chraghi
ccc490ef68
setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
Jacob Young
c5b96c7447 llvm: fix @max/@min of unsupported float types
Closes #15611
2023-05-10 15:16:50 -04:00
Jacob Young
36a39267b8 x86_64: fix feature confusion 2023-05-03 04:25:14 -04:00
mlugg
152c7b1885 Implement multi-argument @min/@max and notice bounds
Resolves: #14039
2023-05-02 16:46:27 -07:00
Jacob Young
6de457211f behavior: update affected tests for the x86_64 backend 2023-05-01 19:22:52 -04:00
Jacob Young
30e1daa746 x86_64: implement basic float ops 2023-03-21 08:49:54 +01:00
Jacob Young
c478c7609e CBE: implement vector operations
Also, bigint add and sub which is all I was actually trying to do.
2023-03-05 02:59:02 -05:00
Koakuma
f9e9ba784f stage2: sparc64: Skip unimplemented tests 2022-12-10 21:51:46 +07:00
Veikka Tuominen
dff32a2cd7 Sema: resolve lazy values in analyzeMinMax
Closes #13797
2022-12-07 14:48:24 +02:00
Jacob Young
6a4266d62a cbe: fix infinite recursion on recursive types 2022-10-25 05:11:28 -04:00
Ali Chraghi
ca27055cda all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
Luuk de Gram
a0a587ff85 wasm: Enable passing behavior tests
This shuffles some tests do ensure the new instructions are tested for the wasm backend,
by moving vectors into their own tests as well as move the f16 test cases as those require
special operating also.
2022-04-02 21:54:01 +02:00
Andrew Kelley
ad5770eba4 organize behavior tests
* Identify the ones that are passing and stop skipping them.
 * Flatten out the main behavior.zig file and have each individual test
   disable itself if it is not passing.
2022-03-18 15:02:52 -07:00
Andrew Kelley
55eea3b045 stage2: implement @minimum and @maximum, including vectors
* std.os: take advantage of `@minimum`. It's probably time to
   deprecate `std.min` and `std.max`.
 * New AIR instructions: min and max
 * Introduce SIMD vector support to stage2
 * Add `@Type` support for vectors
 * Sema: add `checkSimdBinOp` which can be re-used for other arithmatic
   operators that want to support vectors.
 * Implement coercion from vectors to arrays.
   - In backends this is handled with bitcast for vector to array,
     however maybe we want to reduce the amount of branching by
     introducing an explicit AIR instruction for it in the future.
 * LLVM backend: implement lowering vector types
 * Sema: Implement `slice.ptr` at comptime
 * Value: improve `numberMin` and `numberMax` to support floats in
   addition to integers, and make them behave properly in the presence
   of NaN.
2021-10-14 21:17:30 -07:00
Robin Voetter
cdeea3b094 minimum/maximum builtins 2021-07-26 20:41:00 -04:00