Increase rtx cost of sse_to_integer in skylake_cost.

As https://gcc.gnu.org/pipermail/gcc-patches/2019-August/528839.html
indicates, movement between SSE and gpr should be much expensive than
movement inside gpr(which is 2 as default).

gcc/ChangeLog

	PR target/96861
	* config/i386/x86-tune-costs.h (skylake_cost): increase rtx
	cost of sse_to_integer from 2 to 6.

gcc/testsuite

	* gcc.target/i386/pr95021-3.c: Add -mtune=generic.
This commit is contained in:
liuhongt 2020-09-16 10:53:52 +08:00
parent 239601c53b
commit 83858ba1db
2 changed files with 2 additions and 2 deletions

View File

@ -1769,7 +1769,7 @@ struct processor_costs skylake_cost = {
{6, 6, 6, 10, 20}, /* cost of unaligned loads. */ {6, 6, 6, 10, 20}, /* cost of unaligned loads. */
{8, 8, 8, 8, 16}, /* cost of unaligned stores. */ {8, 8, 8, 8, 16}, /* cost of unaligned stores. */
2, 2, 4, /* cost of moving XMM,YMM,ZMM register */ 2, 2, 4, /* cost of moving XMM,YMM,ZMM register */
2, /* cost of moving SSE register to integer. */ 6, /* cost of moving SSE register to integer. */
20, 8, /* Gather load static, per_elt. */ 20, 8, /* Gather load static, per_elt. */
22, 10, /* Gather store static, per_elt. */ 22, 10, /* Gather store static, per_elt. */
64, /* size of l1 cache. */ 64, /* size of l1 cache. */

View File

@ -1,5 +1,5 @@
/* { dg-do compile { target ia32 } } */ /* { dg-do compile { target ia32 } } */
/* { dg-options "-O2 -msse2 -mstv -mregparm=3 -W" } */ /* { dg-options "-O2 -msse2 -mstv -mregparm=3 -W -mtune=generic" } */
/* { dg-final { scan-assembler "movq\[ \t\]+\[^\n\]*, %xmm" } } */ /* { dg-final { scan-assembler "movq\[ \t\]+\[^\n\]*, %xmm" } } */
#include "pr95021-1.c" #include "pr95021-1.c"