https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65930
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42730|0 |1 is obsolete| | --- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 46875 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46875&action=edit prototype So here's a patch that can vectorize the testcase. Preparatory cleanup would be moving almost all validity checks from force_simple_reduction to vectorizable_reduction plus storing the core reduction operation (to be used in the epilogue then) from the SCC detection somewhere, not relying on the stmt_info code of the stmt feeding the PHI backedge in vectorizable_reduction (in fact on the forceslp branch that stmt gets vectorized as if being an internal_def, the epilogue is created because its def is "live").