https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98986
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- I agree it makes sense to have the one arm with vec_duplicate first in the canonical order. Problem is that this is deep in the arms, but it can be done of course. Autogenerating part of combine? Nonononono please. Or, what part do you mean? Something in rtx-simplify would make sense, and something in recog would make a *lot* of sense. For the latter, we probably want some more syntax in the machine description, things like % are too restrictive (and that is really only meant for RA). For example, a common pattern is the sum of three things, which has no good way of expressing right now.