https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102404
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Hongtao.liu from comment #5) > (In reply to Freddie Witherden from comment #4) > > Created attachment 51485 [details] > > Clang assembly. > > It seems to be because the current GCC loop vectorizer does not support > different vector sizes, and here the index vector is 256bit. Change > tripcount to 16 successfully generate zmm. Define index type from const int* to const long long * also can generate zmm. .i.e. void intcflux(int _nx, const double* __restrict__ magnl_v, const double* __restrict__ nl_v, double* __restrict__ ul_v, const long long* __restrict__ ul_vix, double* __restrict__ ur_v, const long long* __restrict__ ur_vix) {