diff options
| author | bors <bors@rust-lang.org> | 2017-11-16 15:32:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-16 15:32:13 +0000 |
| commit | 481b42b50745d433c5bcfd90e7a03a4b9110a677 (patch) | |
| tree | 1efdedad4db1507dbd8eaaa8bffa8abd8492038a | |
| parent | c81f201d48c4f25d32f8b0f76103c9f794d37851 (diff) | |
| parent | d3563bb6a2599a6e4d8df33b55be08fe0389beb0 (diff) | |
| download | rust-481b42b50745d433c5bcfd90e7a03a4b9110a677.tar.gz rust-481b42b50745d433c5bcfd90e7a03a4b9110a677.zip | |
Auto merge of #45528 - alexcrichton:avx512, r=arielb1
rustc: Add some more compatibility with AVX-512 * Increase the maximum vector size in the ABI calculations to ensure that AVX-512 operands are immediates. * Add a few more `target_feature` matchings for AVX-512 features
| -rw-r--r-- | src/librustc_trans/cabi_x86_64.rs | 4 | ||||
| -rw-r--r-- | src/librustc_trans/llvm_util.rs | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc_trans/cabi_x86_64.rs b/src/librustc_trans/cabi_x86_64.rs index 2cfab7df8b3..a814f458e12 100644 --- a/src/librustc_trans/cabi_x86_64.rs +++ b/src/librustc_trans/cabi_x86_64.rs @@ -27,8 +27,8 @@ enum Class { #[derive(Clone, Copy, Debug)] struct Memory; -// Currently supported vector size (AVX). -const LARGEST_VECTOR_SIZE: usize = 256; +// Currently supported vector size (AVX-512). +const LARGEST_VECTOR_SIZE: usize = 512; const MAX_EIGHTBYTES: usize = LARGEST_VECTOR_SIZE / 64; fn classify_arg<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &ArgType<'tcx>) diff --git a/src/librustc_trans/llvm_util.rs b/src/librustc_trans/llvm_util.rs index b91638a8d14..68e05d43044 100644 --- a/src/librustc_trans/llvm_util.rs +++ b/src/librustc_trans/llvm_util.rs @@ -80,7 +80,12 @@ const X86_WHITELIST: &'static [&'static str] = &["avx\0", "avx2\0", "bmi\0", "bm "ssse3\0", "tbm\0", "lzcnt\0", "popcnt\0", "sse4a\0", "rdrnd\0", "rdseed\0", "fma\0", "xsave\0", "xsaveopt\0", "xsavec\0", - "xsaves\0"]; + "xsaves\0", + "avx512bw\0", "avx512cd\0", + "avx512dq\0", "avx512er\0", + "avx512f\0", "avx512ifma\0", + "avx512pf\0", "avx512vbmi\0", + "avx512vl\0", "avx512vpopcntdq\0"]; const HEXAGON_WHITELIST: &'static [&'static str] = &["hvx\0", "hvx-double\0"]; |
