91 Commits

Author SHA1 Message Date
sayantn
3de76d47a2 Use the new definition of rdtscp intrinsic
- add `-Zverify-llvm-ir` in testsuite
2025-05-30 18:02:17 +00:00
sayantn
b1ad50f1e0 Add riscv32 CI run 2025-05-06 16:10:50 +00:00
James Barford-Evans
ef92b59242 fix - aarch64_be tests 2025-05-03 05:06:15 +00:00
sayantn
1f40595e88 Remove x86_64-unknown-linux-gnu run
+ Rename `x86_64-unknown-linux-gnu-emulated` run to `x86_64-unknown-linux-gnu`
2025-04-20 21:39:39 +00:00
sayantn
6c4b416875 Add -Ctarget-feature=+avx512f run for the emulated run
+ Remove `-Z plt=yes`
2025-04-20 21:39:39 +00:00
sayantn
867fe30ba0 Add test-everything annotations to more archs to ensure test coverage, and some small changes to make CI pass
- Disable `vsx` tests for `ppc` and `ppc64`
 - Disable `tme` tests for `aarch64` and `aarch64_be`
 - Disable `frecipe` tests for `loongarch64`
 - Add `altivec` run for PPC32 (with `-C target-feature=+vsx` `qemu` gives a nasty error)
2025-04-20 21:39:39 +00:00
sayantn
f2870b76fd Remove STDARCH_DISABLE_DEDUP_GUARD as it was unused 2025-04-20 21:39:39 +00:00
sayantn
b3a7ba4607 Change test skipping logic a little, separate feature-based and function-based skipping 2025-04-20 21:39:39 +00:00
sayantn
cc6855e1e9 Remove cupid dependency and env-override-no-avx CI run 2025-04-20 21:39:39 +00:00
sayantn
f6fbd665a0 Add PowerPC64 to CI 2025-04-20 21:39:39 +00:00
James Barford-Evans
1d166d499e tidy up proposed Dockerfile & run.sh 2025-02-24 11:04:20 +00:00
James Barford-Evans
5c10dc38ab update clang to clang-19 2025-02-24 11:04:20 +00:00
James Barford-Evans
95d5d61842 Update CI to facilitate big endian at some point 2025-02-24 11:04:20 +00:00
Folkert de Vries
055daf7b8c start using the newly added target features for testing 2025-02-23 23:21:35 +00:00
Folkert de Vries
96576234db implement VectorAdd for s390x 2025-01-20 14:48:56 +00:00
Folkert de Vries
48bbd53d19 basic infra for s390x vector intrinsics 2025-01-20 14:48:56 +00:00
sayantn
fcf05b8776 Re-enable the disabled PPC tests, Upgrade CPU 2024-12-21 10:12:32 +00:00
Ralf Jung
889a29248b move wasm comment to a better place 2024-11-10 21:49:11 +08:00
Ralf Jung
2d925a2908 remove test --skip that references a long-closed issue 2024-11-10 21:49:11 +08:00
David Wood
aaad388be1 ci: add debug testing
Previous changes in Rust and LLVM have caused stdarch to be broken in
debug, so add testing to ensure that this is caught.
2024-11-07 06:08:33 +08:00
Amanieu d'Antras
3ac4ba6670 Revert "Work around CI failures for the ARM target"
This reverts commit 5a748ec5fabcaee29351ac3c90eee4f3e16964e7.
2023-11-30 08:20:47 +00:00
Amanieu d'Antras
4fe088329c Work around CI failures for the ARM target
These seem to have been introduced by recent LLVM changes.

* The instruction limit for vld*/vst* has been raised. This is not a
significant issue, it is only used for testing.
* vld*/vst* instructions are generated with overly strict alignments:
https://github.com/rust-lang/stdarch/issues/1217
* vtbl/vtbx instrinsics are failing intrinsic-test for unknown reasons.
2023-11-30 07:48:09 +00:00
Jacob Bramley
3324de54c2 Don't pass target-features to host tests.
This avoids a flood of warnings when testing the
armv7-unknown-linux-gnueabihf target.

Under this target, we would pass -Ctarget-features=+neon when building
intrinsic-test, but it is compiled for the host (and this tool doesn't
need Neon even if the host _is_ Armv7).

This also sets --target when running the 'hex' example, since that
seems more appropriate than always building it for the host.
2023-11-01 14:33:48 +01:00
Eduardo Sánchez Muñoz
69ff2e3a37 Explicitly disable SSE3 for x86_64 2023-10-01 17:57:00 +01:00
Gijs Burghoorn
8a23f93e8b Fix: #1464 for rv64 zk 2023-09-22 10:08:56 +08:00
Gijs Burghoorn
f4ee8f0282 Fix: Testing for RISC-V Zb intrinsics 2023-09-01 18:32:40 +02:00
Gijs Burghoorn
d1229d008b Fix: Add proper flags for RISCV64 ci 2023-08-31 23:12:32 +02:00
Amanieu d'Antras
55ef711226 Disable vld2q_dup_f32 test in CI
This is broken due to rust-lang/rust#112460.
2023-06-20 18:20:19 +02:00
Adam Gemmell
0125fa17c8 Remove ACLE submodule
This involves moving from the ACLE intrinsic definitions (which aren't
available for SVE at this point) to a JSON file. This was derived from
ARM's documentation[^1], and then relicensed under `MIT OR Apache-2.0` for
use in this repository.

[^1]: https://developer.arm.com/architectures/instruction-sets/intrinsics
2023-05-15 17:34:11 +02:00
Luca Barbato
fa4e478dbe Skip vec_expte tests since they trip qemu 2023-04-24 19:02:22 -07:00
Amanieu d'Antras
39849dd6c6
Import the asm! macro from core::arch (#1265) 2021-12-09 23:50:37 +00:00
Amanieu d'Antras
937978eeef
Update the intrinsic checker tool (#1258) 2021-12-04 13:03:30 +00:00
Jamie Cunliffe
b04e740f24
Handle intrinsics with constraints in the test tool. (#1237) 2021-11-05 01:47:31 +00:00
Hans Kratz
26cce19427
Make dedup guard optional (#1215) 2021-09-20 17:19:05 +01:00
Jamie Cunliffe
bd0e352338
Intrinsic test tool to compare neon intrinsics with C (#1170) 2021-09-09 19:16:45 +01:00
Alex Crichton
8ed0d3cbd5 More wasm SIMD updates
* Sync with the latest LLVM which has a few new intrinsic names
* Move explicit tests back to `assert_instr` since `assert_instr` now
  supports specifying const-generic arguments inline.
* Enable tests where wasmtime implements the instruction as well as LLVM.
* Ensure there are tests for all functions that can be tested at this
  time (those that aren't unimplemented in wasmtime).

There's still a number of `assert_instr` tests that are commented out.
These are either because they're unimplemented in wasmtime at the moment
or LLVM doesn't have an implementation for the instruction yet.
2021-03-21 09:24:39 +00:00
Alex Crichton
e35da555f8
Update WebAssembly SIMD/Atomics (#1073) 2021-03-11 23:30:30 +00:00
kangshan1157
936e1add97
Implement avx512bf16 intrinsics (#998) 2021-02-10 23:29:27 +00:00
Makoto Kato
e020a85ff0
Run CI for i686-pc-windows-msvc (#934) 2020-10-25 01:32:27 +01:00
Alex Crichton
770964adac
Update and revamp wasm32 SIMD intrinsics (#874)
Lots of time and lots of things have happened since the simd128 support
was first added to this crate. Things are starting to settle down now so
this commit syncs the Rust intrinsic definitions with the current
specification (https://github.com/WebAssembly/simd). Unfortuantely not
everything can be enabled just yet but everything is in the pipeline for
getting enabled soon.

This commit also applies a major revamp to how intrinsics are tested.
The intention is that the setup should be much more lightweight and/or
easy to work with after this commit.

At a high-level, the changes here are:

* Testing with node.js and `#[wasm_bindgen]` has been removed. Instead
  intrinsics are tested with Wasmtime which has a nearly complete
  implementation of the SIMD spec (and soon fully complete!)

* Testing is switched to `wasm32-wasi` to make idiomatic Rust bits a bit
  easier to work with (e.g. `panic!)`

* Testing of this crate's simd128 feature for wasm is re-enabled. This
  will run on CI and both compile and execute intrinsics. This should
  bring wasm intrinsics to the same level of parity as x86 intrinsics,
  for example.

* New wasm intrinsics have been added:
  * `iNNxMM_loadAxA_{s,u}`
  * `vNNxMM_load_splat`
  * `v8x16_swizzle`
  * `v128_andnot`
  * `iNNxMM_abs`
  * `iNNxMM_narrow_*_{u,s}`
  * `iNNxMM_bitmask` - commented out until LLVM is updated to LLVM 11
  * `iNNxMM_widen_*_{u,s}` - commented out until
    bytecodealliance/wasmtime#1994 lands
  * `iNNxMM_{max,min}_{u,s}`
  * `iNNxMM_avgr_u`

* Some wasm intrinsics have been removed:
  * `i64x2_trunc_*`
  * `f64x2_convert_*`
  * `i8x16_mul`

* The `v8x16.shuffle` instruction is exposed. This is done through a
  `macro` (not `macro_rules!`, but `macro`). This is intended to be
  somewhat experimental and unstable until we decide otherwise. This
  instruction has 16 immediate-mode expressions and is as a result
  unsuited to the existing `constify_*` logic of this crate. I'm hoping
  that we can game out over time what a macro might look like and/or
  look for better solutions. For now, though, what's implemented is the
  first of its kind in this crate (an architecture-specific macro), so
  some extra scrutiny looking at it would be appreciated.

* Lots of `assert_instr` annotations have been fixed for wasm.

* All wasm simd128 tests are uncommented and passing now.

This is still missing tests for new intrinsics and it's also missing
tests for various corner cases. I hope to get to those later as the
upstream spec itself gets closer to stabilization.

In the meantime, however, I went ahead and updated the `hex.rs` example
with a wasm implementation using intrinsics. With it I got some very
impressive speedups using Wasmtime:

    test benches::large_default  ... bench:     213,961 ns/iter (+/- 5,108) = 4900 MB/s
    test benches::large_fallback ... bench:   3,108,434 ns/iter (+/- 75,730) = 337 MB/s
    test benches::small_default  ... bench:          52 ns/iter (+/- 0) = 2250 MB/s
    test benches::small_fallback ... bench:         358 ns/iter (+/- 0) = 326 MB/s

or otherwise using Wasmtime hex encoding using SIMD is 15x faster on 1MB
chunks or 7x faster on small <128byte chunks.

All of these intrinsics are still unstable and will continue to be so
presumably until the simd proposal in wasm itself progresses to a later
stage. Additionaly we'll still want to sync with clang on intrinsic
names (or decide not to) at some point in the future.

* wasm: Unconditionally expose SIMD functions

This commit unconditionally exposes SIMD functions from the `wasm32`
module. This is done in such a way that the standard library does not
need to be recompiled to access SIMD intrinsics and use them. This,
hopefully, is the long-term story for SIMD in WebAssembly in Rust.

It's unlikely that all WebAssembly runtimes will end up implementing
SIMD so the standard library is unlikely to use SIMD any time soon, but
we want to make sure it's easily available to folks! This commit enables
all this by ensuring that SIMD is available to the standard library,
regardless of compilation flags.

This'll come with the same caveats as x86 support, where it doesn't make
sense to call these functions unless you're enabling simd support one
way or another locally. Additionally, as with x86, if you don't call
these functions then the instructions won't show up in your binary.

While I was here I went ahead and expanded the WebAssembly-specific
documentation for the wasm32 module as well, ensuring that the current
state of SIMD/Atomics are documented.
2020-07-18 13:32:52 +01:00
gnzlbg
ec7697de1b Disable mips MSA builds - I dont think they can ever work except for the r6 targets 2019-07-14 15:29:19 +02:00
gnzlbg
dffdd66d81 Disable wasm32 simd128 tests 2019-07-14 15:29:19 +02:00
gnzlbg
1253c1daed Enable warnings globally 2019-07-09 01:37:07 +02:00
gnzlbg
686b813f5d Update repo name 2019-07-09 01:37:07 +02:00
gnzlbg
127f13f10f Fix assert_instr tests 2019-07-08 22:58:19 +02:00
Alex Crichton
7215eb4613 Hook tests up to node.js
We can even test some of the functions!
2019-04-25 17:19:51 +02:00
gnzlbg
7d9e92335b Only test on 64-bit ppc 2019-04-17 14:21:15 +02:00
gnzlbg
28e2f594b8 Run build jobs with target-features on mips and ppc 2019-04-17 14:21:15 +02:00
Radovan Birdic
fd4cf83d42 Added msa jobs for mips*-gnu* targets 2019-04-09 09:43:17 +02:00
gnzlbg
c91584d241 Make core_arch compatible with Rust2015 and Rust2018 2019-02-23 01:14:07 +01:00