https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104489

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sa...@gcc.gnu.org>:

https://gcc.gnu.org/g:ac4c8f53b0f735be17aa020796602de2299da1c5

commit r13-1462-gac4c8f53b0f735be17aa020796602de2299da1c5
Author: Roger Sayle <ro...@nextmovesoftware.com>
Date:   Mon Jul 4 16:45:47 2022 +0100

    middle-end: Support ABIs that pass FP values as wider integers.

    Sorry for the long delay getting back to this, but after deeper
    investigation, it turns out that Jeff Law's 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 he'd predicted they'd 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
    also implements Jeff's suggestion to factor the common code into
    helper routines.

    2022-07-04  Roger Sayle  <ro...@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
            by calling new convert_float_to_wider_int.
            (expand_call): Allow floating point results to be returned in
            wider integer modes by calling new convert wider_int_to_float.
            * cfgexpand.cc (expand_value_return): Allow backends to promote
            a scalar floating point return value to a wider integer mode
            by calling new convert_float_to_wider_int.
            * expr.cc (convert_float_to_wider_int): New function.
            (convert_wider_int_to_float): Likewise.
            (expand_expr_real_1) <expand_decl_rtl>: Allow backends to promote
            scalar FP PARM_DECLs to wider integer modes, by calling new
            convert_wider_int_to_float.
            * expr.h (convert_modes): Name arguments for improved
documentation.
            (convert_float_to_wider_int): Prototype new function here.
            (convert_wider_int_to_float): Likewise.
            * function.cc (assign_parm_setup_stack): Allow floating point
            values to be passed on the stack as wider integer modes by
            calling new convert_wider_int_to_float.

Reply via email to