Skip to content

Conversation

okaneco
Copy link
Contributor

@okaneco okaneco commented Aug 18, 2025

Bump toolchain to nightly-2025-08-17
Update Cargo.lock
Remove the deprecated i586-pc-windows-msvc target from CI
Fix examples broken by slice_as_chunks being stabilized and array_chunks being removed in favor of as_chunks

Fixes #470

@calebzulawski
Copy link
Member

Thanks! I think you need to update rust-toolchain.toml to get CI to pass.

Update examples to remove features that have been stabilized
@okaneco
Copy link
Contributor Author

okaneco commented Aug 18, 2025

Ah, I manually overrode it locally to 08-17.

Pushed the toolchain fix, but I think i586-pc-windows-msvc got demoted recently.

Blog post for its removal in the 1.86 release notes
https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/#target-deprecation-warning-for-1-87-0

The tier-2 target i586-pc-windows-msvc will be removed in the next version of Rust, 1.87.0. Its difference to the much more popular i686-pc-windows-msvc is that it does not require SSE2 instruction support, but Windows 10, the minimum required OS version of all windows targets (except the win7 targets), requires SSE2 instructions itself.

All users currently targeting i586-pc-windows-msvc should migrate to i686-pc-windows-msvc before the 1.87.0 release.

@okaneco

This comment was marked as resolved.

@okaneco okaneco changed the title Update examples to remove features that have been stabilized Update nightly toolchain and Cargo.lock, fix examples broken by stabilized features Aug 18, 2025
@okaneco
Copy link
Contributor Author

okaneco commented Aug 18, 2025

Updated the original PR comment.

I removed the i586 target from the CI job and ran cargo update to update the lock file.

@okaneco
Copy link
Contributor Author

okaneco commented Aug 18, 2025

Miri failed on float equality tests. No idea how to resolve that.

@programmerjake
Copy link
Member

programmerjake commented Aug 18, 2025

i think the failures are caused by rust-lang/miri#3555
They added a workaround that we can use: rust-lang/miri#4480
or we can fix our float comparisons to allow the random error only on the transcendental functions (not including sqrt).

I don't have time right now to fix all that myself, so @okaneco you can try to fix it or let one of us try (@calebzulawski?)

@calebzulawski
Copy link
Member

I'm working on a fix :)

@okaneco okaneco force-pushed the array_fix branch 2 times, most recently from 51932e7 to 9183dcf Compare August 18, 2025 04:59
@okaneco
Copy link
Contributor Author

okaneco commented Aug 18, 2025

Trying to get that -Zmiri-no-extra-rounding-error to work but struggling with the CI. Giving up for now.
I was setting RUSTFLAGS instead of MIRIFLAGS 🤦

Not sure if you wanted to use that flag, -Zmiri-deterministic-floats, or another option.

@calebzulawski
Copy link
Member

I added approximate comparisons, I think this should work...

@calebzulawski calebzulawski merged commit a645554 into rust-lang:master Aug 18, 2025
50 checks passed
@calebzulawski
Copy link
Member

Thanks! :)

@okaneco okaneco deleted the array_fix branch August 18, 2025 15:02
@okaneco
Copy link
Contributor Author

okaneco commented Aug 18, 2025

It looks like Miri did end passing with the -Zmiri-no-extra-rounding-error flag added
https://github.com/rust-lang/portable-simd/actions/runs/17031728351

I noticed while looking in the Miri job logs that there were warnings for pointer to int conversions, so might want to set -Dwarnings in rustflags to notice them faster unless it's intended.

warning: integer-to-pointer cast
   --> /home/runner/work/portable-simd/portable-simd/crates/test_helpers/src/lib.rs:54:13
    |
 54 |             x as _
    |             ^^^^^^ integer-to-pointer cast
    |
    = help: this program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`, which means that Miri might miss pointer bugs in this program
    = help: see https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation
    = help: to ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead
    = help: you can then set `MIRIFLAGS=-Zmiri-strict-provenance` to ensure you are not relying on `with_exposed_provenance` semantics
    = help: alternatively, `MIRIFLAGS=-Zmiri-permissive-provenance` disables this warning

warning: integer-to-pointer cast
   --> /home/runner/work/portable-simd/portable-simd/crates/core_simd/src/simd/ptr/const_ptr.rs:163:18
    |
163 |         unsafe { core::intrinsics::simd::simd_with_exposed_provenance(addr) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
    |

warning: integer-to-pointer cast
   --> /home/runner/work/portable-simd/portable-simd/crates/test_helpers/src/lib.rs:65:13
    |
 65 |             x as _
    |             ^^^^^^ integer-to-pointer cast

warning: integer-to-pointer cast
   --> /home/runner/work/portable-simd/portable-simd/crates/core_simd/src/simd/ptr/mut_ptr.rs:160:18
    |
160 |         unsafe { core::intrinsics::simd::simd_with_exposed_provenance(addr) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast

Lastly, there are arm64 runners available for Windows and Ubuntu now. It was too complicated to add to this PR but the macos step could turn into the aarch64 job (adjusting for the darwin-x86 target).
windows-11-arm
ubuntu-24.04-arm
https://github.blog/changelog/2025-08-07-arm64-hosted-runners-for-public-repositories-are-now-generally-available/

@bjorn3
Copy link
Member

bjorn3 commented Oct 1, 2025

When will this be synced to rust-lang/rust?

@calebzulawski
Copy link
Member

I might want to work through the open PRs but I can do it sooner if it's blocking something

@bjorn3
Copy link
Member

bjorn3 commented Oct 1, 2025

Not blocking anything important on my side. Just wanted to know when I could revert a minor workaround in cg_clif's build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples broken on latest nightly
4 participants