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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by hongtao Liu
<liuho...@gcc.gnu.org>:

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

commit r13-8149-gd3e140ac549a2117e82dac51f2e739b20f9c7941
Author: liuhongt <hongtao....@intel.com>
Date:   Thu Dec 7 09:17:27 2023 +0800

    Don't assume it's AVX_U128_CLEAN after call_insn whose
abi.mode_clobber(V4DImode) deosn't contains all SSE_REGS.

    If the function desn't clobber any sse registers or only clobber
    128-bit part, then vzeroupper isn't issued before the function exit.
    the status not CLEAN but ANY after the function.

    Also for sibling_call, it's safe to issue an vzeroupper. Also there
    could be missing vzeroupper since there's no mode_exit for
    sibling_call_p.

    gcc/ChangeLog:

            PR target/112891
            * config/i386/i386.cc (ix86_avx_u128_mode_after): Return
            AVX_U128_ANY if callee_abi doesn't clobber all_sse_regs to
            align with ix86_avx_u128_mode_needed.
            (ix86_avx_u128_mode_needed): Return AVX_U128_ClEAN for
            sibling_call.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr112891.c: New test.
            * gcc.target/i386/pr112891-2.c: New test.

Reply via email to