-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Use an explicit x86-64 cpu in tests that are sensitive to it #124597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//@ only-x86_64 | ||
//@ compile-flags: -C target-cpu=x86-64 | ||
|
||
#![feature(avx512_target_feature)] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//@ only-x86_64 | ||
//@ compile-flags: -C target-cpu=x86-64 | ||
|
||
#![feature(target_feature_11)] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,6 @@ fn main() { | |
"SSE2 was not detected as available on an x86 platform"); | ||
} | ||
// check a negative case too -- allowed on x86, but not enabled by default | ||
assert!(cfg!(not(target_feature = "avx2")), | ||
"AVX2 shouldn't be detected as available by default on any platform"); | ||
assert!(cfg!(not(target_feature = "avx512f")), | ||
"AVX512 shouldn't be detected as available by default on any platform"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, if we add a v4 platform this is not the case... why not name a really outlandish target feature, like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, although I wonder, does this need to be a real feature at all? This test runs on non-x86 targets too, and it seems not to mind if I put something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put in my silly one, but I can switch to your deprecated feature if preferred for some reason. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No that's great. :3 |
||
} |
Uh oh!
There was an error while loading. Please reload this page.