Skip to content

Verify that all intrinsics have a run-time test #799

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

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Aug 17, 2019

Add a check to stdsimd-verify to check that all intrinsics have a run-time test. This is not the case right now, but we should at least not add intrinsics without tests.

@gnzlbg gnzlbg requested a review from alexcrichton August 17, 2019 19:16
@rust-highfive
Copy link

@gnzlbg: no appropriate reviewer found, use r? to override

for mut item in file.items.drain(..) {
match item {
syn::Item::Fn(f) => functions.push((f, path)),
syn::Item::Mod(ref mut m) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stdsimd-verify did not scan for function items within inline modules (mod { ... }) - since tests are inside a mod tests { ... } this is required to add them.

@@ -3437,7 +3437,7 @@ mod tests {
}

#[simd_test(enable = "sse")]
pub unsafe fn test_mm_cvtsi32_ss() {
unsafe fn test_mm_cvtsi32_ss() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were pub items for some reason and the check errored that they also needed tests..

if !rust.has_test {
// FIXME: this list should be almost empty
let skip = [
"__readeflags",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to make this list smaller over time. It might well be that some of these are already tested in other tests, or that the test names have typos or similar.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Aug 18, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 18, 2019

📌 Commit f9326bb has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Aug 18, 2019

⌛ Testing commit f9326bb with merge c1cc6e2...

bors added a commit that referenced this pull request Aug 18, 2019
Verify that all intrinsics have a run-time test

Add a check to stdsimd-verify to check that all intrinsics have a run-time test. This is not the case right now, but we should at least not add intrinsics without tests.
@bors
Copy link
Contributor

bors commented Aug 18, 2019

☀️ Test successful - checks-cirrus-freebsd, status-azure
Approved by: gnzlbg
Pushing c1cc6e2 to master...

@bors bors merged commit f9326bb into rust-lang:master Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants