Skip to content

Commit 7584959

Browse files
committed
Auto merge of #118077 - calebzulawski:sync-portable-simd-2023-11-19, r=workingjubilee
Portable SIMD subtree update Syncs nightly to the latest changes from rust-lang/portable-simd r? `@rust-lang/libs`
2 parents 7893178 + 6790644 commit 7584959

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tests/fail/intrinsics/simd-float-to-int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(portable_simd)]
2-
use std::simd::*;
2+
use std::simd::prelude::*;
33

44
fn main() {
55
unsafe {

tests/pass/portable-simd-ptrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@compile-flags: -Zmiri-permissive-provenance
33
#![feature(portable_simd, platform_intrinsics)]
44
use std::ptr;
5-
use std::simd::*;
5+
use std::simd::prelude::*;
66

77
fn main() {
88
// Pointer casts

tests/pass/portable-simd.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@compile-flags: -Zmiri-strict-provenance
22
#![feature(portable_simd, platform_intrinsics, adt_const_params, inline_const)]
3-
#![allow(incomplete_features)]
4-
use std::simd::*;
3+
#![allow(incomplete_features, internal_features)]
4+
use std::simd::{prelude::*, StdFloat};
55

66
extern "platform-intrinsic" {
77
pub(crate) fn simd_bitmask<T, U>(x: T) -> U;
@@ -328,14 +328,12 @@ fn simd_cast() {
328328
}
329329

330330
fn simd_swizzle() {
331-
use Which::*;
332-
333331
let a = f32x4::splat(10.0);
334332
let b = f32x4::from_array([1.0, 2.0, 3.0, -4.0]);
335333

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

341339
fn simd_gather_scatter() {
@@ -417,13 +415,13 @@ fn simd_intrinsics() {
417415
i32x4::from_array([10, 2, 10, 10])
418416
);
419417
assert_eq!(simd_shuffle_generic::<_, i32x4, { &[3, 1, 0, 2] }>(a, b), a,);
420-
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3, 1, 0, 2] }), a,);
418+
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3u32, 1, 0, 2] }), a,);
421419
assert_eq!(
422420
simd_shuffle_generic::<_, i32x4, { &[7, 5, 4, 6] }>(a, b),
423421
i32x4::from_array([4, 2, 1, 10]),
424422
);
425423
assert_eq!(
426-
simd_shuffle::<_, _, i32x4>(a, b, const { [7, 5, 4, 6] }),
424+
simd_shuffle::<_, _, i32x4>(a, b, const { [7u32, 5, 4, 6] }),
427425
i32x4::from_array([4, 2, 1, 10]),
428426
);
429427
}

0 commit comments

Comments
 (0)