Skip to content

Clean up use of intrinsics where no longer needed#1093

Merged
tgross35 merged 5 commits intorust-lang:mainfrom
tgross35:intrinsics-cleanup
Feb 20, 2026
Merged

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

Conversation

@tgross35
Copy link
Contributor

@tgross35 tgross35 commented Feb 12, 2026

Details are in the commit messages.

Since running multiple gamma tests is timing out:

ci: skip-extensive

@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.

@rustbot

This comment has been minimized.

@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 20, 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.

@tgross35 tgross35 merged commit 443de67 into rust-lang:main Feb 20, 2026
40 checks passed
@tgross35 tgross35 deleted the intrinsics-cleanup branch February 20, 2026 23:35
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