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

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

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

commit r16-9406-gb73ad535acaa2381bce1edb6f78b7dc65d0d5d1f
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]>
    (cherry picked from commit 26058933d2a23140131b3980908554fc6f8b1f41)

Reply via email to