]> git.ipfire.org Git - thirdparty/gcc.git/commit
Increase move cost between mask and gpr.
authorliuhongt <hongtao.liu@intel.com>
Thu, 19 May 2022 07:32:22 +0000 (15:32 +0800)
committerliuhongt <hongtao.liu@intel.com>
Mon, 23 May 2022 01:57:04 +0000 (09:57 +0800)
commit657612fb9f58c9cca44b091e3cf40d704fe3ec75
treed906d8bf40ac9c803b936c1bb7656df992c629b2
parent260f189335054ffdbf3866dfd2bff1abb5c989f0
Increase move cost between mask and gpr.

kmovd only uses port5 which is often the bottleneck of
performance. Also from latency perspective, spill and reload mostly
could be STLF or even MRN which only take 1 cycle.

So the patch increase move cost between gpr and mask to be the same as
gpr <-> sse register.

gcc/ChangeLog:

* config/i386/x86-tune-costs.h (skylake_cost): Increase gpr
<-> mask cost from 5 to 6.
(icelake_cost): Ditto.

gcc/testsuite/ChangeLog:
* gcc.target/i386/spill_to_mask-1.c: New test.
gcc/config/i386/x86-tune-costs.h
gcc/testsuite/gcc.target/i386/spill_to_mask-1.c