]> git.ipfire.org Git - thirdparty/gcc.git/commit
Don't assume it's AVX_U128_CLEAN after call_insn whose abi.mode_clobber(V4DImode...
authorliuhongt <hongtao.liu@intel.com>
Thu, 7 Dec 2023 01:17:27 +0000 (09:17 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 12 Dec 2023 05:24:25 +0000 (13:24 +0800)
commitfc62716fe8d1d60a9f1c6906e5a4845b3331b828
tree40a63a5d8863efc5178deee73f5d17160b42f26b
parentd96533559e26dd0c86f0708fa46eef65c35f7b90
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.
gcc/config/i386/i386.cc
gcc/testsuite/gcc.target/i386/pr112891-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr112891.c [new file with mode: 0644]