Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
dc49fdd
Add `kl` and `widekl` target features, and the feature gate
sayantn Dec 27, 2024
a063cf5
fix(rustdoc): always use a channel when linking to doc.rust-lang.org
poliorcetics Dec 26, 2024
139d6ba
set rustc dylib on manually constructed rustc command
onur-ozkan Jan 30, 2025
88260f4
bootstrap: only build `crt{begin,end}.o` when compiling to MUSL
japaric Jan 21, 2025
acb3bab
bootstrap: add wrapper macros for `tracing`-gated tracing macros
jieyouxu Jan 31, 2025
0878692
Ported tests/ui/simd to use the intrinsic macro
vayunbiyani Jan 21, 2025
5465770
Pretty print pattern type values with `transmute` if they don't satis…
oli-obk Jan 29, 2025
7de67a1
Flatten the option check in `lower_pattern_range_endpoint`
Zalathar Feb 3, 2025
85f4cdc
Return range endpoint ascriptions/consts via a `&mut Vec`
Zalathar Feb 3, 2025
2fb1261
Simplify the pattern unpeeling in `lower_pattern_range_endpoint`
Zalathar Feb 3, 2025
8ba9efd
Rollup merge of #134807 - poliorcetics:ab/push-skpynvsmwkll, r=camelid
jieyouxu Feb 3, 2025
1c368e4
Rollup merge of #134814 - sayantn:keylocker, r=oli-obk
jieyouxu Feb 3, 2025
b53310c
Rollup merge of #135836 - ferrocene:ja-gh135782-build-crt-only-for-mu…
jieyouxu Feb 3, 2025
1f3c713
Rollup merge of #136022 - vayunbiyani:port_tests, r=RalfJung
jieyouxu Feb 3, 2025
2542aca
Rollup merge of #136235 - oli-obk:transmuty-pat-tys, r=RalfJung
jieyouxu Feb 3, 2025
a60a7c3
Rollup merge of #136309 - onur-ozkan:133629, r=jieyouxu
jieyouxu Feb 3, 2025
6f7ec37
Rollup merge of #136392 - jieyouxu:wrap-tracing, r=onur-ozkan
jieyouxu Feb 3, 2025
74901e2
Rollup merge of #136462 - Zalathar:endpoint, r=oli-obk
jieyouxu Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/ui/simd/array-trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ pub struct T<S: Simd>([S::Lane; S::SIZE]);
//~| ERROR SIMD vector element type should be a primitive scalar
//~| ERROR unconstrained generic constant

extern "rust-intrinsic" {
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
fn simd_extract<T, E>(x: T, idx: u32) -> E;
}
#[rustc_intrinsic]
unsafe fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;

#[rustc_intrinsic]
unsafe fn simd_extract<T, E>(x: T, idx: u32) -> E;


pub fn main() {
let mut t = T::<i32x4>([0; 4]);
Expand Down
10 changes: 6 additions & 4 deletions tests/ui/simd/array-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ struct S([i32; 4]);
#[derive(Copy, Clone)]
struct T<const N: usize>([i32; N]);

extern "rust-intrinsic" {
fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
fn simd_extract<T, E>(x: T, idx: u32) -> E;
}
#[rustc_intrinsic]
unsafe fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;

#[rustc_intrinsic]
unsafe fn simd_extract<T, E>(x: T, idx: u32) -> E;


pub fn main() {
let mut s = S([0; 4]);
Expand Down
5 changes: 2 additions & 3 deletions tests/ui/simd/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ struct B<T>([T; 4]);
struct C<T, const N: usize>([T; N]);


extern "rust-intrinsic" {
fn simd_add<T>(x: T, y: T) -> T;
}
#[rustc_intrinsic]
unsafe fn simd_add<T>(x: T, y: T) -> T;

fn add<T: ops::Add<Output=T>>(lhs: T, rhs: T) -> T {
lhs + rhs
Expand Down
74 changes: 53 additions & 21 deletions tests/ui/simd/intrinsic/float-math-pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,59 @@
#[derive(Copy, Clone, PartialEq, Debug)]
struct f32x4(pub [f32; 4]);

extern "rust-intrinsic" {
fn simd_fsqrt<T>(x: T) -> T;
fn simd_fabs<T>(x: T) -> T;
fn simd_fsin<T>(x: T) -> T;
fn simd_fcos<T>(x: T) -> T;
fn simd_fexp<T>(x: T) -> T;
fn simd_fexp2<T>(x: T) -> T;
fn simd_fma<T>(x: T, y: T, z: T) -> T;
fn simd_relaxed_fma<T>(x: T, y: T, z: T) -> T;
fn simd_flog<T>(x: T) -> T;
fn simd_flog10<T>(x: T) -> T;
fn simd_flog2<T>(x: T) -> T;
fn simd_fpow<T>(x: T, y: T) -> T;
fn simd_fpowi<T>(x: T, y: i32) -> T;

// rounding functions
fn simd_ceil<T>(x: T) -> T;
fn simd_floor<T>(x: T) -> T;
fn simd_round<T>(x: T) -> T;
fn simd_trunc<T>(x: T) -> T;
}
#[rustc_intrinsic]
unsafe fn simd_fsqrt<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fabs<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fsin<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fcos<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fexp<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fexp2<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fma<T>(x: T, y: T, z: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_relaxed_fma<T>(x: T, y: T, z: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_flog<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_flog10<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_flog2<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fpow<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_fpowi<T>(x: T, y: i32) -> T;


// rounding functions
#[rustc_intrinsic]
unsafe fn simd_ceil<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_floor<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_round<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_trunc<T>(x: T) -> T;


macro_rules! assert_approx_eq_f32 {
($a:expr, $b:expr) => ({
Expand Down
67 changes: 48 additions & 19 deletions tests/ui/simd/intrinsic/generic-arithmetic-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,54 @@ pub struct u32x4(pub [u32; 4]);
#[derive(Copy, Clone)]
pub struct f32x4(pub [f32; 4]);

extern "rust-intrinsic" {
fn simd_add<T>(x: T, y: T) -> T;
fn simd_sub<T>(x: T, y: T) -> T;
fn simd_mul<T>(x: T, y: T) -> T;
fn simd_div<T>(x: T, y: T) -> T;
fn simd_rem<T>(x: T, y: T) -> T;
fn simd_shl<T>(x: T, y: T) -> T;
fn simd_shr<T>(x: T, y: T) -> T;
fn simd_and<T>(x: T, y: T) -> T;
fn simd_or<T>(x: T, y: T) -> T;
fn simd_xor<T>(x: T, y: T) -> T;

fn simd_neg<T>(x: T) -> T;
fn simd_bswap<T>(x: T) -> T;
fn simd_bitreverse<T>(x: T) -> T;
fn simd_ctlz<T>(x: T) -> T;
fn simd_ctpop<T>(x: T) -> T;
fn simd_cttz<T>(x: T) -> T;
}
#[rustc_intrinsic]
unsafe fn simd_add<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_sub<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_mul<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_div<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_rem<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_shl<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_shr<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_and<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_or<T>(x: T, y: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_xor<T>(x: T, y: T) -> T;


#[rustc_intrinsic]
unsafe fn simd_neg<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_bswap<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_bitreverse<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_ctlz<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_ctpop<T>(x: T) -> T;

#[rustc_intrinsic]
unsafe fn simd_cttz<T>(x: T) -> T;

fn main() {
let x = i32x4([0, 0, 0, 0]);
Expand Down
48 changes: 24 additions & 24 deletions tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
Original file line number Diff line number Diff line change
@@ -1,143 +1,143 @@
error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:81:9
--> $DIR/generic-arithmetic-2.rs:110:9
|
LL | simd_add(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_sub` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:83:9
--> $DIR/generic-arithmetic-2.rs:112:9
|
LL | simd_sub(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_mul` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:85:9
--> $DIR/generic-arithmetic-2.rs:114:9
|
LL | simd_mul(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_div` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:87:9
--> $DIR/generic-arithmetic-2.rs:116:9
|
LL | simd_div(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:89:9
--> $DIR/generic-arithmetic-2.rs:118:9
|
LL | simd_shl(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:91:9
--> $DIR/generic-arithmetic-2.rs:120:9
|
LL | simd_shr(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_and` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:93:9
--> $DIR/generic-arithmetic-2.rs:122:9
|
LL | simd_and(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_or` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:95:9
--> $DIR/generic-arithmetic-2.rs:124:9
|
LL | simd_or(0, 0);
| ^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_xor` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:97:9
--> $DIR/generic-arithmetic-2.rs:126:9
|
LL | simd_xor(0, 0);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_neg` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:100:9
--> $DIR/generic-arithmetic-2.rs:129:9
|
LL | simd_neg(0);
| ^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:102:9
--> $DIR/generic-arithmetic-2.rs:131:9
|
LL | simd_bswap(0);
| ^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:104:9
--> $DIR/generic-arithmetic-2.rs:133:9
|
LL | simd_bitreverse(0);
| ^^^^^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:106:9
--> $DIR/generic-arithmetic-2.rs:135:9
|
LL | simd_ctlz(0);
| ^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: expected SIMD input type, found non-SIMD `i32`
--> $DIR/generic-arithmetic-2.rs:108:9
--> $DIR/generic-arithmetic-2.rs:137:9
|
LL | simd_cttz(0);
| ^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:111:9
--> $DIR/generic-arithmetic-2.rs:140:9
|
LL | simd_shl(z, z);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:113:9
--> $DIR/generic-arithmetic-2.rs:142:9
|
LL | simd_shr(z, z);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_and` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:115:9
--> $DIR/generic-arithmetic-2.rs:144:9
|
LL | simd_and(z, z);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_or` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:117:9
--> $DIR/generic-arithmetic-2.rs:146:9
|
LL | simd_or(z, z);
| ^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_xor` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:119:9
--> $DIR/generic-arithmetic-2.rs:148:9
|
LL | simd_xor(z, z);
| ^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:121:9
--> $DIR/generic-arithmetic-2.rs:150:9
|
LL | simd_bswap(z);
| ^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:123:9
--> $DIR/generic-arithmetic-2.rs:152:9
|
LL | simd_bitreverse(z);
| ^^^^^^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:125:9
--> $DIR/generic-arithmetic-2.rs:154:9
|
LL | simd_ctlz(z);
| ^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_ctpop` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:127:9
--> $DIR/generic-arithmetic-2.rs:156:9
|
LL | simd_ctpop(z);
| ^^^^^^^^^^^^^

error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: unsupported operation on `f32x4` with element `f32`
--> $DIR/generic-arithmetic-2.rs:129:9
--> $DIR/generic-arithmetic-2.rs:158:9
|
LL | simd_cttz(z);
| ^^^^^^^^^^^^
Expand Down
Loading