Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
781f9d2
refactor ub_checks and contract_checks to share logic
pitaj May 4, 2025
42c5d96
implement SIMD funnel shifts in const-eval
sayantn Oct 9, 2025
2b5fc59
Auto merge of #148674 - weihanglo:update-cargo, r=weihanglo
bors Nov 8, 2025
4896b68
Auto merge of #147803 - jsgf:move-copy-codegen, r=madsmtm,saethlin
bors Nov 8, 2025
d56a004
Auto merge of #147935 - luca3s:add-rtsan, r=petrochenkov
bors Nov 8, 2025
b34df40
Rollup merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
matthiaskrgr Nov 8, 2025
c3c4b59
Rollup merge of #147024 - brad0:std_detect_openbsd_elf_aux_info, r=Ma…
matthiaskrgr Nov 8, 2025
f1d7ca6
Rollup merge of #147534 - sayantn:simd-funnel-shifts, r=RalfJung
matthiaskrgr Nov 8, 2025
5886c79
Rollup merge of #147540 - bjoernager:slice-as-array, r=Amanieu
matthiaskrgr Nov 8, 2025
ea49327
Rollup merge of #147686 - vrtgs:non-zero-isolate, r=joboet
matthiaskrgr Nov 8, 2025
6c68bef
Rollup merge of #148230 - fmease:rustdoc-highlight-tweaks, r=Guillaum…
matthiaskrgr Nov 8, 2025
4425e3b
Rollup merge of #148555 - ehuss:rust-by-example-es, r=Kobzol
matthiaskrgr Nov 8, 2025
1d723c0
Rollup merge of #148556 - chenyukang:yukang-fix-148493-async-closure,…
matthiaskrgr Nov 8, 2025
ccdfaff
Rollup merge of #148585 - GuillaumeGomez:improve-format-code, r=yotam…
matthiaskrgr Nov 8, 2025
10ef22c
Rollup merge of #148600 - folkertdev:pass-indirectly-reuse-attrs, r=J…
matthiaskrgr Nov 8, 2025
99874d8
Auto merge of #139558 - camelid:mgca-const-items, r=oli-obk,BoxyUwU
bors Nov 8, 2025
d8a1511
Auto merge of #148692 - matthiaskrgr:rollup-hryk71f, r=matthiaskrgr
bors Nov 9, 2025
7b8cb31
Rollup merge of #128666 - pitaj:intrinsic-overflow_checks, r=BoxyUwU
Zalathar Nov 9, 2025
35cf684
Rollup merge of #146305 - Kivooeo:a-lot-of-references-in-self, r=Jona…
Zalathar Nov 9, 2025
287e5c1
Rollup merge of #147179 - Walnut356:template_lookup, r=Mark-Simulacrum
Zalathar Nov 9, 2025
4a1fcf2
Rollup merge of #147743 - 21aslade:packed-diagnostic, r=RalfJung
Zalathar Nov 9, 2025
b8cf43d
Rollup merge of #148079 - taj-p:master, r=Mark-Simulacrum
Zalathar Nov 9, 2025
22e2fd1
Rollup merge of #148084 - the8472:prefixless-path-components-iter, r=…
Zalathar Nov 9, 2025
bd15682
Rollup merge of #148126 - hax0kartik:vx-fix-148125, r=Mark-Simulacrum
Zalathar Nov 9, 2025
a14ab77
Rollup merge of #148204 - hkBst:patch-5, r=nnethercote
Zalathar Nov 9, 2025
6484c65
Rollup merge of #148279 - IntegralPilot:master, r=hkBst
Zalathar Nov 9, 2025
fb38425
Rollup merge of #148333 - bend-n:const_result_unwrap_unchecked, r=mar…
Zalathar Nov 9, 2025
e18dff6
Rollup merge of #148539 - cramertj:alloc-arc, r=Amanieu
Zalathar Nov 9, 2025
e845740
Rollup merge of #148601 - GrigorenkoPV:invalid_atomic_ordering, r=Kiv…
Zalathar Nov 9, 2025
3abd7e3
Rollup merge of #148612 - chenyukang:yukang-fix-148580-macro-hygiene-…
Zalathar Nov 9, 2025
9806236
Rollup merge of #148613 - androm3da:bcain/hex_lld, r=JonathanBrouwer,…
Zalathar Nov 9, 2025
8e0a81d
Rollup merge of #148619 - amy-kwan:amyk/AddLockingFunctions_AIX, r=wo…
Zalathar Nov 9, 2025
8f1817c
Rollup merge of #148644 - GuillaumeGomez:error-index-index-open, r=Ko…
Zalathar Nov 9, 2025
ac93b72
Rollup merge of #148649 - lcnr:rarwwww, r=BoxyUwU
Zalathar Nov 9, 2025
b5c5e23
Rollup merge of #148673 - fmease:del-dyn_star-remnant, r=JonathanBrouwer
Zalathar Nov 9, 2025
1695514
Rollup merge of #148675 - Kobzol:eslint-js, r=yotamofek
Zalathar Nov 9, 2025
def16f5
Rollup merge of #148680 - ShE3py:array-colon, r=JonathanBrouwer
Zalathar Nov 9, 2025
572da65
Rollup merge of #148688 - JonathanBrouwer:remove_features, r=jdonszel…
Zalathar Nov 9, 2025
5a4fdee
Rollup merge of #148711 - JonathanBrouwer:cfg_macro_lint_node_id, r=K…
Zalathar Nov 9, 2025
edcc64f
Auto merge of #148721 - Zalathar:rollup-398va3y, r=Zalathar
bors Nov 9, 2025
b29eb48
Auto merge of #148660 - fmease:cross-crate-cfg, r=GuillaumeGomez
bors Nov 9, 2025
1144600
Rollup merge of #148683 - fmease:rm-const_trait-attr, r=fee1-dead
matthiaskrgr Nov 9, 2025
4105eee
Rollup merge of #148687 - joboet:nonpoison-hook-rwlock, r=ChrisDenton
matthiaskrgr Nov 9, 2025
cdcbc73
Rollup merge of #148709 - karolzwolak:bootstrap-override-lld-should-d…
matthiaskrgr Nov 9, 2025
ada9535
Rollup merge of #148716 - camelid:finish-type_const, r=BoxyUwU
matthiaskrgr Nov 9, 2025
1171a2b
Rollup merge of #148722 - CAD97:git-dislikes-my-emoji, r=Mark-Simulacrum
matthiaskrgr Nov 9, 2025
50d16bb
Rollup merge of #148723 - Zalathar:bootstrap-doctest, r=jieyouxu
matthiaskrgr Nov 9, 2025
1bbaafd
Rollup merge of #148724 - Zalathar:tidyselftest, r=jieyouxu
matthiaskrgr Nov 9, 2025
e057cfa
Rollup merge of #148734 - RalfJung:miri, r=RalfJung
matthiaskrgr Nov 9, 2025
1ec4b80
Rollup merge of #148736 - luca3s:fix-typo, r=Zalathar
matthiaskrgr Nov 9, 2025
54c0c94
Rollup merge of #148744 - chenyukang:yukang-add-to-rotation, r=jieyouxu
matthiaskrgr Nov 9, 2025
1528a80
Auto merge of #148753 - matthiaskrgr:rollup-48jzbqw, r=matthiaskrgr
bors Nov 9, 2025
9c097c0
Auto merge of #148435 - ZhongyaoChen:promote-riscv64a23-to-tier2, r=j…
bors Nov 9, 2025
1a2f4be
Prepare for merging from rust-lang/rust
Nov 10, 2025
645e65d
Merge ref '8401398e1f14' from rust-lang/rust
Nov 10, 2025
90f4993
fmt
Nov 10, 2025
2b28da2
clippy
RalfJung Nov 10, 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
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ceb7df7e6f17c92c7d49f7e4f02df0e68bc9b38b
8401398e1f14a24670ee1a3203713dc2f0f8b3a8
12 changes: 5 additions & 7 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,13 +1353,11 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
}

#[inline(always)]
fn ub_checks(ecx: &InterpCx<'tcx, Self>) -> InterpResult<'tcx, bool> {
interp_ok(ecx.tcx.sess.ub_checks())
}

#[inline(always)]
fn contract_checks(ecx: &InterpCx<'tcx, Self>) -> InterpResult<'tcx, bool> {
interp_ok(ecx.tcx.sess.contract_checks())
fn runtime_checks(
ecx: &InterpCx<'tcx, Self>,
r: mir::RuntimeChecks,
) -> InterpResult<'tcx, bool> {
interp_ok(r.value(ecx.tcx.sess))
}

#[inline(always)]
Expand Down
12 changes: 12 additions & 0 deletions tests/fail/intrinsics/simd-funnel_shl-too-far.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![feature(core_intrinsics, portable_simd)]

use std::intrinsics::simd::simd_funnel_shl;
use std::simd::*;

fn main() {
unsafe {
let x = i32x2::from_array([1, 1]);
let y = i32x2::from_array([100, 0]);
simd_funnel_shl(x, x, y); //~ERROR: overflowing shift by 100 in `simd_funnel_shl` in lane 0
}
}
13 changes: 13 additions & 0 deletions tests/fail/intrinsics/simd-funnel_shl-too-far.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: Undefined Behavior: overflowing shift by 100 in `simd_funnel_shl` in lane 0
--> tests/fail/intrinsics/simd-funnel_shl-too-far.rs:LL:CC
|
LL | simd_funnel_shl(x, x, y);
| ^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

12 changes: 12 additions & 0 deletions tests/fail/intrinsics/simd-funnel_shr-too-far.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![feature(core_intrinsics, portable_simd)]

use std::intrinsics::simd::simd_funnel_shr;
use std::simd::*;

fn main() {
unsafe {
let x = i32x2::from_array([1, 1]);
let y = i32x2::from_array([20, 40]);
simd_funnel_shr(x, x, y); //~ERROR: overflowing shift by 40 in `simd_funnel_shr` in lane 1
}
}
13 changes: 13 additions & 0 deletions tests/fail/intrinsics/simd-funnel_shr-too-far.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: Undefined Behavior: overflowing shift by 40 in `simd_funnel_shr` in lane 1
--> tests/fail/intrinsics/simd-funnel_shr-too-far.rs:LL:CC
|
LL | simd_funnel_shr(x, x, y);
| ^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

16 changes: 14 additions & 2 deletions tests/pass/intrinsics/portable-simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<T: Copy, const N: usize> PackedSimd<T, N> {
#[rustc_nounwind]
pub unsafe fn simd_shuffle_const_generic<T, U, const IDX: &'static [u32]>(x: T, y: T) -> U;

pub fn simd_ops_f16() {
fn simd_ops_f16() {
use intrinsics::*;

// small hack to make type inference better
Expand Down Expand Up @@ -273,7 +273,7 @@ fn simd_ops_f64() {
assert_eq!(f64x2::from_array([f64::NAN, 0.0]).reduce_min(), 0.0);
}

pub fn simd_ops_f128() {
fn simd_ops_f128() {
use intrinsics::*;

// small hack to make type inference better
Expand Down Expand Up @@ -454,6 +454,18 @@ fn simd_ops_i32() {
0x3fffffffu32 as i32
])
);

// these values are taken from the doctests of `u32::funnel_shl` and `u32::funnel_shr`
let c = u32x4::splat(0x010000b3);
let d = u32x4::splat(0x2fe78e45);

unsafe {
assert_eq!(intrinsics::simd_funnel_shl(c, d, u32x4::splat(0)), c);
assert_eq!(intrinsics::simd_funnel_shl(c, d, u32x4::splat(8)), u32x4::splat(0x0000b32f));

assert_eq!(intrinsics::simd_funnel_shr(c, d, u32x4::splat(0)), d);
assert_eq!(intrinsics::simd_funnel_shr(c, d, u32x4::splat(8)), u32x4::splat(0xb32fe78e));
}
}

fn simd_mask() {
Expand Down