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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> The issue is that we somehow fail to SLP discover the reduction chain.  I
> will have a look to check why.

Reassoc improvements disturb the reduction chain layout.  I have a patch to fix
this, but this of course only handles the case of -fwrapv or unsigned integer
arithmetic because of integer overflow UB.  The vectorizer does not have a way
to turn this into an unsigned reduction chain.  This should be "reasonably"
easy to implement starting from the reduction detection and using the
existing chain linearization and then forcing that into an unsigned
reduction chain.  It's going to be a bit hacky.

I'm going to fix the reassoc issue for now, which I think is a regression even.

Reply via email to