https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111494

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 60250
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60250&action=edit
patch

OK, so it at least got re-broken when refactoring reduction vectorization to
rely on vectorizable_* for vectorizing the reduction stmt.

So like the attached, generating

  vect__1.10_27 = MEM <vector(4) int> [(int *)vectp_a.8_25];
  vect_sum_6.13_29 = VIEW_CONVERT_EXPR<vector(4) unsigned int>(vect__1.10_27);
  vect_sum_6.13_30 = VIEW_CONVERT_EXPR<vector(4) unsigned
int>(vect_sum_10.11_28);
  vect_sum_6.13_31 = vect_sum_6.13_29 + vect_sum_6.13_30;
  vect_sum_6.12_32 = VIEW_CONVERT_EXPR<vector(4) int>(vect_sum_6.13_31);
  _1 = a[i_12];

but it's a bit of a local hack and it might be better to promote the whole
reduction variable to unsigned.

Reply via email to