More improvements to sparc VIS vec_init code generation.
authorDavid S. Miller <davem@gcc.gnu.org>
Sun, 6 Nov 2011 02:39:03 +0000 (19:39 -0700)
committerDavid S. Miller <davem@gcc.gnu.org>
Sun, 6 Nov 2011 02:39:03 +0000 (19:39 -0700)
commit79cad86dca731ab4d8d0ea57e3436a4c7eca224d
tree2b91ab090e2bb20b0d2031ff23deb37131824d0d
parente940f96ffcfe6a80e5c25e49926f1fdf195293a8
More improvements to sparc VIS vec_init code generation.

gcc/

* config/sparc/sparc.md (UNSPEC_SHORT_LOAD): New unspec.
(zero-extend_v8qi_vis, zero_extend_v4hi_vis): New expanders.
(*zero_extend_v8qi_<P:mode>_insn,
*zero_extend_v4hi_<P:mode>_insn): New insns.
* config/sparc/sparc.c (vector_init_move_words,
vector_init_prepare_elts, sparc_expand_vector_init_vis2,
sparc_expand_vector_init_vis1): New functions.
(vector_init_bshuffle): Rewrite to handle more cases and make use
of locs[] array prepared by vector_init_prepare_elts.
(vector_init_fpmerge, vector_init_faligndata): Delete.
(sparc_expand_vector_init): Rewrite using new infrastructure.

gcc/testsuite/

* lib/test-supports.exp
(check_effective_target_ultrasparc_vis2_hw): New proc.
(check_effective_target_ultrasparc_vis3_hw): New proc.
* gcc.target/sparc/vec-init-1.inc: New vector init common code.
* gcc.target/sparc/vec-init-2.inc: Likewise.
* gcc.target/sparc/vec-init-3.inc: Likewise.
* gcc.target/sparc/vec-init-1-vis1.c: New test.
* gcc.target/sparc/vec-init-1-vis2.c: New test.
* gcc.target/sparc/vec-init-1-vis3.c: New test.
* gcc.target/sparc/vec-init-2-vis1.c: New test.
* gcc.target/sparc/vec-init-2-vis2.c: New test.
* gcc.target/sparc/vec-init-2-vis3.c: New test.
* gcc.target/sparc/vec-init-3-vis1.c: New test.
* gcc.target/sparc/vec-init-3-vis2.c: New test.
* gcc.target/sparc/vec-init-3-vis3.c: New test.

From-SVN: r181024
17 files changed:
gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sparc/vec-init-1-vis1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-1-vis2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-1-vis3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-1.inc [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-2-vis1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-2-vis2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-2-vis3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-2.inc [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-3-vis1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-3-vis2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-3-vis3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/vec-init-3.inc [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp