rs6000: Add vclrlb and vclrrb
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Mon, 11 May 2020 21:09:53 +0000 (16:09 -0500)
committerBill Schmidt <wschmidt@linux.ibm.com>
Mon, 11 May 2020 21:09:53 +0000 (16:09 -0500)
commit25bf7d32c31bb45993a9c81dd01043e77c4a44ed
treec97e5bc9c588f93bcc32b5ffe629ee65eb949abe
parent0e47fe3ab528c1b29305bfd4ac3889703b4fd85c
rs6000: Add vclrlb and vclrrb

Add new vector instructions to clear leftmost and rightmost bytes.

[gcc]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/altivec.h (vec_clrl): New #define.
(vec_clrr): Likewise.
* config/rs6000/altivec.md (UNSPEC_VCLRLB): New constant.
(UNSPEC_VCLRRB): Likewise.
(vclrlb): New insn.
(vclrrb): Likewise.
* config/rs6000/rs6000-builtin.def (__builtin_altivec_vclrlb): New
built-in function.
(__builtin_altivec_vclrrb): Likewise.
(__builtin_vec_clrl): New overloaded built-in function.
(__builtin_vec_clrr): Likewise.
* config/rs6000/rs6000-call.c (altivec_overloaded_builtins):
Define overloaded forms of __builtin_vec_clrl and
__builtin_vec_clrr.
* doc/extend.texi (PowerPC AltiVec Built-in Functions Available
for a Future Architecture): Add descriptions of vec_clrl and
vec_clrr.

[gcc/testsuite]

2020-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/vec-clrl-0.c: New.
* gcc.target/powerpc/vec-clrl-1.c: New.
* gcc.target/powerpc/vec-clrr-0.c: New.
* gcc.target/powerpc/vec-clrr-1.c: New.
15 files changed:
gcc/ChangeLog
gcc/config/rs6000/altivec.h
gcc/config/rs6000/altivec.md
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-call.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/vec-clrl-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrl-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrl-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrl-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrr-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrr-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrr-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vec-clrr-3.c [new file with mode: 0644]