Skip to content

Codegen regression of indexing of slice on nightly #149673

@CrazyboyQCD

Description

@CrazyboyQCD

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions