Enable AArch64 processor feature detection unconditionally (#4034)

std::arch::is_aarch64_feature_detected!() is now part of stable
Rust, so we can always use it.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Anton Kirilov
2022-04-28 15:27:32 +01:00
committed by GitHub
parent b69fede72f
commit a1e4b4b521
4 changed files with 43 additions and 18 deletions

View File

@@ -702,7 +702,7 @@ impl<'a> Arbitrary<'a> for CodegenSettings {
// print a warning and return an error because this fuzz
// input must be discarded.
#[cfg(target_arch = $arch)]
if enable && !std::$test!($std) {
if enable && !std::arch::$test!($std) {
log::warn!("want to enable clif `{}` but host doesn't support it",
$clif);
return Err(arbitrary::Error::EmptyChoose)
@@ -752,6 +752,11 @@ impl<'a> Arbitrary<'a> for CodegenSettings {
std:"avx512vl" => clif:"has_avx512vl" ratio: 1 in 1000,
std:"avx512vbmi" => clif:"has_avx512vbmi" ratio: 1 in 1000,
},
"aarch64" => {
test: is_aarch64_feature_detected,
std: "lse" => clif: "has_lse",
},
};
return Ok(CodegenSettings::Target {
target: target_lexicon::Triple::host().to_string(),