Skip to content

Clean up use of intrinsics where no longer needed#1093

Open
tgross35 wants to merge 5 commits intorust-lang:mainfrom
tgross35:intrinsics-cleanup
Open

Clean up use of intrinsics where no longer needed#1093
tgross35 wants to merge 5 commits intorust-lang:mainfrom
tgross35:intrinsics-cleanup

Conversation

@tgross35
Copy link
Contributor

No description provided.

@tgross35 tgross35 force-pushed the intrinsics-cleanup branch 7 times, most recently from 57b7c6c to b953b0e Compare February 13, 2026 11:12
@rustbot

This comment has been minimized.

These are remnants of historical chkstk implementations that are no
longer relevant, so clean up the imports here.
This feature has been stable for a while.
Replace the use of intrinsics with `core::hint::cold_path` which has
been unstably available for a while, and is on track to become stable in
the next release.
`div!` looks innocuous but is actually unsafe. Replace it with function
calls that require us to actually use `unsafe`, and add the precondition
notes. These can likely be removed completely in the near future.

There is one case in `rem_pio2_large` and one in `exp2` where
preconditions aren't as easy to define, but fortunately it seems like we
are able to just use regular division there without affecting codegen.
@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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.

2 participants