about summary refs log tree commit diff
path: root/src/test/ui/simd
AgeCommit message (Collapse)AuthorLines
2021-10-10Auto merge of #89541 - workingjubilee:abbrev-shufvec-t, r=Mark-Simulacrumbors-189/+1208
Cleanup src/test/ui/{simd,simd-intrinsic} Initial motivation was to simplify a huge macro expansion using a tuple, since we can just use an array in `#[repr(simd)]` now for the same result. But also, several tests were going unnoticed during development of SIMD intrinsics because people kept looking in the wrong directory, and many are basically run-pass vs. build-fail versions of the same tests, so let's keep them close together and simplify their names, so they're easier to sift through.
2021-10-04Re-bless src/test/ui/simdJubilee Young-84/+84
2021-10-04Rearrange test/ui/{simd,simd-intrinsic}Jubilee Young-0/+1149
Mostly test/ui/simd-intrinsic -> test/ui/simd/intrinsic Intrinsics-per-se tests moved into that folder Repetitive names were cut short. Duplicate names given -pass annotations.
2021-10-04Use arrays over tuples in SIMD testsJubilee Young-182/+52
Simd([u8; 64]) is now valid for repr(simd), so simplify tests with huge tuples instead. This also found some completely untested code, so let's just ditch that.
2021-09-27Update issue-89193.rsGeorge O'Hara-4/+2
2021-09-27Issue 89193George O'Hara-0/+53
2021-09-16Fix shuffle index constant not being monomorphized.Caleb Zulawski-0/+40
2021-09-11Allow simd_shuffle to accept vectors of any lengthCaleb Zulawski-1/+41
2021-08-30`feature(const_generics)` -> `feature(const_param_types)`lcnr-4/+4
2021-08-03Allow generic SIMD array element typeCaleb Zulawski-15/+61
2021-06-10std: Stabilize wasm simd intrinsicsAlex Crichton-2/+0
This commit performs two changes to stabilize Rust support for WebAssembly simd intrinsics: * The stdarch submodule is updated to pull in rust-lang/stdarch#1179. * The `wasm_target_feature` feature gate requirement for the `simd128` feature has been removed, stabilizing the name `simd128`. This should conclude the FCP started on #74372 and... Closes #74372
2021-06-05Auto merge of #85919 - workingjubilee:simd-ptrs-are-valid, r=petrochenkovbors-0/+122
Allow raw pointers in SIMD types Closes #85915 by loosening the strictness in typechecking and adding a test to guarantee it passes. This still might be too strict, as references currently do pass monomorphization, but my understanding is that they are not guaranteed to be "scalar" in the same way.
2021-06-03wasm: Make simd types passed via indirection againAlex Crichton-0/+33
This commit updates wasm target specs to use `simd_types_indirect: true` again. Long ago this was added since wasm simd types were always translated to `v128` under-the-hood in LLVM, meaning that it didn't matter whether that target feature was enabled or not. Now, however, `v128` is conditionally used in codegen depending on target features enabled, meaning that it's possible to get linker errors about different signatures in code that correctly uses simd types. The fix is the same as for all other platforms, which is to pass the type indirectly.
2021-06-02test for more SIMD monomorphization errorsJacob Lifshay-0/+55
build-fail test for simd type with an element type that's a wide pointer test for SIMD element type of optional nonnull ptr to extern type test that wide ptr simd element type of *mut [u8] fails
2021-06-01Allow raw pointers in SIMD typesJubilee Young-0/+67
2021-05-27Test THIR unsafeck for unsafe ops in closuresLeSeulArtichaut-0/+2
2021-05-13Auto merge of #85110 - RalfJung:no-rustc_args_required_const, r=oli-obkbors-9/+11
Remove rustc_args_required_const attribute Now that stdarch no longer needs it (thanks `@Amanieu!),` we can kill the `rustc_args_required_const` attribute. This means that lifetime extension of references to temporaries is the only remaining job that promotion is performing. :-) r? `@oli-obk` Fixes https://github.com/rust-lang/rust/issues/69493
2021-05-13fix test suiteRalf Jung-9/+11
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-6/+6
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-04-14Add more SIMD math.h intrinsicsJubilee Young-8/+19
LLVM supports many functions from math.h in its IR. Many of these have single-instruction variants on various platforms. So, let's add them so std::arch can use them. Yes, exact comparison is intentional: rounding must always return a valid integer-equal value, except for inf/NAN.
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-8/+6
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-22Update the minimum external LLVM to 10Josh Stone-1/+0
2021-03-19Add simd_neg platform intrinsicSparrowLii-0/+7
2021-03-02Fix UI errorsErin Power-9/+3
2021-03-02Revert non-power-of-two vector restrictionErin Power-35/+2
2021-02-07Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisabors-102/+232
Improve SIMD type element count validation Resolves rust-lang/stdsimd#53. These changes are motivated by `stdsimd` moving in the direction of const generic vectors, e.g.: ```rust #[repr(simd)] struct SimdF32<const N: usize>([f32; N]); ``` This makes a few changes: * Establishes a maximum SIMD lane count of 2^16 (65536). This value is arbitrary, but attempts to validate lane count before hitting potential errors in the backend. It's not clear what LLVM's maximum lane count is, but cranelift's appears to be much less than `usize::MAX`, at least. * Expands some SIMD intrinsics to support arbitrary lane counts. This resolves the ICE in the linked issue. * Attempts to catch invalid-sized vectors during typeck when possible. Unresolved questions: * Generic-length vectors can't be validated in typeck and are only validated after monomorphization while computing layout. This "works", but the errors simply bail out with no context beyond the name of the type. Should these errors instead return `LayoutError` or otherwise provide context in some way? As it stands, users of `stdsimd` could trivially produce monomorphization errors by making zero-length vectors. cc `@bjorn3`
2021-01-31Move some tests to more reasonable directoriesCaio-0/+24
2021-01-23Move SIMD testsCaleb Zulawski-5/+202
2021-01-23Fix maximum SIMD lane count, and expose it to other crates. Disallow SIMD ↵Caleb Zulawski-97/+30
vectors with non-power-of-two lengths.
2020-12-26update testsBastian Kauschke-4/+4
2020-11-29Auto merge of #78380 - bstrie:rm-old-num-const-from-tests, r=jyn514bors-5/+3
Update tests to remove old numeric constants Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-11-29Update tests to remove old numeric constantsbstrie-5/+3
Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-11-15fix up tidyAshley Mannix-1/+2
2020-11-15add a canary test for complex repr(simd)Ashley Mannix-0/+50
2020-11-08update ui testsAshley Mannix-14/+12
2020-11-08Support repr(simd) on ADTs containing a single array fieldgnzlbg-68/+139
This PR allows using `#[repr(simd)]` on ADTs containing a single array field: ```rust #[repr(simd)] struct S0([f32; 4]); #[repr(simd)] struct S1<const N: usize>([f32; N]); #[repr(simd)] struct S2<T, const N: usize>([T; N]); ``` This should allow experimenting with portable packed SIMD abstractions on nightly that make use of const generics.
2020-10-04Rollup merge of #77504 - Amanieu:select_simd_bitmask, r=ecstatic-morseJonas Schievink-0/+25
Support vectors with fewer than 8 elements for simd_select_bitmask Resolves the issue raised here: https://github.com/rust-lang/stdarch/issues/310#issuecomment-693730094
2020-10-03Support vectors with fewer than 8 elements for simd_select_bitmaskAmanieu d'Antras-0/+25
2020-10-03Flatten arrows with further commentJubilee Young-5/+6
2020-10-02Macro-expand test to cover all possible lanesJubilee Young-15/+249
2020-09-15Test and reject out-of-bounds shuffle vectorsJubilee Young-0/+32
2020-07-31compiletest: ignore-endian-big, fixes #74829, fixes #74885Ximin Luo-4/+2
2020-06-10Migrate to numeric associated constsLzu Tao-5/+5
2020-04-14Update the minimum external LLVM to 8Josh Stone-1/+0
LLVM 8 was released on March 20, 2019, over a year ago.
2020-02-20Revert "Rollup merge of #69280 - ↵Dylan MacKenzie-5/+1
ecstatic-morse:promote-shuffle-no-special-case, r=petrochenkov" This reverts commit 61d3b6dedb1ec1f3e3cbd3d66b1a3453225bc37c, reversing changes made to c6ad1e2c2a0c7e48537617d36085f866fa6a65a3.
2020-02-18Add `#[rustc_args_required_const]` to `simd_shuffle` testsDylan MacKenzie-1/+5
2020-01-02Revert `const_err` lint checking of castsWesley Wiser-1/+0
Reverts part of #67676
2019-12-30Lint overflowing integer casts in const propWesley Wiser-0/+1
This extends the invalid cases we catch in const prop to include overflowing integer casts using the same machinery as the overflowing binary and unary operation logic.
2019-12-02Update the minimum external LLVM to 7Josh Stone-1/+0
LLVM 7 is over a year old, which should be plenty for compatibility. The last LLVM 6 holdout was llvm-emscripten, which went away in #65501. I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`, which was broken by #66522.
2019-11-02Remove erroneous error-pattern from run-pass testTomasz Miąsko-1/+0