diff options
| author | bors <bors@rust-lang.org> | 2024-09-18 21:51:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-18 21:51:55 +0000 |
| commit | a5cf8bbd4e1c8edeae08778c85c6f806dd00e853 (patch) | |
| tree | bd0cbc3bba1ab0d481523def8b8fdbec647dd674 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | f79a912d9edc3ad4db910c0e93672ed5c65133fa (diff) | |
| parent | 4bd9de55127318bd21fa4584c5f3cb2d24f21bc6 (diff) | |
| download | rust-a5cf8bbd4e1c8edeae08778c85c6f806dd00e853.tar.gz rust-a5cf8bbd4e1c8edeae08778c85c6f806dd00e853.zip | |
Auto merge of #130534 - workingjubilee:rollup-furaug4, r=workingjubilee
Rollup of 9 pull requests
Successful merges:
- #97524 (Add `Thread::{into_raw, from_raw}`)
- #127988 (Do not ICE with incorrect empty suggestion)
- #129422 (Gate `repr(Rust)` correctly on non-ADT items)
- #129934 (Win: Open dir for sync access in remove_dir_all)
- #130450 (Reduce confusion about `make_indirect_byval` by renaming it)
- #130476 (Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`)
- #130487 (Update the minimum external LLVM to 18)
- #130513 (Clarify docs for std::fs::File::write)
- #130522 ([Clippy] Swap `manual_retain` to use diagnostic items instead of paths)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 29afe6f6bfc..358bfcb1573 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -258,28 +258,14 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea ("aarch64", "fhm") => Some(LLVMFeature::new("fp16fml")), ("aarch64", "fp16") => Some(LLVMFeature::new("fullfp16")), // Filter out features that are not supported by the current LLVM version - ("aarch64", "faminmax") if get_version().0 < 18 => None, - ("aarch64", "fp8") if get_version().0 < 18 => None, - ("aarch64", "fp8dot2") if get_version().0 < 18 => None, - ("aarch64", "fp8dot4") if get_version().0 < 18 => None, - ("aarch64", "fp8fma") if get_version().0 < 18 => None, ("aarch64", "fpmr") if get_version().0 != 18 => None, - ("aarch64", "lut") if get_version().0 < 18 => None, - ("aarch64", "sme-f8f16") if get_version().0 < 18 => None, - ("aarch64", "sme-f8f32") if get_version().0 < 18 => None, - ("aarch64", "sme-fa64") if get_version().0 < 18 => None, - ("aarch64", "sme-lutv2") if get_version().0 < 18 => None, - ("aarch64", "ssve-fp8dot2") if get_version().0 < 18 => None, - ("aarch64", "ssve-fp8dot4") if get_version().0 < 18 => None, - ("aarch64", "ssve-fp8fma") if get_version().0 < 18 => None, - ("aarch64", "v9.5a") if get_version().0 < 18 => None, // 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 => { Some(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") => { + // Enable the evex512 target feature if an avx512 target feature is enabled. + ("x86", s) if s.starts_with("avx512") => { Some(LLVMFeature::with_dependency(s, TargetFeatureFoldStrength::EnableOnly("evex512"))) } (_, s) => Some(LLVMFeature::new(s)), @@ -587,7 +573,6 @@ pub(crate) fn global_llvm_features( // -Ctarget-features if !only_base_features { let supported_features = sess.target.supported_target_features(); - let (llvm_major, _, _) = get_version(); let mut featsmap = FxHashMap::default(); // insert implied features @@ -664,12 +649,6 @@ pub(crate) fn global_llvm_features( return None; } - // if the target-feature is "backchain" and LLVM version is greater than 18 - // then we also need to add "+backchain" to the target-features attribute. - // otherwise, we will only add the naked `backchain` attribute to the attribute-group. - if feature == "backchain" && llvm_major < 18 { - return None; - } // ... otherwise though we run through `to_llvm_features` when // passing requests down to LLVM. This means that all in-language // features also work on the command line instead of having two |
