Skip to content

"rustc-LLVM ERROR" when using _mm_cvttps_epi32 on x86_64-unknown-none #133707

Open
@eduardosm

Description

I tried this code:

#![no_std]

use core::arch::x86_64::*;

pub unsafe fn func() -> __m128i {
    _mm_cvttps_epi32(_mm_setzero_ps())
}

It builds fine on x86_64-unknown-linux-gnu, but fails on x86_64-unknown-none:

rustc-LLVM ERROR: Do not know how to split the result of this operator!

Adding #[target_feature(enable = "sse2")] or using -C target-feature=+sse2 does not prevent the error.

Meta

rustc --version --verbose:

rustc 1.85.0-nightly (7442931d4 2024-11-30)
binary: rustc
commit-hash: 7442931d49b199ad0a1cc0f8ca54e327b5139b66
commit-date: 2024-11-30
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.4

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.O-x86_64Target: x86-64 processors (like x86_64-*)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions