aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorAlex Coplan <alex.coplan@arm.com>2021-03-29 12:18:19 +0100
committerAlex Coplan <alex.coplan@arm.com>2021-03-29 12:18:19 +0100
commite4005cf8717abe8c949f840c707e02e6c394c2e7 (patch)
treecf1294a14115be417d75d18b4b8c52f6ce68930e /gcc/tree-ssa-sccvn.c
parent8cf2812cfceaf464dff99651b2d911d6e12b52b7 (diff)
downloadgcc-e4005cf8717abe8c949f840c707e02e6c394c2e7.zip
gcc-e4005cf8717abe8c949f840c707e02e6c394c2e7.tar.gz
gcc-e4005cf8717abe8c949f840c707e02e6c394c2e7.tar.bz2
aarch64: Fix SVE ACLE builtins with LTO [PR99216]
As discussed in the PR, we currently have two different numbering schemes for SVE builtins: one for C, and one for C++. This is problematic for LTO, where we end up getting confused about which intrinsic we're talking about. This patch inserts placeholders into the registered_functions vector to ensure that there is a consistent numbering scheme for both C and C++. We use integer_zero_node as a placeholder node instead of building a function decl. This is safe because the node is only returned by the TARGET_BUILTIN_DECL hook, which (on AArch64) is only used for validation when builtin decls are streamed into lto1. gcc/ChangeLog: PR target/99216 * config/aarch64/aarch64-sve-builtins.cc (function_builder::add_function): Add placeholder_p argument, use placeholder decls if this is set. (function_builder::add_unique_function): Instead of conditionally adding direct overloads, unconditionally add either a direct overload or a placeholder. (function_builder::add_overloaded_function): Set placeholder_p if we're using C++ overloads. Use the obstack for string storage instead of relying on the tree nodes. (function_builder::add_overloaded_functions): Don't return early for m_direct_overloads: we need to add placeholders. * config/aarch64/aarch64-sve-builtins.h (function_builder::add_function): Add placeholder_p argument. gcc/testsuite/ChangeLog: PR target/99216 * g++.target/aarch64/sve/pr99216.C: New test.
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
0 files changed, 0 insertions, 0 deletions