Skip to content

Commit

Permalink
Auto merge of #122582 - scottmcm:swap-intrinsic-v2, r=oli-obk
Browse files Browse the repository at this point in the history
Let codegen decide when to `mem::swap` with immediates

Making `libcore` decide this is silly; the backend has so much better information about when it's a good idea.

Thus this PR introduces a new `typed_swap` intrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs.

r? oli-obk

Replaces #111744, and means we'll never need more libs PRs like #111803 or #107140
  • Loading branch information
bors committed Mar 23, 2024
2 parents 227707e + c7cedbe commit 5ab6687
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 5ab6687

Please sign in to comment.