The second patch you've seen before, updated with your comments. The rest came from trying to reduce the number of tests failing to be vectorized when compiling for Loongson. Eventually I just had to stop though; the result is still quite a few pattern match tests fail, but at least there are no execution failures w/ my version of QEMU hacked up to support Loongson.
Someone with more time will need to examine the failing pattern matches and determine what's missing causing the vectorization to fail. Then either add the missing rtl patterns or adjust the testsuite appropriately. Certainly the result, post elimination of VEC_INTERLEAVE_*_EXPR, will be a strict improvement. r~ Richard Henderson (10): mips: Allow mode changes between integrals in FP registers. mips: Implement vec_perm_const. mips: Implement logical operations on vectors for Loongson. mips: Support even-odd permutation for Loongson V8QImode. mips: Support vec_unpack[su] for Loongson. mips: Improve support for vec_init. mips: Fix some insn types for Loongson. mips: Add sdot_prodv4hi for Loongson. mips: Add reduction support for Loongson. mips: Add reduction patterns for paired-single gcc/config/mips/loongson.h | 4 +- gcc/config/mips/loongson.md | 570 ++++++++++++++++++++++++++++++----- gcc/config/mips/mips-modes.def | 12 +- gcc/config/mips/mips-protos.h | 5 + gcc/config/mips/mips-ps-3d.md | 265 ++++++++++++----- gcc/config/mips/mips.c | 646 +++++++++++++++++++++++++++++++++++++-- gcc/config/mips/predicates.md | 11 +- 7 files changed, 1324 insertions(+), 189 deletions(-) -- 1.7.7.4