"rustc-LLVM ERROR" when using `_mm_cvttps_epi32` on x86_64-unknown-none
Open
Nobody has claimed this yet.
A-target-feature
C-bug
O-x86_64
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Rust reproducer in the issue and compare compilation for x86_64-unknown-linux-gnu versus x86_64-unknown-none, with and without SSE2 enabled. Trace the LLVM failure for _mm_cvttps_epi32 on the none target; done means the reproducer compiles without the rustc-LLVM error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100