On Sat, 2024-11-02 at 16:38 +0800, Xi Ruoyao wrote: > The patch at [1] changes these builtins to accept unsigned vector > arguments to be consistent with other LSX/LASX bitwise builtins, but > there's some concern about the backward compatibility. Make use of the > existing built-in function overloading mechanism to provide the backward > compatibility. > > Depends on [1]. > > [1]:https://gcc.gnu.org/pipermail/gcc-patches/2024-October/667065.html > > gcc/ChangeLog: > > * config/loongarch/loongarch-protos.h > (loongarch_register_pragmas): New function prototype. > (loongarch_resolve_overloaded_builtin_decl): Likewise. > * config/loongarch/loongarch-builtins.cc > (__builtin_lsx_vorn_v_signed): New built-in function intended > for internal use. > (__builtin_lasx_xvorn_v_signed): Likewise. > (loongarch_resolve_overloaded_builtin_decl): Implement, return > the decl of __builtin_lsx_vorn_v_signed or > __builtin_lasx_xvorn_v_signed or __builtin_lsx_vorn_v or > __builtin_lasx_xvorn_v calls with signed operands. > * config/loongarch/loongarch-c.cc (loongarch_register_pragmas): > Implement, register the target hook > loongarch_resolve_overloaded_builtin for C-family frontends. > (loongarch_resolve_overloaded_builtin): New static function, > implementing targetm.resolve_overloaded_builtin. > * config/loongarch/loongarch.h (REGISTER_TARGET_PRAGMAS): > Define as loongarch_register_pragmas. > > gcc/testsuite/ChangeLog: > > * gcc.target/loongarch/vorn-signed-backward.c: New test. > * g++.target/loongarch/vorn-signed-backward.C: New test. > --- > > Bootstrap and regtest are on-going, will update the status once them > finish. Posted early following up the review on [1].
No regression with these two patches. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University