rs6000.c (rs6000_gimple_builtin): Add gimple folding support for merge[hl].
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 17 Jan 2018 19:41:02 +0000 (19:41 +0000)
committerWill Schmidt <willschm@gcc.gnu.org>
Wed, 17 Jan 2018 19:41:02 +0000 (19:41 +0000)
commit355bae9212511c65172f1474f7905cfc669b8963
tree85c75ad33a264205a0ca1e8077c3a304fcf6c295
parent2d509539dbc127b44a6b1d7b52057f4fe2dc7e87
rs6000.c (rs6000_gimple_builtin): Add gimple folding support for merge[hl].

[gcc]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
support for merge[hl].
(fold_mergehl_helper): New helper function.
(tree-vector-builder.h): New #include for tree_vector_builder usage.
* config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
(altivec_vmrglw_direct): Add xxmrglw insn.

[testsuite]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-mergehl-char.c: New.
* gcc.target/powerpc/fold-vec-mergehl-double.c: New.
* gcc.target/powerpc/fold-vec-mergehl-float.c: New.
* gcc.target/powerpc/fold-vec-mergehl-int.c: New.
* gcc.target/powerpc/fold-vec-mergehl-longlong.c: New.
* gcc.target/powerpc/fold-vec-mergehl-pixel.c: New.
* gcc.target/powerpc/fold-vec-mergehl-short.c: New.
* gcc.target/powerpc/builtins-1-be.c: Disable gimple-folding.
* gcc.target/powerpc/builtins-1-le.c: Disable gimple-folding.
* gcc.target/powerpc/builtins-1-be-folded.c: New.
* gcc.target/powerpc/builtins-1-le-folded.c: New.
* gcc.target/powerpc/builtins-1.fold.h: New.

From-SVN: r256814
gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/builtins-1-be.c
gcc/testsuite/gcc.target/powerpc/builtins-1-le.c