diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-24 19:21:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 19:21:51 -0500 |
| commit | 6c1f9592881b3e15bbd1157b45440e2bac289ed5 (patch) | |
| tree | e52a1eb06b00e1f4146e219b911c79e1a455bed4 /src | |
| parent | c11a523f7455e96a3c8776abebc3fb73d26cd30d (diff) | |
| parent | 0362775fb5badb68fcc2a9a46a16f0154054f3c4 (diff) | |
Rollup merge of #137556 - RalfJung:simd_shuffle_const_generic, r=oli-obk
rename simd_shuffle_generic → simd_shuffle_const_generic I've been confused by this name one time too often. ;) r? `@oli-obk`
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/src/intrinsics/simd.rs | 4 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/intrinsics/portable-simd.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/miri/src/intrinsics/simd.rs b/src/tools/miri/src/intrinsics/simd.rs index 45e316b190a..3e8b3ef46e4 100644 --- a/src/tools/miri/src/intrinsics/simd.rs +++ b/src/tools/miri/src/intrinsics/simd.rs @@ -633,7 +633,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_immediate(*val, &dest)?; } } - "shuffle_generic" => { + "shuffle_const_generic" => { let [left, right] = check_arg_count(args)?; let (left, left_len) = this.project_to_simd(left)?; let (right, right_len) = this.project_to_simd(right)?; @@ -657,7 +657,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.read_immediate(&this.project_index(&right, right_idx)?)? } else { throw_ub_format!( - "`simd_shuffle_generic` index {src_index} is out-of-bounds for 2 vectors with length {dest_len}" + "`simd_shuffle_const_generic` index {src_index} is out-of-bounds for 2 vectors with length {dest_len}" ); }; this.write_immediate(*val, &dest)?; diff --git a/src/tools/miri/tests/pass/intrinsics/portable-simd.rs b/src/tools/miri/tests/pass/intrinsics/portable-simd.rs index b6c5522b3d2..f043bb7ce9f 100644 --- a/src/tools/miri/tests/pass/intrinsics/portable-simd.rs +++ b/src/tools/miri/tests/pass/intrinsics/portable-simd.rs @@ -16,7 +16,7 @@ use std::simd::prelude::*; #[rustc_intrinsic] #[rustc_nounwind] -pub unsafe fn simd_shuffle_generic<T, U, const IDX: &'static [u32]>(_x: T, _y: T) -> U; +pub unsafe fn simd_shuffle_const_generic<T, U, const IDX: &'static [u32]>(_x: T, _y: T) -> U; fn simd_ops_f32() { let a = f32x4::splat(10.0); @@ -619,13 +619,13 @@ fn simd_intrinsics() { simd_select(i8x4::from_array([0, -1, -1, 0]), b, a), i32x4::from_array([10, 2, 10, 10]) ); - assert_eq!(simd_shuffle_generic::<_, i32x4, { &[3, 1, 0, 2] }>(a, b), a,); + assert_eq!(simd_shuffle_const_generic::<_, i32x4, { &[3, 1, 0, 2] }>(a, b), a,); assert_eq!( simd_shuffle::<_, _, i32x4>(a, b, const { u32x4::from_array([3u32, 1, 0, 2]) }), a, ); assert_eq!( - simd_shuffle_generic::<_, i32x4, { &[7, 5, 4, 6] }>(a, b), + simd_shuffle_const_generic::<_, i32x4, { &[7, 5, 4, 6] }>(a, b), i32x4::from_array([4, 2, 1, 10]), ); assert_eq!( |
