[PATCH take 2] middle-end: Support ABIs that pass FP values as wider integers.

Jeff Law jeffreyalaw@gmail.com
Sat Jul 2 17:15:40 GMT 2022



On 6/26/2022 6:55 AM, Roger Sayle wrote:
> Hi Jeff,
> Sorry for the long delay getting back to this, but after deeper
> investigation, it turns out that your tingling spider senses that
> the original patch wasn't updating everywhere that was required
> were spot on.  Although my nvptx testing showed no problems with -O2,
> compiling the same tests with -O0 found several additional assertion
> ICEs (exactly where you'd predicted they should/would be).
>
> Here's a revised patch that updates five locations (up from the
> previous two).  Finding any remaining locations (if any) might be
> easier once folks are able to test things on their targets.
>
>
> This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
> and make -k check with no new failures, and on nvptx-none, where it is
> the middle-end portion of a pair of patches to allow the default ISA to
> be advanced.  Ok for mainline?
>
>
> 2022-06-26  Roger Sayle  <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
> 	PR target/104489
> 	* calls.cc (precompute_register_parameters): Allow promotion
> 	of floating point values to be passed in wider integer modes.
> 	(expand_call): Allow floating point results to be returned in
> 	wider integer modes.
> 	* cfgexpand.cc (expand_value_return): Allow backends to promote
> 	a scalar floating point return value to a wider integer mode.
> 	* expr.cc (expand_expr_real_1) <expand_decl_rtl>: Likewise, allow
> 	backends to promote scalar FP PARM_DECLs to wider integer modes.
> 	* function.cc (assign_parm_setup_stack): Allow floating point
> 	values to be passed on the stack as wider integer modes.
OK.  Though please consider factoring the code which reinterprets the 
original into a new mode.  It looks to me like we've got 5 copies of it 
now :-)



Jeff




More information about the Gcc-patches mailing list