about summary refs log tree commit diff
path: root/tests/codegen/simd
AgeCommit message (Collapse)AuthorLines
2025-07-22Rename `tests/codegen` into `tests/codegen-llvm`Guillaume Gomez-463/+0
2025-07-20Ban projecting into SIMD types [MCP838]Scott McMurray-31/+0
2025-07-20So many test updates x_xScott McMurray-22/+12
2025-07-07Let `rvalue_creates_operand` return true for *all* `Rvalue::Aggregate`sScott McMurray-0/+106
Inspired by <https://github.com/rust-lang/rust/pull/138759#discussion_r2156375342> where I noticed that we were nearly at this point, plus the comments I was writing in 143410 that reminded me a type-dependent `true` is fine. This PR splits the `OperandRef::builder` logic out to a separate type, with the updates needed to handle SIMD as well. In doing so, that makes the existing `Aggregate` path in `codegen_rvalue_operand` capable of handing SIMD values just fine. As a result, we no longer need to do layout calculations for aggregate result types when running the analysis to determine which things can be SSA in codegen.
2025-06-04x86 (32/64): go back to passing SIMD vectors by-ptrRalf Jung-7/+9
2025-05-03Fix test simd/extract-insert-dyn on s390xEduard Stefes-1/+15
Fix the test for s390x by enabling s390x vector extension via `target_feature(enable = "vector")`(#127506). As this is is still gated by `#![feature(s390x_target_feature)]` we need that attribute also.
2025-04-29enable msa feature for mips in codegen testsAdrian Friedli-1/+9
2025-04-23wasm, arm, x86-without-SSE need simd to be explicitly enabledRalf Jung-1/+25
2025-04-11Auto merge of #139578 - ferrocene:pa-compiletest-edition, r=jieyouxubors-1/+2
Fix breakage when running compiletest with `--test-args=--edition=2015` Compiletest has an `--edition` flag to change the default edition tests are run with. Unfortunately no test suite successfully executes when that flag is passed. If the edition is set to something greater than 2015 the breakage is expected, since the test suite currently supports only edition 2015 (Ferrous Systems will open an MCP about fixing that soonish). Surprisingly, the test suite is also broken if `--edition=2015` is passed to compiletest. This PR focuses on fixing the latter. This PR fixes the two categories of failures happening when `--edition=2015` is passed: * Some edition-specific tests set their edition through `//@ compile-flags` instead of `//@ edition`. Compiletest doesn't parse the compile flags, so it would see no `//@ edition` and add another `--edition` flag, leading to a rustc error. * Compiletest would add the edition after `//@ compile-flags`, while some tests depend on flags passed to `//@ compile-flags` being the last flags in the rustc invocation. Note that for the first category, I opted to manually go and replace all `//@ compile-flags` setting an edition with an explicit `//@ edition`. We could've changed compiletest to instead check whether an edition was set in `//@ compile-flags`, but I thought it was better to enforce a consistent way to set the edition in tests. I also added the edition to the stamp, so that changing `--edition` results in tests being re-executed. r? `@jieyouxu`
2025-04-11Rollup merge of #137447 - folkertdev:simd-extract-insert-dyn, r=scottmcmStuart Cook-0/+75
add `core::intrinsics::simd::{simd_extract_dyn, simd_insert_dyn}` fixes https://github.com/rust-lang/rust/issues/137372 adds `core::intrinsics::simd::{simd_extract_dyn, simd_insert_dyn}`, which contrary to their non-dyn counterparts allow a non-const index. Many platforms (but notably not x86_64 or aarch64) have dedicated instructions for this operation, which stdarch can emit with this change. Future work is to also make the `Index` operation on the `Simd` type emit this operation, but the intrinsic can't be used directly. We'll need some MIR shenanigans for that. r? `@ghost`
2025-04-10add `simd_insert_dyn` and `simd_extract_dyn`Folkert de Vries-0/+75
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-1/+2
2025-04-09Ensure `swap_nonoverlapping` is really always untypedScott McMurray-4/+4
2025-02-27use the right feature in codegen testsFolkert de Vries-1/+1
2025-02-27remove most `simd_` intrinsic declaration in testsFolkert de Vries-3/+1
instead, we can just import the intrinsics from core
2025-02-19Rework `OperandRef::extract_field` to stop calling `to_immediate_scalar` on ↵Scott McMurray-0/+31
things which are already immediates That means it stops trying to truncate things that are already `i1`s.
2025-02-18x86-sse2 ABI: use SSE registers for floats and SIMDRalf Jung-13/+12
2025-02-11tests/codegen: use -Copt-level=3 instead of -OJubilee Young-1/+1
2024-09-09Ban non-array SIMDScott McMurray-1/+1
2024-08-04Chore: add `x86_amx_intrinsics` feature flag to `core/lib.rs` and remove ↵sayantn-21/+0
`issue-120720-reduce-nan.rs`
2024-06-08simd packed types: update outdated check, extend codegen testRalf Jung-4/+19
2024-06-02Test codegen for repr(packed,simd) -> repr(simd)Jubilee Young-0/+44
2024-06-02Rollup merge of #125311 - calebzulawski:repr-packed-simd-intrinsics, ↵Jubilee-0/+44
r=workingjubilee Make repr(packed) vectors work with SIMD intrinsics In #117116 I fixed `#[repr(packed, simd)]` by doing the expected thing and removing padding from the layout. This should be the last step in providing a solution to rust-lang/portable-simd#319
2024-06-02Test codegen for repr(packed,simd)Jubilee Young-0/+44
2024-05-31Run rustfmt on `tests/codegen/`.Nicholas Nethercote-12/+11
Except for `simd-intrinsic/`, which has a lot of files containing multiple types like `u8x64` which really are better when hand-formatted. There is a surprising amount of two-space indenting in this directory. Non-trivial changes: - `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the test. - `rustfmt::skip` used in a few places where hand-formatting read more nicely: `enum/enum-match.rs` - Line number adjustments needed for the expected output of `debug-column.rs` and `coroutine-debug.rs`.
2024-05-11fix few typo in filecheck annotationsklensy-1/+1
2024-03-28Restore the test checks for `wider_reduce_into_iter`DianQK-3/+3
The current minimum support is for LLVM 17.
2024-03-05use [N x i8] for byval/sret typesErik Desjardins-2/+2
This avoids depending on LLVM's struct types to determine the size of the byval/sret slot.
2024-02-25fix use of platform_intrinsics in testsRalf Jung-2/+2
2024-02-23Ignore less tests in debug buildsBen Kimock-2/+0
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-13/+13
2024-02-21remove simd_reduce_{min,max}_nanlessRalf Jung-1/+1
2024-02-20Add "algebraic" versions of the fast-math intrinsicsBen Kimock-0/+22
2023-11-26Update std::simd usage and test outputsCaleb Zulawski-1/+1
2023-11-09Emit #[inline] on derive(Debug)Ben Kimock-2/+7
2023-10-06Add a wishlist FIXMEscottmcm-0/+2
2023-09-24Only check for successful vectorization on wider_reduce_into_iterDianQK-3/+1
Different vectorization results are due to different LLVM versions.
2023-09-21Increasing the SIMD size improves the vectorization possibilitiesDianQK-13/+13
Change the simd-wide-sum.rs to pass the LLVM main branching test.
2023-07-29tests/codegen/*simd*.rs -> simd/*simd*Jubilee Young-0/+140