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

--- Comment #7 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:26058933d2a23140131b3980908554fc6f8b1f41

commit r17-2688-g26058933d2a23140131b3980908554fc6f8b1f41
Author: H.J. Lu <[email protected]>
Date:   Mon Jul 20 07:57:31 2026 +0800

    x86: Check register argument spill by callee

    commit b4c215b36d63e1c264d8c1bd5d34f9aef1bb8463
    Author: H.J. Lu <[email protected]>
    Date:   Sat Jun 28 06:27:25 2025 +0800

        Adjust check for addressable misaligned stack argument

    ignores arguments passed on stack since caller is responsible to align
    the outgoing stack for arguments passed on stack.  However, callee may
    spill a register argument:

    (set (mem/c:V2DI (plus:DI (reg/f:DI 7 sp)
            (const_int -16 [0xfffffffffffffff0])) [4 a1+0 S16 A128])
         (reg:V2DI 20 xmm0 [ a1 ]))

    Update ix86_argument_passed_on_stack_p to check spill of register argument
    by callee.

    gcc/

            PR target/126320
            * config/i386/i386.cc (ix86_spill_register_argument_p): New
            function.
            (ix86_argument_passed_on_stack_p): Add a pattern argument.  Call
            ix86_spill_register_argument_p to check spill of register argument
            by callee.
            (ix86_update_stack_alignment): Pass pat to
            ix86_argument_passed_on_stack_p.

    gcc/testsuite/

            PR target/126320
            * gcc.target/i386/pr126320.c: New test.

    Signed-off-by: H.J. Lu <[email protected]>
    Co-Authored-By: Uros Bizjak <[email protected]>

Reply via email to