Open
Description
Code
I tried this code:
use std::arch::aarch64::*;
#[no_mangle]
pub unsafe fn half_dup(x: u16) -> uint16x8_t {
vaddq_u16(vreinterpretq_u16_u32(vdupq_n_u32(x as u32)), vdupq_n_u16(1))
}
I expected to see this happen: The compiled output would use the dup
instruction
Instead, this happened: The compiled output uses a bunch of mov
s instead
Version it worked on
It most recently worked on: Rust 1.81.0
Version with regression
rustc --version --verbose
:
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: x86_64-unknown-linux-gnu
release: 1.82.0
LLVM version: 19.1.1
and
rustc 1.87.0-nightly (f280acf4c 2025-02-19)
binary: rustc
commit-hash: f280acf4c743806abbbbcfe65050ac52ec4bdec0
commit-date: 2025-02-19
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0
Metadata
Metadata
Assignees
Labels
Area: SIMD (Single Instruction Multiple Data)Category: An issue highlighting optimization opportunities or PRs implementing suchArmv8-A or later processors in AArch64 modeMedium priorityStatus: A bisection has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.