diff options
author | Fei Yang <felix.yang@huawei.com> | 2020-04-22 18:24:59 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-22 18:24:59 +0100 |
commit | 154ae7d4e921d704118d6a16ee5cc2a10b9047da (patch) | |
tree | 795c27f2c44b816d3f4a7e9ef1a788d109926978 /gcc/cp/constraint.cc | |
parent | 4c3351398644270eddb4db2028dabc8fe6287632 (diff) | |
download | gcc-154ae7d4e921d704118d6a16ee5cc2a10b9047da.zip gcc-154ae7d4e921d704118d6a16ee5cc2a10b9047da.tar.gz gcc-154ae7d4e921d704118d6a16ee5cc2a10b9047da.tar.bz2 |
aarch64: unexpected result with -mgeneral-regs-only and sve [PR94678]
As the two testcases for PR94678 show, -mgeneral-regs-only is handled
properly with SVE. We should issue an error message instead of expanding
SVE builtin funtions when -mgeneral-regs-only option is specified.
The middle end should never try to use vector patterns when the vector
modes have been disabled by !have_regs_of_mode. But it's still wrong
for the target to provide patterns that would inevitably lead to spill
failure due to lack of registers. So we should also add check for
!TARGET_GENERAL_REGS_ONLY in TARGET_SVE and other SVE related macros.
2020-04-22 Felix Yang <felix.yang@huawei.com>
gcc/
PR target/94678
* config/aarch64/aarch64.h (TARGET_SVE):
Add && !TARGET_GENERAL_REGS_ONLY.
(TARGET_SVE2): Add && TARGET_SVE.
(TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3,
TARGET_SVE2_SM4): Add && TARGET_SVE2.
* config/aarch64/aarch64-sve-builtins.h
(sve_switcher::m_old_general_regs_only): New member.
* config/aarch64/aarch64-sve-builtins.cc (check_required_registers):
New function.
(reported_missing_registers_p): New variable.
(check_required_extensions): Call check_required_registers before
return if all required extenstions are present.
(sve_switcher::sve_switcher): Save TARGET_GENERAL_REGS_ONLY in
m_old_general_regs_only and clear MASK_GENERAL_REGS_ONLY in
global_options.x_target_flags.
(sve_switcher::~sve_switcher): Set MASK_GENERAL_REGS_ONLY in
global_options.x_target_flags if m_old_general_regs_only is true.
gcc/testsuite/
PR target/94678
* gcc.target/aarch64/sve/acle/general/nosve_6.c: New test.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions