]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Make __builtin_lsx_vorn_v and __builtin_lasx_xvorn_v arguments and return...
authorXi Ruoyao <xry111@xry111.site>
Thu, 31 Oct 2024 15:58:23 +0000 (23:58 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 22 Nov 2024 01:42:44 +0000 (09:42 +0800)
commitae7e25662f3f1255786f6bc13428d95b4ace6839
tree12191b697421d86cec296726b5fd02dbe06a25d8
parent8500a8c32b8c67bed757ca87ed1e5a75014c3d73
LoongArch: Make __builtin_lsx_vorn_v and __builtin_lasx_xvorn_v arguments and return values unsigned

Align them with other vector bitwise builtins.

This may break programs directly invoking __builtin_lsx_vorn_v or
__builtin_lasx_xvorn_v, but doing so is not supported (as builtins are
not documented, only intrinsics are documented and users should use them
instead).

gcc/ChangeLog:

* config/loongarch/loongarch-builtins.cc (vorn_v, xvorn_v): Use
unsigned vector modes.
* config/loongarch/lsxintrin.h (__lsx_vorn_v): Cast arguments to
v16u8.
* config/loongarch/lasxintrin.h (__lasx_xvorn_v): Cast arguments
to v32u8.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vector/lsx/lsx-builtin.c (__lsx_vorn_v):
Change arguments and return value to v16u8.
* gcc.target/loongarch/vector/lasx/lasx-builtin.c
(__lasx_xvorn_v): Change arguments and return value to v32u8.
gcc/config/loongarch/lasxintrin.h
gcc/config/loongarch/loongarch-builtins.cc
gcc/config/loongarch/lsxintrin.h
gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-builtin.c
gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-builtin.c