]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000, add testcases to the overloaded vec_perm built-in
authorCarl Love <cel@linux.ibm.com>
Wed, 31 Jul 2024 20:31:34 +0000 (16:31 -0400)
committerCarl Love <cel@linux.ibm.com>
Fri, 17 Jan 2025 15:57:37 +0000 (09:57 -0600)
commitbc5753332649c5bcb31cbf6763207d8a9495b77b
tree388d3c625bbc6e00d15aa922c87b81b07f85b0d5
parent5d779765b0123cc64c1e6af2656a20979ecaaf96
rs6000, add testcases to the overloaded vec_perm built-in

The overloaded vec_perm built-in supports permuting signed and unsigned
vectors of char, bool char, short int, short bool, int, bool, long long
int, long long bool, int128, float and double.  However, not all of the
supported arguments are included in the test cases.  This patch adds
the missing test cases.

Additionally, in the 128-bit debug print statements the expected result and
the result need to be cast to unsigned long long to print correctly.  The
patch makes this additional change to the print statements.

gcc/ChangeLog:
* doc/extend.texi: Fix spelling mistake in description of the
vec_sel built-in.  Add documentation of the 128-bit vec_perm
instance.

gcc/testsuite/ChangeLog:
* gcc.target/powerpc/vsx-builtin-3.c: Add vec_perm test cases for
arguments of type vector signed long long int, long long bool,
bool, bool short, bool char and pixel, vector unsigned long long
int, unsigned int, unsigned short int, unsigned char.  Cast
arguments for debug prints to unsigned long long.
* gcc.target/powerpc/builtins-4-int128-runnable.c: Add vec_perm
test cases for signed and unsigned int128 arguments.
gcc/doc/extend.texi
gcc/testsuite/gcc.target/powerpc/builtins-4-int128-runnable.c
gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c