Skip to content

Commit

Permalink
Auto merge of #3202 - rust-lang:rustup-2023-12-03, r=saethlin
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Dec 3, 2023
2 parents e1abb5a + 0457709 commit 4e88edc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0919ad18381f6f4fcaddc809e786553e028bbde0
225e36cff9809948d6567ab16f75d7b087ea83a7
2 changes: 1 addition & 1 deletion tests/fail/intrinsics/simd-float-to-int.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(portable_simd)]
use std::simd::*;
use std::simd::prelude::*;

fn main() {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion tests/pass/portable-simd-ptrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(portable_simd, platform_intrinsics)]
use std::ptr;
use std::simd::*;
use std::simd::prelude::*;

fn main() {
// Pointer casts
Expand Down
12 changes: 5 additions & 7 deletions tests/pass/portable-simd.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@compile-flags: -Zmiri-strict-provenance
#![feature(portable_simd, platform_intrinsics, adt_const_params, inline_const)]
#![allow(incomplete_features)]
use std::simd::*;
#![allow(incomplete_features, internal_features)]
use std::simd::{prelude::*, StdFloat};

extern "platform-intrinsic" {
pub(crate) fn simd_bitmask<T, U>(x: T) -> U;
Expand Down Expand Up @@ -328,14 +328,12 @@ fn simd_cast() {
}

fn simd_swizzle() {
use Which::*;

let a = f32x4::splat(10.0);
let b = f32x4::from_array([1.0, 2.0, 3.0, -4.0]);

assert_eq!(simd_swizzle!(b, [3, 0, 0, 2]), f32x4::from_array([-4.0, 1.0, 1.0, 3.0]));
assert_eq!(simd_swizzle!(b, [1, 2]), f32x2::from_array([2.0, 3.0]));
assert_eq!(simd_swizzle!(b, a, [First(3), Second(0)]), f32x2::from_array([-4.0, 10.0]));
assert_eq!(simd_swizzle!(b, a, [3, 4]), f32x2::from_array([-4.0, 10.0]));
}

fn simd_gather_scatter() {
Expand Down Expand Up @@ -417,13 +415,13 @@ fn simd_intrinsics() {
i32x4::from_array([10, 2, 10, 10])
);
assert_eq!(simd_shuffle_generic::<_, i32x4, { &[3, 1, 0, 2] }>(a, b), a,);
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3, 1, 0, 2] }), a,);
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3u32, 1, 0, 2] }), a,);
assert_eq!(
simd_shuffle_generic::<_, i32x4, { &[7, 5, 4, 6] }>(a, b),
i32x4::from_array([4, 2, 1, 10]),
);
assert_eq!(
simd_shuffle::<_, _, i32x4>(a, b, const { [7, 5, 4, 6] }),
simd_shuffle::<_, _, i32x4>(a, b, const { [7u32, 5, 4, 6] }),
i32x4::from_array([4, 2, 1, 10]),
);
}
Expand Down

0 comments on commit 4e88edc

Please sign in to comment.