about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-03-15 22:09:05 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2024-03-17 11:59:18 -0700
commit7d537106a192d6a06ccbbb809583e4a52b1ee353 (patch)
tree1f0b783a0a919d10eaa61257a0844d98743b8384 /compiler/rustc_span/src
parentfd27e8745f0f04dc7c289893ef54a618c7c9e1da (diff)
downloadrust-7d537106a192d6a06ccbbb809583e4a52b1ee353.tar.gz
rust-7d537106a192d6a06ccbbb809583e4a52b1ee353.zip
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.

So introduce a new `typed_swap` intrinsic with a fallback body, but replace that implementation for immediates and scalar pairs.
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 7de0555bb22..f1e68b0a1f8 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -1830,6 +1830,7 @@ symbols! {
         type_macros,
         type_name,
         type_privacy_lints,
+        typed_swap,
         u128,
         u128_legacy_const_max,
         u128_legacy_const_min,