aboutsummaryrefslogtreecommitdiff
path: root/lib/std/simd.zig
AgeCommit message (Collapse)Author
2025-10-16std: disable a few failing tests on hexagonAlex Rønne Petersen
2025-09-19std.simd: suggest more sensible vector sizes across the boardAlex Rønne Petersen
2025-09-04Reenable vector tests for armeb/thumbebLuna Schwalbe
https://github.com/ziglang/zig/issues/22060 has been fixed by upstream.
2025-06-30std.simd: Increase branch quota in suggestVectorLengthForCpu()Alex Rønne Petersen
This does a bunch of CPU family and feature checks. It would be annoying to have to @setEvalBranchQuota() at every comptime use site.
2025-06-05std.Target: Introduce Cpu convenience functions for feature tests.Alex Rønne Petersen
Before: * std.Target.arm.featureSetHas(target.cpu.features, .has_v7) * std.Target.x86.featureSetHasAny(target.cpu.features, .{ .sse, .avx, .cmov }) * std.Target.wasm.featureSetHasAll(target.cpu.features, .{ .atomics, .bulk_memory }) After: * target.cpu.has(.arm, .has_v7) * target.cpu.hasAny(.x86, &.{ .sse, .avx, .cmov }) * target.cpu.hasAll(.wasm, &.{ .atomics, .bulk_memory })
2025-06-01Legalize: implement scalarization of overflow intrinsicsJacob Young
2025-06-01Legalize: implement scalarization of `@shuffle`Jacob Young
2025-06-01Legalize: implement scalarization of `@select`Jacob Young
2025-05-28x86_64: implement integer `@reduce(.Max)`Jacob Young
2025-04-11std: Disable some vector-related tests for hexagon.Alex Rønne Petersen
See: * https://github.com/llvm/llvm-project/issues/118879 * https://github.com/llvm/llvm-project/issues/134659
2025-01-16x86_64: implement switch jump tablesJacob Young
2025-01-06std: Disable some tests affected by #22060 for thumbeb too.Alex Rønne Petersen
2024-12-13std: Disable some vector-related tests on armeb.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/22060
2024-11-04std.simd: Disable `vector prefix scan` test on aarch64_be.Alex Rønne Petersen
See: https://github.com/ziglang/zig/issues/21893
2024-11-03std.Target: Replace isARM() with isArmOrThumb() and rename it to isArm().Alex Rønne Petersen
The old isARM() function was a portability trap. With the name it had, it seemed like the obviously correct function to use, but it didn't include Thumb. In the vast majority of cases where someone wants to ask "is the target Arm?", Thumb *should* be included. There are exactly 3 cases in the codebase where we do actually need to exclude Thumb, although one of those is in Aro and mirrors a check in Clang that is itself likely a bug. These rare cases can just add an extra isThumb() check.
2024-10-16std.Target: Change Cpu.baseline() to also be able to take OS into consideration.Alex Rønne Petersen
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-08-01std.simd: Fix an isARM() check to use isArmOrThumb() instead.Alex Rønne Petersen
Thumb can have NEON instructions too.
2024-08-01std.Target: Rework isPPC()/isPPC64() functions.Alex Rønne Petersen
* Rename isPPC() -> isPowerPC32(). * Rename isPPC64() -> isPowerPC64(). * Add new isPowerPC() function which covers both. There was confusion even in the standard library about what isPPC() meant. This change makes these functions work how I think most people actually expect them to work, and makes them consistent with isMIPS(), isSPARC(), etc. I chose to rename from PPC to PowerPC because 1) it's more consistent with the other functions, and 2) it'll cause loud rather than silent breakage for anyone who might have been depending on isPPC() while misunderstanding it.
2024-07-25aarch64: reenable tests that are no longer regressedJulian Vesper
Closes #12012
2024-07-14simd: correct suggestVectorLengthDavid Rubin
* the file's doc-comment was misleading and did not focus on the correct aspect of SIMD * added cpu flag awareness to `suggestVectorLengthForCpu` in order to provide a more accurate vector length
2024-05-03Delete compile errors for deprecated declsRyan Liptak
2024-03-10improve documentation in stdAndrew Kelley
A lot of these "shorthand" doc comments were redundant, low quality filler content. Better to let the actual modules speak for themselves with top level doc comments rather than trying to document their aliases.
2024-01-01Deprecate `suggestVectorSize` in favor of `suggestVectorLength`Carl Åstholm
The function returns the vector length, not the byte size of the vector or the bit size of individual elements. This distinction is very important and some usages of this function in the stdlib operated under these incorrect assumptions.
2023-10-27x86_64: fix `cond_br`Jacob Young
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: fix bugs and disable erroring testsJacob Young
2023-10-13std.simd: return comptime_int from `suggestVectorSize`Veikka Tuominen
2023-09-27std: Reactivate skipped tests w.r.t. llvm/llvm-project#55522Jay Petacat
2023-07-12Remove len parameter from splat in standard libantlilja
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-13std.simd.suggestVectorSizeForCpu: fix missing argument in bodyxdBronch
2023-04-30std: fix a bunch of typosLinus Groh
The majority of these are in comments, some in doc comments which might affect the generated documentation, and a few in parameter names - nothing that should be breaking, however.
2023-03-20add wasm-simd support for suggestVectorSizeForCpu (#14992)KOUNOIKE Yuusuke
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-01-04std.simd.iota: make it always called at comptimeAndrew Kelley
There's no reason for this to ever run at runtime; it should always be used to generate a constant.
2022-12-27Revert "aarch64: reenable tests that are no longer regressed"Andrew Kelley
This reverts commit 3370d58956ecc744a004dff47b0437473f0ef7da. 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
2022-12-10aarch64: reenable tests that are no longer regressedr00ster91
Closes #12013 Closes #10627 Closes #12027
2022-12-06remove most conditional compilation based on stage1Andrew Kelley
There are still a few occurrences of "stage1" in the standard library and self-hosted compiler source, however, these instances need a bit more careful inspection to ensure no breakage.
2022-10-18all: rename `@maximum` to `@max` and `@minimum` to `@min`Ali Chraghi
2022-09-07std.simd: change T to u16Dan Ellis Echavarria
The `element_bit_size` would break if `T` was signed due to `ceilPowerOfTwo` only working on unsigned numbers.
2022-07-22SIMD size suggestions: suggestions code now compiles, added moreDan Ellis Echavarria
architectures The idea behind this is using the register capabilities in safe amounts, there is still some consideration to be done. + Fixed compile error using std.Target.<arch>.featureSetHas + X86 MMX and "3DNOW" 64 bits register usage considered for vector size + Added ARM Neon recommened usage of 128 bits (The size of the register) + Added AARCH64 Neon and SVE for 128 bits. SVE could use in theory up to 2048 bits, but found only evidence of functional 512 bits on a super computer, decided on using 128 bits as a safety + Added Altivec recommendation of using the 128 bits long register + Using MIPS msa 2x64bits capabilities, usage of 64 bits registers for MDMX systems, need testing on how using bigger values affect performance + Using V extension on RISC-V, which is extendable via instructions, decided on 128 bits as a value to not use all registers + in SPARC the 64 bits registers are used, a max of 32 registers are to be used for configurable simd instructions, decided on using the size of the register, need testing on performance hit on using a bigger sized register vector size
2022-07-06std: disable aarch64 tests that regressed from LLVM 14Andrew Kelley
See #12012
2022-07-03std: disable tests regressed from LLVM 14Andrew Kelley
2022-06-30stage2: implement alignment calculation of vectorsAndrew Kelley
closes #11856
2022-06-07std: adjust for stage2 semanticsVeikka Tuominen
2022-04-05zig fmt: remove trailing whitespace on doc commentsDamien Firmenich
Fixes #11353 The renderer treats comments and doc comments differently since doc comments are parsed into the Ast. This commit adds a check after getting the text for the doc comment and trims whitespace at the end before rendering. The `a = 0,` in the test is here to avoid a ParseError while parsing the test.