http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52607
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-27 17:10:00 UTC --- Thanks for working on this. I don't like much the calls to ix86_expand_vec_perm_const_1, if you are looking for exactly two insn permutations, then really the two insn permutation functions should be groupped together into expand_vec_perm_2 and you should call that instead, or if it is 1 or 2, then expand_vec_perm_1 || expand_vec_perm_2. expand_vec_perm_vperm2f128_merge has probably swapped the meaning of dfirst and dsecond permutations when it first performs the dsecond permutation. Lastly for each routine it is desirable to think whether it might be useful for other vector modes (likely 32-byte only) for TARGET_AVX2.