rs6000-c.c (altivec_overloaded_builtins): Add __builtin_vec_revb builtins.
authorMichael Meissner <meissner@linux.vnet.ibm.com>
Wed, 18 Jan 2017 19:30:38 +0000 (19:30 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Wed, 18 Jan 2017 19:30:38 +0000 (19:30 +0000)
commitb7d3a6a6b26c6992900a4a6d87bb4d92b1590474
treee8ae6a83c5e3e3261be4c189b435bf24d9dabf51
parentc484627cf619d93610d2c9dca6950c9e70a65cf3
rs6000-c.c (altivec_overloaded_builtins): Add __builtin_vec_revb builtins.

[gcc]
2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
__builtin_vec_revb builtins.
* config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
built-in functions to support generation of the ISA 3.0 XXBR<x>
vector byte reverse instructions.
(P9V_BUILTIN_XXBRQ_V1TI): Likewise.
(P9V_BUILTIN_XXBRD_V2DI): Likewise.
(P9V_BUILTIN_XXBRD_V2DF): Likewise.
(P9V_BUILTIN_XXBGW_V4SI): Likewise.
(P9V_BUILTIN_XXBGW_V4SF): Likewise.
(P9V_BUILTIN_XXBGH_V8HI): Likewise.
(P9V_BUILTIN_VEC_REVB): Likewise.
* config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
(p9_xxbrq_v16qi): Likewise.
(p9_xxbrd_<mode>, VSX_D iterator): Likewise.
(p9_xxbrw_<mode>, VSX_W iterator): Likewise.
(p9_xxbrh_v8hi): Likewise.
* config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
* doc/extend.texi (RS/6000 Altivec Built-ins): Document the
vec_revb built-in functions.

[gcc/testsuite]
2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/p9-xxbr-1.c: New test.
* gcc.target/powerpc/p9-xxbr-2.c: Likewise.

From-SVN: r244593
gcc/ChangeLog
gcc/config/rs6000/altivec.h
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/vsx.md
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/p9-xxbr-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/p9-xxbr-2.c [new file with mode: 0644]