https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65930
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- More "correct" would be to replace the reduction in sum with one using an unsigned int type. Not sure where this kind of transform would fit best, but as it's an enablement for vectorization I suppose the vectorizer should take care of that.