https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116338
Bug ID: 116338 Summary: GCC is not vectoring TSVC s255 while clang can Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kugan at gcc dot gnu.org Target Milestone: --- reduced test case: typedef float real_t; extern __attribute__((aligned(64))) real_t a[32000], b[32000]; void s255() { real_t x, y; x = b[32000 -1]; y = b[32000 -2]; for (int i = 0; i < 32000; i++) { a[i] = (b[i] + x + y) * (real_t).333; y = x; x = b[i]; } } gcc is not able to vectorize the loop whereas clang can. See https://godbolt.org/z/64Kxaahqr gcc -v Using built-in specs. COLLECT_GCC=/home/kvivekananda/install/bin/gcc COLLECT_LTO_WRAPPER=/home/kvivekananda/install/libexec/gcc/aarch64-unknown-linux-gnu/15.0.0/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: ../gcc_base/configure --prefix=/home/kvivekananda/install/ --enable-languages=c,c++,fortran,lto,objc Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240618 (experimental) (GCC)