Skip to content

[SLP] gcc generate better code than clang base on stride offset #57278

@vfdff

Description

@vfdff
void foo ( float *restrict  fi, real *restrict  f, int ci) {
  
    /* Add accumulated i-forces to the force array */
    for (int i = 0; i < UNROLLI; i++) {
         for (int d = 0; d < DIM; d++) {
             f[(ci*UNROLLI+i)*F_STRIDE+d] += fi[i*FI_STRIDE+d];
         }
    }

  return;
}
  • gcc: SLP
  • llvm: unroll

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:AArch64enhancementImproving things as opposed to bug fixing, e.g. new or missing featurellvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions