https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96208
Bug ID: 96208 Summary: non-power-of-2 group size can be vectorized for 2-element vectors case Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dpochepk at gmail dot com Target Milestone: --- Created attachment 48879 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48879&action=edit initial implementation Current loop vectorizer only vectorize loops with groups size being power-of-2 or 3 due to vector permutation generation algorithm specifics. However, in case of 2-element vectors, simple permutation schema can be used to support any group size: insert each vector element into required position, which leads to reasonable amount of operations in case of 2-element vectors. Initial version is attached.