about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-18 18:16:31 +0000
committerbors <bors@rust-lang.org>2020-11-18 18:16:31 +0000
commit8d2d0014922e9f541694bfe87642749239990e0e (patch)
treeca8ebb464fe87caa0665186f44cec18e2ba19558 /compiler/rustc_codegen_llvm/src
parent7d747db0d5dd8f08f2efb073e2e77a34553465a7 (diff)
parent43d13e2d584c32b125d61f055e6e7127a77b1d54 (diff)
downloadrust-8d2d0014922e9f541694bfe87642749239990e0e.tar.gz
rust-8d2d0014922e9f541694bfe87642749239990e0e.zip
Auto merge of #79167 - m-ou-se:rollup-4g15apk, r=m-ou-se
Rollup of 11 pull requests

Successful merges:

 - #78361 (Updated the list of white-listed target features for x86)
 - #78785 (linux: try to use libc getrandom to allow interposition)
 - #78999 (stability: More precise location for deprecation lint on macros)
 - #79039 (Tighten the bounds on atomic Ordering in std::sys::unix::weak::Weak)
 - #79079 (Turn top-level comments into module docs in MIR visitor)
 - #79114 (add trailing_zeros and leading_zeros to non zero types)
 - #79131 (Enable AVX512 *epi64 variants by updating stdarch)
 - #79133 (bootstrap: use the same version number for rustc and cargo)
 - #79145 (Fix handling of panic calls)
 - #79151 (Fix typo in `std::io::Write` docs)
 - #79158 (type is too big -> values of the type are too big)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index a8a1646183c..a3139ce5a34 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -129,6 +129,13 @@ pub fn time_trace_profiler_finish(file_name: &str) {
 // WARNING: the features after applying `to_llvm_feature` must be known
 // to LLVM or the feature detection code will walk past the end of the feature
 // array, leading to crashes.
+// To find a list of LLVM's names, check llvm-project/llvm/include/llvm/Support/*TargetParser.def
+// where the * matches the architecture's name
+// Beware to not use the llvm github project for this, but check the git submodule
+// found in src/llvm-project
+// Though note that Rust can also be build with an external precompiled version of LLVM
+// which might lead to failures if the oldest tested / supported LLVM version
+// doesn't yet support the relevant intrinsics
 pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
     let arch = if sess.target.arch == "x86_64" { "x86" } else { &*sess.target.arch };
     match (arch, s) {
@@ -136,6 +143,9 @@ pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
         ("x86", "rdrand") => "rdrnd",
         ("x86", "bmi1") => "bmi",
         ("x86", "cmpxchg16b") => "cx16",
+        ("x86", "avx512vaes") => "vaes",
+        ("x86", "avx512gfni") => "gfni",
+        ("x86", "avx512vpclmulqdq") => "vpclmulqdq",
         ("aarch64", "fp") => "fp-armv8",
         ("aarch64", "fp16") => "fullfp16",
         (_, s) => s,