Skip to content

from_bitmask_vector on big-endian calls simd_select_bitmask with the mask at the wrong end of the byte #379

@RalfJung

Description

@RalfJung

This code, running on big-endian

    let bitmask = u8x4::from_array([0b00001101, 0, 0, 0]);
    assert_eq!(
        mask32x4::from_bitmask_vector(bitmask),
        mask32x4::from_array([true, false, true, true]),
    );

ends up calling simd_select_bitmask with the mask being 0b10110000. I think that's wrong; for simd_bitmask the mask lives in the least-sigificant bits (see #378) so I would expect that simd_select_bitmask should be called with 0b00001011.

This issue is reminiscent of #267.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions