-
Notifications
You must be signed in to change notification settings - Fork 13.4k
simd sse2: si128/pd casts emitting conversions #55249
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-SIMD
Area: SIMD (Single Instruction Multiple Data)
Comments
Thanks for the report! On inspection I wonder if the implementation in stdsimd is simply not right for these intrinsics? It should likely be a simple fix for them in theory! |
My first libstd PR! |
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 23, 2018
Update stdsimd submodule Fixes a SSE2 bug. (rust-lang#55249)
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 25, 2018
Update stdsimd submodule Fixes a SSE2 bug. (rust-lang#55249)
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 25, 2018
Update stdsimd submodule Fixes a SSE2 bug. (rust-lang#55249)
marysaka
pushed a commit
to sunriseos/rust
that referenced
this issue
Oct 20, 2019
* fix _mm_castsi128_pd and _mm_castpd_si128 impls The _mm_castX_Y SSE intrinsics are "reinterpreting" casts; LLVM's simd_cast is a "converting" cast. Replace simd_cast with mem::transmute. Fixes rust-lang#55249 * Temporarily pin CI * Fix i686 segfaults * Fix wasm CI Output of `wasm2wat` has changed! * Fix AppVeyor with an older nightly
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
_mm_castsi128_pd and _mm_castpd_si128 should be no-op transmutes (as the corresponding intrinsics are in C), but they're emitting some kind of conversion involving cvtsi2sdq and cvttsd2si (respectively) that gives the wrong result. As a workaround I'm currently using mem::transmute to cast between __m128i and __m128d.
Documentation that these casts shouldn't do any conversion: https://msdn.microsoft.com/en-us/library/bb531385(v=vs.120).aspx
Demo of output with conversions: https://rust.godbolt.org/z/p1zG4C
(pinging simd tracker: #27731).
The text was updated successfully, but these errors were encountered: