https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44551
--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> --- Created attachment 32915 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32915&action=edit simplify vec_select(vec_concat) A simpler/safer version of the patch linked in comment #12 (untested). It optimizes the example in comment #11, but fails to optimize the original testcase because simplify-rtx operations are only done on single-use operands, and I don't know where in the RTL optimizers we can apply transformations without this constraint.