Auto merge of #125358 - matthiaskrgr:rollup-mx841tg, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #124570 (Miscellaneous cleanups)
 - #124772 (Refactor documentation for Apple targets)
 - #125011 (Add opt-for-size core lib feature flag)
 - #125218 (Migrate `run-make/no-intermediate-extras` to new `rmake.rs`)
 - #125225 (Use functions from `crt_externs.h` on iOS/tvOS/watchOS/visionOS)
 - #125266 (compiler: add simd_ctpop intrinsic)
 - #125348 (Small fixes to `std::path::absolute` docs)

Failed merges:

 - #125296 (Fix `unexpected_cfgs` lint on std)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-05-21 12:50:09 +00:00
commit 6715446db6
42 changed files with 681 additions and 440 deletions

View file

@ -42,6 +42,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
| "flog2"
| "flog10"
| "ctlz"
| "ctpop"
| "cttz"
| "bswap"
| "bitreverse"
@ -68,6 +69,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
"round" => Op::Round(rustc_apfloat::Round::NearestTiesToAway),
"trunc" => Op::Round(rustc_apfloat::Round::TowardZero),
"ctlz" => Op::Numeric(sym::ctlz),
"ctpop" => Op::Numeric(sym::ctpop),
"cttz" => Op::Numeric(sym::cttz),
"bswap" => Op::Numeric(sym::bswap),
"bitreverse" => Op::Numeric(sym::bitreverse),

View file

@ -505,6 +505,21 @@ fn simd_intrinsics() {
assert!(simd_reduce_all(i32x4::splat(-1)));
assert!(!simd_reduce_all(i32x2::from_array([0, -1])));
assert_eq!(
simd_ctlz(i32x4::from_array([0, i32::MAX, i32::MIN, -1_i32])),
i32x4::from_array([32, 1, 0, 0])
);
assert_eq!(
simd_ctpop(i32x4::from_array([0, i32::MAX, i32::MIN, -1_i32])),
i32x4::from_array([0, 31, 1, 32])
);
assert_eq!(
simd_cttz(i32x4::from_array([0, i32::MAX, i32::MIN, -1_i32])),
i32x4::from_array([32, 0, 31, 0])
);
assert_eq!(
simd_select(i8x4::from_array([0, -1, -1, 0]), a, b),
i32x4::from_array([1, 10, 10, 4])

View file

@ -177,7 +177,6 @@ run-make/no-alloc-shim/Makefile
run-make/no-builtins-attribute/Makefile
run-make/no-builtins-lto/Makefile
run-make/no-duplicate-libs/Makefile
run-make/no-intermediate-extras/Makefile
run-make/obey-crate-type-flag/Makefile
run-make/optimization-remarks-dir-pgo/Makefile
run-make/optimization-remarks-dir/Makefile