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

            Bug ID: 105816
           Summary: SLP vectorize permutes from different groups
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

typedef int v4si __attribute__((vector_size(16)));
typedef int v8si __attribute__((vector_size(32)));

void __attribute__((noipa)) test_lo (v8si *dst, v4si src1, v4si src2)
{
  (*dst)[0] = src1[0];
  (*dst)[1] = src1[1];
  (*dst)[2] = src1[2];
  (*dst)[3] = src1[3];
  (*dst)[4] = src2[0];
  (*dst)[5] = src2[1];
  (*dst)[6] = src2[2];
  (*dst)[7] = src2[3];
}

should now be vectorizable but we reject this because we are not able
to split the groups only at the point where it is necessary, merging
them with a permute node.  Instead we fail SLP discovery and rely on
the toplevel logic of splitting the group at the stores.

Reply via email to