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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
To say that - we expect the backends to output the optimal sequence for each
permute.  The limit is that for a series of permutes this doesn't consider
the case where there might be more "complex" permutes that through sharing
common parts would be cheaper overall.

Given the "magic" is all in the backends there's no good way to implement
a generic "global" optimization for this.

One baby-step towards this would be to have a can_vec_perm_const that
fails when the permute requires more than one "sub-"permute on the target
or even better, give back the series of "sub-"permutes that would be
performed in a symbolic way.

But it's possibly "easier" to scrape the .mds for define_insns that
implement vector permutations.

Reply via email to