From a1bc121c00e30bd1bdaa62d87cbe64eb88e74f45 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 1 Dec 2023 08:36:15 +0000 Subject: 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. --- gcc/config/aarch64/aarch64-sve-builtins.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/config/aarch64/aarch64-sve-builtins.cc') 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; -- cgit v1.1