Codegen regression of indexing of slice on nightly
Open
@el-ev is already working on this.
Since May 10, 2026.
A-LLVM
C-bug
P-medium
regression-from-stable-to-stable
regression-untriaged
S-has-bisection
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Not sure if it is related with LLVM.
https://godbolt.org/z/vhKoWYxM5
#[inline(never)]
pub fn f_index(data: &mut [u32]) {
for i in 0..data.len() {
data[i] += 1;
}
}
Regression part in LBB0_4:
stable:
mov rax, rsi
and rax, -8
xor ecx, ecx
pcmpeqd xmm0, xmm0
nightly:
movabs rax, 2305843009213693944
and rax, rsi
lea rcx, [4*rsi]
and rcx, -32
xor edx, edx
pcmpeqd xmm0, xmm0
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.
Assessment
This issue has not been assessed yet.