Skip to content

simd sse2: si128/pd casts emitting conversions #55249

Closed
rust-lang/stdarch
#581
@kazcw

Description

@kazcw

_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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-SIMDArea: SIMD (Single Instruction Multiple Data)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions