mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Improve test
This commit is contained in:
@@ -3,10 +3,14 @@
|
||||
//@compile-flags: -C target-cpu=x86-64-v4
|
||||
|
||||
fn main() {
|
||||
assert!(cfg!(target_feature = "avx2"));
|
||||
assert!(cfg!(target_feature = "avx512bw"));
|
||||
assert!(cfg!(target_feature = "avx512cd"));
|
||||
assert!(cfg!(target_feature = "avx512dq"));
|
||||
assert!(cfg!(target_feature = "avx512f"));
|
||||
assert!(cfg!(target_feature = "avx512vl"));
|
||||
assert!(is_x86_feature_detected!("avx512bw"));
|
||||
assert!(is_x86_feature_detected!("avx512cd"));
|
||||
assert!(is_x86_feature_detected!("avx512dq"));
|
||||
assert!(is_x86_feature_detected!("avx512f"));
|
||||
assert!(is_x86_feature_detected!("avx512vl"));
|
||||
|
||||
assert!(cfg!(not(target_feature = "avx512vpopcntdq")));
|
||||
assert!(!is_x86_feature_detected!("avx512vpopcntdq"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user