https://gcc.gnu.org/g:cfcb4be28d1e947008f3f9474edc203994136d5c
commit cfcb4be28d1e947008f3f9474edc203994136d5c Author: Michael Meissner <[email protected]> Date: Sat Sep 26 00:23:05 2026 -0400 Honor -mfloat16-gpr-convert for function returns. 2026-09-26 Michael Meissner <[email protected]> * config/rs6000/rs6000.cc (rs6000_libcall_value): If -mfloat16-gpr-convert, BFmode and HFmode return values in a GPR. Diff: --- gcc/config/rs6000/rs6000.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 877faf0af74b..cd2cce4ad99d 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -24535,6 +24535,8 @@ rs6000_libcall_value (machine_mode mode) if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT) /* _Decimal128 must use an even/odd register pair. */ regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN; + else if (FP16_SCALAR_MODE_P (mode) && TARGET_FLOAT16_GPR_CONVERT) + regno = GP_ARG_RETURN; else if (SCALAR_FLOAT_MODE_NOT_VECTOR_P (mode) && TARGET_HARD_FLOAT) regno = FP_ARG_RETURN; /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same
