https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119181
--- Comment #3 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- void foo (int* a, int* __restrict b) { b[0] = a[0] * a[256]; b[1] = a[257] * a[1]; b[2] = a[2] * a[258]; b[3] = a[259] * a[3]; b[4] = a[260] * a[4]; b[5] = a[261] * a[5]; b[6] = a[6] * a[262]; b[7] = a[7] * a[263]; } void foo1 (int* a, int* __restrict b) b[0] = a[0] * a[256]; b[1] = a[1] * a[257]; b[2] = a[2] * a[258]; b[3] = a[3] * a[259]; b[4] = a[4] * a[260]; b[5] = a[5] * a[261]; b[6] = a[6] * a[262]; b[7] = a[7] * a[263]; } Use int instead of double. Looks like if both operands satisfy same STMT_VINFO_GROUPED_ACCESS as first stmt, we'd better have a heuristic to choose more closer one? in vect_build_slp_tree_1 1360 || (ldst_p 1361 && (STMT_VINFO_GROUPED_ACCESS (stmt_info) 1362 != STMT_VINFO_GROUPED_ACCESS (first_stmt_info))) 1363 || (ldst_p