diff options
| author | bors <bors@rust-lang.org> | 2025-07-21 02:31:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-21 02:31:56 +0000 |
| commit | e05ab47e6c418fb2b9faa2eae9a7e70c65c98eaa (patch) | |
| tree | cfa5e765a3479a007839b9ced139ff8199f56ad6 /tests/codegen/simd/packed-simd.rs | |
| parent | 460259d14de0274b97b8801e08cb2fe5f16fdac5 (diff) | |
| parent | 41ce1ed252f194756fb2f3e3e92bbdfb3940088d (diff) | |
| download | rust-e05ab47e6c418fb2b9faa2eae9a7e70c65c98eaa.tar.gz rust-e05ab47e6c418fb2b9faa2eae9a7e70c65c98eaa.zip | |
Auto merge of #143833 - scottmcm:final-mcp-838, r=compiler-errors
Ban projecting into SIMD types [MCP838] Closes https://github.com/rust-lang/compiler-team/issues/838 The actual compiler change here is tiny; there's just a bazillion tests to update. ~~Since I'm sure I've missed some, for now~~ ~~r ghost~~ try-job: test-various try-job: x86_64-gnu-nopt
Diffstat (limited to 'tests/codegen/simd/packed-simd.rs')
| -rw-r--r-- | tests/codegen/simd/packed-simd.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/codegen/simd/packed-simd.rs b/tests/codegen/simd/packed-simd.rs index 73e0d29d7d6..70c03fcc955 100644 --- a/tests/codegen/simd/packed-simd.rs +++ b/tests/codegen/simd/packed-simd.rs @@ -9,18 +9,14 @@ use core::intrinsics::simd as intrinsics; use core::{mem, ptr}; +#[path = "../../auxiliary/minisimd.rs"] +mod minisimd; +use minisimd::{PackedSimd, Simd as FullSimd}; + // Test codegen for not only "packed" but also "fully aligned" SIMD types, and conversion between // them. A repr(packed,simd) type with 3 elements can't exceed its element alignment, whereas the // same type as repr(simd) will instead have padding. -#[repr(simd, packed)] -#[derive(Copy, Clone)] -pub struct PackedSimd<T, const N: usize>([T; N]); - -#[repr(simd)] -#[derive(Copy, Clone)] -pub struct FullSimd<T, const N: usize>([T; N]); - // non-powers-of-two have padding and need to be expanded to full vectors fn load<T, const N: usize>(v: PackedSimd<T, N>) -> FullSimd<T, N> { unsafe { |
