about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-18 07:26:15 +0000
committerbors <bors@rust-lang.org>2024-04-18 07:26:15 +0000
commitecd45472f800ee946e23cd68361f4ce5ccaf9433 (patch)
treef3286483d996cd2e04f5314d3e4045d16636679e /compiler/rustc_codegen_llvm/src
parentb1248bc60da40f03c91f3f7135e964d8e6626d4c (diff)
parent5543da9aec9088931786431025c3d10f56e07727 (diff)
downloadrust-ecd45472f800ee946e23cd68361f4ce5ccaf9433.tar.gz
rust-ecd45472f800ee946e23cd68361f4ce5ccaf9433.zip
Auto merge of #124111 - matthiaskrgr:rollup-cmmkryf, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #124041 (Fix copy path button)
 - #124047 (Match ergonomics 2024: miscellaneous code cleanups)
 - #124064 (Move confusing comment about otherwise blocks in `lower_match_tree`)
 - #124090 (llvm: update riscv target feature to match LLVM 19)
 - #124100 (fix: make `str::from_raw_parts_mut` `mut`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index c9e62e504ae..5552b381025 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -270,9 +270,10 @@ pub fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> LLVMFeature<'a> {
             "sve2-bitperm",
             TargetFeatureFoldStrength::EnableOnly("neon"),
         ),
-        // The unaligned-scalar-mem feature was renamed to fast-unaligned-access.
-        ("riscv32" | "riscv64", "fast-unaligned-access") if get_version().0 <= 17 => {
-            LLVMFeature::new("unaligned-scalar-mem")
+        // In LLVM 18, `unaligned-scalar-mem` was merged with `unaligned-vector-mem` into a single feature called
+        // `fast-unaligned-access`. In LLVM 19, it was split back out.
+        ("riscv32" | "riscv64", "unaligned-scalar-mem") if get_version().0 == 18 => {
+            LLVMFeature::new("fast-unaligned-access")
         }
         // For LLVM 18, enable the evex512 target feature if a avx512 target feature is enabled.
         ("x86", s) if get_version().0 >= 18 && s.starts_with("avx512") => {