Skip to content

rustc produces SIGILL for _mm_movemask_epi8 on x86_64-uefi #147334

@usamoi

Description

@usamoi

Code

fn f(a: core::arch::x86_64::__m128i) -> i32 {
    unsafe { core::arch::x86_64::_mm_movemask_epi8(a) }
}

fn main() {
    println!("ptr = {:#p}", f as *const ());
}
cargo build --target x86_64-unknown-uefi

Meta

rustc --version --verbose:

rustc 1.90.0 (1159e78c4 2025-09-14)
binary: rustc
commit-hash: 1159e78c4747b02ef996e55082b704c09b970588
commit-date: 2025-09-14
host: x86_64-unknown-linux-gnu
release: 1.90.0
LLVM version: 20.1.8

Error output

error: rustc interrupted by SIGILL, printing backtrace
Backtrace

   Compiling rr v0.1.0 (/usamoi/playground/rr)
error: rustc interrupted by SIGILL, printing backtrace

/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x3c83a9f) [0x7fb67fa83a9f]
/usr/lib/libc.so.6(+0x3e540) [0x7fb67ba3e540]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(+0x914f33b) [0x7fb67af4f33b]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZNK4llvm14TargetLowering21LowerOperationWrapperEPNS_6SDNodeERNS_15SmallVectorImplINS_7SDValueEEERNS_12SelectionDAGE+0x19) [0x7fb67a47d021]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(+0x867b4b8) [0x7fb67a47b4b8]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(+0x88c1664) [0x7fb67a6c1664]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm12SelectionDAG13LegalizeTypesEv+0x33b) [0x7fb679c644fb]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv+0x8d) [0x7fb679c6468d]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE+0x1867) [0x7fb679e3eee7]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE+0x3c4) [0x7fb679e8f7c4]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm22SelectionDAGISelLegacy20runOnMachineFunctionERNS_15MachineFunctionE+0x254) [0x7fb679c32314]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x8f2) [0x7fb679c2dc32]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f) [0x7fb679c2d285]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM.so.20.1-rust-1.90.0-stable(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x2c4) [0x7fb67a1edad8]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x654b5c2) [0x7fb68234b5c2]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x654b137) [0x7fb68234b137]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x654cafe) [0x7fb68234cafe]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_RINvNtNtCscKkwsb9kWaL_3std3sys9backtrace28___rust_begin_short_backtraceNCINvXs0_CsJjGP0MPhtX_18rustc_codegen_llvmNtB1g_18LlvmCodegenBackendNtNtNtCsc5lr08gZmv6_17rustc_codegen_ssa6traits7backend19ExtraBackendMethods18spawn_named_threadNCINvNtNtB2j_4back5write10spawn_workB1N_E0uE0uEB1g_+0x21d) [0x7fb682350925]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x65768c7) [0x7fb6823768c7]
/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x657a7c5) [0x7fb68237a7c5]
/usr/lib/libc.so.6(+0x969cb) [0x7fb67ba969cb]
/usr/lib/libc.so.6(+0x11aa0c) [0x7fb67bb1aa0c]

note: we would appreciate a report at https://github.com/rust-lang/rust
note: backtrace dumped due to SIGILL! resuming signal
error: could not compile `rr` (bin "rr")

Caused by:
  process didn't exit successfully: `/home/usamoi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name rr --edition=2024 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=167 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=80794f4dba326966 -C extra-filename=-70d72ea00939dbc5 --out-dir /usamoi/playground/rr/target/x86_64-unknown-uefi/debug/deps --target x86_64-unknown-uefi -C incremental=/usamoi/playground/rr/target/x86_64-unknown-uefi/debug/incremental -L dependency=/usamoi/playground/rr/target/x86_64-unknown-uefi/debug/deps -L dependency=/usamoi/playground/rr/target/debug/deps` (signal: 4, SIGILL: illegal instruction)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-UEFIUEFIT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions