-
Notifications
You must be signed in to change notification settings - Fork 352
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
SIMD instructions are not supported #662
Comments
Miri currently does not support SIMD instructions at all. Let's use this issue to track that (I don't think we have one already). |
@flagello a piece of example code would help. Calling |
If the machine supports them why not? Consider it‘s |
Related: rust-lang/const-eval#7 |
Miri interprets your program, it doesn't run it directly on the hardware. The capabilities of the host machine do not matter.
Because nobody went through the effort of implementing several hundred SIMD intrinsics yet. It's not that we don't want SIMD support, we do, but it's a lot of work. |
Sorry, I wasn‘t clear enough—with “why not” I meant “why shouldn‘t |
Ah. That's a good question indeed. :) Code doing opportunistic SIMD usually relies on |
A quick workaround is of course, #[cfg(not(miri))]
memchr(needle, haystack)
#[cfg(miri)]
haystack.iter().position(|&b| b == needle) |
A little update on this: the issue of supporting SIMD in MIR-based Rust verification tools came up at the Rust Verification Workshop at ETAPS, and there is a lot of interest in finding a shared solution. One avenue we are considering is to have a pure Rust implementation of those intrinsics; tools consuming MIR or LLVM IR should be able to compile that implementation to the required IR and replace intrinsic calls with that IR. |
Miri now supports the intrinsics needed for potable_simd, which I think closes this issue. |
The text was updated successfully, but these errors were encountered: