rs6000: Fix arguments for __builtin_altivec_tr_stxvrwx, __builtin_altivec_tr_stxvrhx
commit957798e44e7194f7b6a67b19f85ff72eab9a0d0e
authorCarl Love <cel@us.ibm.com>
Fri, 2 Jun 2023 15:11:12 +0000 (2 11:11 -0400)
committerCarl Love <cel@us.ibm.com>
Fri, 2 Jun 2023 15:11:12 +0000 (2 11:11 -0400)
tree6d0336364c50ef679324a2dd8727ee012654e7c0
parent4d935f52b0d5c00fcc154461b87415ebd8791a94
rs6000: Fix arguments for __builtin_altivec_tr_stxvrwx, __builtin_altivec_tr_stxvrhx

The third argument for __builtin_altivec_tr_stxvrhx should be short *
not int *.  Similarly, the third argument for __builtin_altivec_tr_stxvrwx
should be int * not short *.  This patch fixes the arguments in the two
builtins.

A runnable test case is added to test the __builtin_altivec_tr_stxvrbx,
__builtin_altivec_tr_stxvrhx, __builtin_altivec_tr_stxvrwx and
__builtin_altivec_tr_stxvrdx builtins.

gcc/
* config/rs6000/rs6000-builtins.def (__builtin_altivec_tr_stxvrhx,
__builtin_altivec_tr_stxvrwx): Fix type of third argument.

gcc/testsuite/
* gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c: New test
for __builtin_altivec_tr_stxvrbx, __builtin_altivec_tr_stxvrhx,
__builtin_altivec_tr_stxvrwx, __builtin_altivec_tr_stxvrdx.
gcc/config/rs6000/rs6000-builtins.def
gcc/testsuite/gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c [new file with mode: 0644]