Skip to content

Miri ICEs on non-power-of-2 non-packed SIMD vectors #3458

@RalfJung

Description

@RalfJung
#![feature(core_intrinsics)]
#![feature(repr_simd)]

use core::intrinsics::simd::*;

#[repr(simd)]
struct Simd<T, const N: usize>(pub [T; N]);

fn main() { unsafe {
    let v1 = Simd([1u32; 3]);
    let v2 = Simd([2u32; 3]);
    let v3 = simd_add(v1, v2);
    assert_eq!(v3.0, [3u32; 3]);
} }

Cc rust-lang/portable-simd#319

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-shimsArea: This affects the external function shimsC-bugCategory: This is a bug.I-ICEImpact: makes Miri crash with some ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions