diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2023-06-26 14:39:47 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2023-07-10 14:13:59 +0000 |
commit | eca10aaa3954af3dab56eccc208c90273c2b1732 (patch) | |
tree | 49b5ee0942b32f9b07aff4718ed6e7f6ef20a586 /libgcc | |
parent | 7199b591649b81fef4d78e34a40bc7f474b22051 (diff) | |
download | gcc-eca10aaa3954af3dab56eccc208c90273c2b1732.zip gcc-eca10aaa3954af3dab56eccc208c90273c2b1732.tar.gz gcc-eca10aaa3954af3dab56eccc208c90273c2b1732.tar.bz2 |
arm: Fix MVE intrinsics support with LTO (PR target/110268)
After the recent MVE intrinsics re-implementation, LTO stopped working
because the intrinsics would no longer be defined.
The main part of the patch is simple and similar to what we do for
AArch64:
- call handle_arm_mve_h() from arm_init_mve_builtins to declare the
intrinsics when the compiler is in LTO mode
- actually implement arm_builtin_decl for MVE.
It was just a bit tricky to handle __ARM_MVE_PRESERVE_USER_NAMESPACE:
its value in the user code cannot be guessed at LTO time, so we always
have to assume that it was not defined. The led to a few fixes in the
way we register MVE builtins as placeholders or not. Without this
patch, we would just omit some versions of the inttrinsics when
__ARM_MVE_PRESERVE_USER_NAMESPACE is true. In fact, like for the C/C++
placeholders, we need to always keep entries for all of them to ensure
that we have a consistent numbering scheme.
2023-06-26 Christophe Lyon <christophe.lyon@linaro.org>
PR target/110268
gcc/
* config/arm/arm-builtins.cc (arm_init_mve_builtins): Handle LTO.
(arm_builtin_decl): Hahndle MVE builtins.
* config/arm/arm-mve-builtins.cc (builtin_decl): New function.
(add_unique_function): Fix handling of
__ARM_MVE_PRESERVE_USER_NAMESPACE.
(add_overloaded_function): Likewise.
* config/arm/arm-protos.h (builtin_decl): New declaration.
gcc/testsuite/
* gcc.target/arm/pr110268-1.c: New test.
* gcc.target/arm/pr110268-2.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions