diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-12-01 08:36:15 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-12-01 08:36:15 +0000 |
commit | a1bc121c00e30bd1bdaa62d87cbe64eb88e74f45 (patch) | |
tree | 8650b0ffdaee26eb284a4e09031a680f87fdf8f7 /gcc/config/aarch64/aarch64-sve-builtins.cc | |
parent | e3be66dfe82abe30d09f23489e9f2a47a129acc5 (diff) | |
download | gcc-a1bc121c00e30bd1bdaa62d87cbe64eb88e74f45.zip gcc-a1bc121c00e30bd1bdaa62d87cbe64eb88e74f45.tar.gz gcc-a1bc121c00e30bd1bdaa62d87cbe64eb88e74f45.tar.bz2 |
aarch64: Add a result_mode helper function
SME will add more intrinsics whose expansion code requires
the mode of the function return value. This patch adds an
associated helper routine.
gcc/
* config/aarch64/aarch64-sve-builtins.h
(function_expander::result_mode): New member function.
* config/aarch64/aarch64-sve-builtins-base.cc
(svld234_impl::expand): Use it.
* config/aarch64/aarch64-sve-builtins.cc
(function_expander::get_reg_target): Likewise.
Diffstat (limited to 'gcc/config/aarch64/aarch64-sve-builtins.cc')
-rw-r--r-- | gcc/config/aarch64/aarch64-sve-builtins.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index ee81282..c5aaf1b 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -2862,7 +2862,7 @@ function_expander::get_fallback_value (machine_mode mode, unsigned int nops, rtx function_expander::get_reg_target () { - machine_mode target_mode = TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))); + machine_mode target_mode = result_mode (); if (!possible_target || GET_MODE (possible_target) != target_mode) possible_target = gen_reg_rtx (target_mode); return possible_target; |