On Tue, 25 Jul 2017, Matthew Fortune wrote: > Jakub Jelinek <ja...@redhat.com> writes: > > Bootstrapped/regtested on x86_64-linux and i686-linux, where it improves > > e.g. the code generation for slp-43.c and slp-45.c testcases. > > make cc1 tested in cross-compilers to the remaining targets. > > No objections for the MIPS part. I've pointed out this change to Sameera to > see how/if it will affect her autovectorization branch and whether MIPS MSA > should define more forms of vec_init/vec_expand in general.
Note the vectorizer will try both variants (punning via integer mode and vector element) so the change is mostly to get around having very large integer modes like OImode of AVX512 halves or even larger ones for ARM SVE. You should only need to have matching component mode vector part inits/extracts (and all vector modes are power-of-two size). Thus for V8SI have V4SI, V2SI and SI components for init/extracts. If those are not available the vectorizer will try to pun V8SI to V2TI and to TImode init/extract or V4DI with DImode, etc. (that's what the bulk conversion of targets besides x86 should provide). Richard.