https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40073
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to alalaw01 from comment #6) > Same problem on AArch64 (at -O3). We've decided the shift is to be done on > integers, widening the arguments and then truncating, before we hit the > vectorizer: This is needed for correctness due to c/c++ promotion rules. > > int i; > short unsigned int _4; > int _5; > int _8; > short unsigned int _9; > int pretmp_18; > unsigned int ivtmp_21; > unsigned int ivtmp_22; > > <bb 2>: > pretmp_18 = (int) j_6(D); > > <bb 3>: > # i_14 = PHI <i_11(4), 0(2)> > # ivtmp_22 = PHI <ivtmp_21(4), 1024(2)> > _4 = b[i_14]; > _5 = (int) _4; > _8 = _5 << pretmp_18; > _9 = (short unsigned int) _8; > a[i_14] = _9; > i_11 = i_14 + 1; > ivtmp_21 = ivtmp_22 - 1; > if (ivtmp_21 == 0)