diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2016-08-18 14:59:46 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2016-08-18 07:59:46 -0700 |
commit | 89c8878092d773cf3803a98e60d5632635199125 (patch) | |
tree | 42c64794804f79c6cf3bad6bfeede489b468d2ac /gcc | |
parent | 2c71d454eb6c35af8bf64d4c15621bb380f494ab (diff) | |
download | gcc-89c8878092d773cf3803a98e60d5632635199125.zip gcc-89c8878092d773cf3803a98e60d5632635199125.tar.gz gcc-89c8878092d773cf3803a98e60d5632635199125.tar.bz2 |
Increase MOVE_RATIO to 17 for Lakemont
Larger MOVE_RATIO will always make code faster. 17 is the number with
smaller code sizes for Lakemont.
gcc/
PR target/72839
* config/i386/i386.c (lakemont_cost): Set MOVE_RATIO to 17.
gcc/testsuite/
PR target/72839
* gcc.target/i386/pr72839.c: New test.
From-SVN: r239578
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr72839.c | 17 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da65316..c54e103 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-18 H.J. Lu <hongjiu.lu@intel.com> + + PR target/72839 + * config/i386/i386.c (lakemont_cost): Set MOVE_RATIO to 17. + 2016-08-18 Chung-Lin Tang <cltang@codesourcery.com> PR middle-end/70895 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e2c9f72..be027f5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -426,7 +426,7 @@ struct processor_costs lakemont_cost = { COSTS_N_INSNS (3), /* cost of movsx */ COSTS_N_INSNS (2), /* cost of movzx */ 8, /* "large" insn */ - 9, /* MOVE_RATIO */ + 17, /* MOVE_RATIO */ 6, /* cost for loading QImode using movzbl */ {2, 4, 2}, /* cost of loading integer registers in QImode, HImode and SImode. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7679928..c35808f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-18 H.J. Lu <hongjiu.lu@intel.com> + + PR target/72839 + * gcc.target/i386/pr72839.c: New test. + 2016-08-18 Chung-Lin Tang <cltang@codesourcery.com> PR middle-end/70895 diff --git a/gcc/testsuite/gcc.target/i386/pr72839.c b/gcc/testsuite/gcc.target/i386/pr72839.c new file mode 100644 index 0000000..ea724f7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr72839.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target ia32 } */ +/* { dg-options "-O2 -mtune=lakemont" } */ + +extern char *strcpy (char *, const char *); + +void +foo (char *s) +{ + strcpy (s, + "12345678123456781234567812345678123456781234567812345678" + "1234567"); +} + +/* { dg-final { scan-assembler-times "movl\[ \\t\]+\\$\[0-9\]+, \[0-9\]*\\(%\[^,\]+\\)" 16 } } */ +/* { dg-final { scan-assembler-not "rep movsl" } } */ +/* { dg-final { scan-assembler-not "rep movsb" } } */ |