Skip to content
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

Fix some SSE and SSE2 tests for Miri #1472

Merged
merged 5 commits into from
Oct 2, 2023
Merged

Conversation

eduardosm
Copy link
Contributor

We are adding stdarch to libstd Miri testing (rust-lang/miri-test-libstd#19).

Some tests required some fixing, while there are other that are simply ignored because it is unlikely that Miri support them in the near future.

For now, only SSE and SSE2 are being considered.

cc @RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2023

r? @Amanieu

(rustbot has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Oct 1, 2023

Can you rebase to fix CI?

Like done in `test_mm_rcp_ps`, but only for the first element.
This overflow was found while testing core_arch with miri
It uses the syn crate to parse the function, so the name can now be extracted without the `find_name` helper.
@eduardosm
Copy link
Contributor Author

Why did this start failing now?

error: `<<` is interpreted as a start of generic arguments for `i8`, not a shift
  --> crates/core_arch/src/arm_shared/neon/shift_and_insert_tests.rs:25:60
   |
25 |             let e = [$(($a as $t & n_bit_mask) | ($b as $t << $n)),*];
   |                                                            ^^ not interpreted as shift
...
33 | test_vsli!(test_vsli_n_s8, i8 => vsli_n_s8([3, -44, 127, -56, 0, 24, -97, 10], [-128, -14, 125, -77, 27, 8, -1, 110], 5));
   | -------------------------------------------------------------------------------------------------------------------------
   | |                                                                                                                     |
   | |                                                                                                                     interpreted as generic arguments
   | in this macro invocation
   |
   = note: this error originates in the macro `test_vsli` (in Nightly builds, run with -Z macro-backtrace for more info)

@Amanieu
Copy link
Member

Amanieu commented Oct 1, 2023

This is probably because something changed in the latest rustc nightly. Hopefully it will get noticed and reverted soon, but otherwise this should be fairly easy to fix.

@eduardosm
Copy link
Contributor Author

It think I figured it out. It is not a change in rustc. It is the change to simd_test in this PR, which causes $t type to be reparsed, which tries to consume the << token as part of the type. I will add the needed parentheses.

@Amanieu Amanieu merged commit 61e13f8 into rust-lang:master Oct 2, 2023
26 checks passed
@eduardosm eduardosm deleted the miri-test branch October 3, 2023 15:33
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