-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #89541 - workingjubilee:abbrev-shufvec-t, r=Mark-Simula…
…crum 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.
- Loading branch information
Showing
58 changed files
with
205 additions
and
358 deletions.
There are no files selected for viewing
92 changes: 0 additions & 92 deletions
92
src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.rs
This file was deleted.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/test/ui/simd/simd-array-trait.stderr → src/test/ui/simd/array-trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 15 additions & 15 deletions
30
.../simd-intrinsic-generic-arithmetic.stderr → ...imd/intrinsic/generic-arithmetic-2.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...nsic-generic-arithmetic-saturating.stderr → ...ic/generic-arithmetic-saturating-2.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// build-fail | ||
|
||
// Test that the simd_bitmask intrinsic produces ok-ish error | ||
// messages when misused. | ||
|
||
#![feature(repr_simd, platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
pub struct u32x2([u32; 2]); | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
pub struct u32x4([u32; 4]); | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
struct u8x8([u8; 8]); | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
struct u8x16([u8; 16]); | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
struct u8x32([u8; 32]); | ||
|
||
#[repr(simd)] | ||
#[derive(Copy, Clone)] | ||
struct u8x64([u8; 64]); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_bitmask<T, U>(x: T) -> U; | ||
} | ||
|
||
fn main() { | ||
let m2 = u32x2([0; 2]); | ||
let m4 = u32x4([0; 4]); | ||
let m8 = u8x8([0; 8]); | ||
let m16 = u8x16([0; 16]); | ||
let m32 = u8x32([0; 32]); | ||
let m64 = u8x64([0; 64]); | ||
|
||
unsafe { | ||
let _: u8 = simd_bitmask(m2); | ||
let _: u8 = simd_bitmask(m4); | ||
let _: u8 = simd_bitmask(m8); | ||
let _: u16 = simd_bitmask(m16); | ||
let _: u32 = simd_bitmask(m32); | ||
let _: u64 = simd_bitmask(m64); | ||
|
||
let _: u16 = simd_bitmask(m2); | ||
//~^ ERROR bitmask `u16`, expected `u8` | ||
|
||
let _: u16 = simd_bitmask(m8); | ||
//~^ ERROR bitmask `u16`, expected `u8` | ||
|
||
let _: u32 = simd_bitmask(m16); | ||
//~^ ERROR bitmask `u32`, expected `u16` | ||
|
||
let _: u64 = simd_bitmask(m32); | ||
//~^ ERROR bitmask `u64`, expected `u32` | ||
|
||
let _: u128 = simd_bitmask(m64); | ||
//~^ ERROR bitmask `u128`, expected `u64` | ||
|
||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
...sic/simd-intrinsic-generic-bitmask.stderr → .../ui/simd/intrinsic/generic-bitmask.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...rinsic/simd-intrinsic-generic-cast.stderr → ...est/ui/simd/intrinsic/generic-cast.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.