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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <[email protected]>:

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

commit r17-2918-gb06b1ea150558cfe83111b48b94b4297cb3dec05
Author: H.J. Lu <[email protected]>
Date:   Sat Aug 1 06:07:43 2026 +0800

    x86: Check DECL_INCOMING_RTL for argument passing check

    For argument declaration, its DECL_INCOMING_RTL holds an RTL for the
    stack slot or register where the data was actually passed.  If an
    argument's DECL_INCOMING_RTL is a memory operand, it is passed on stack
    by caller.  Change ix86_argument_passed_on_stack_p to return true if the
    argument's DECL_INCOMING_RTL is a memory operand.

    gcc/

            PR target/126320
            PR target/126450
            PR target/126529
            * config/i386/i386.cc (ix86_spill_register_argument_p): Removed.
            (ix86_argument_passed_on_stack_p): Remove the second argument.
            Return true if the argument's DECL_INCOMING_RTL is a memory
            operand.
            (ix86_update_stack_alignment): Updated.

    gcc/testsuite/

            PR target/126320
            PR target/126450
            PR target/126529
            * gcc.target/i386/pr126529-1.c: New test.
            * gcc.target/i386/pr126529-2.c: Likewise.
            * gcc.target/i386/pr126529-3.c: Likewise.
            * gcc.target/i386/pr126529-4.c: Likewise.

    Signed-off-by: H.J. Lu <[email protected]>

Reply via email to