Skip to content

ICE: ../src/librustc_trans/mir/operand.rs:82: impossible case reached while using inline assembly #37437

Closed
@sethdusek

Description

@sethdusek

So I was messing around with inline assembly and sse, when I tried doing this

#![feature(asm)]

fn xor_buf(buf: [u32; 4], buf2: [u32; 4]) {
    let res: [u32; 4];
    unsafe { asm!("
        movaps xmm0, 1
        xorps xmm0, 2
        movaps 1, xmm0":"=r"(res):"a"(buf), "b"(buf):"xmm0":"intel") };
}

And instead of the expected result I got this

error: internal compiler error: ../src/librustc_trans/mir/operand.rs:82: impossible case reached

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:655
note: Run with `RUST_BACKTRACE=1` for a backtrace.

You can run it yourself here https://is.gd/VmN4SF

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inline-assemblyArea: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions