Patchwork Fix performance regression with -mtune=atom

login
register
mail settings
Submitter Vladimir Yakovlev
Date Sept. 30, 2011, 8:56 a.m.
Message ID <CAK1BsWqEtBubs=FhsLGatxKyOyEJv59QKo8Zcd4YWa-G6GD39A@mail.gmail.com>
Download mbox | patch
Permalink /patch/117062/
State New
Headers show

Comments

Vladimir Yakovlev - Sept. 30, 2011, 8:56 a.m.
This patch fixes performance regression with -mtune=atom. Changing
atom cost removes regression in several tests of EEMBC and spec2000.
Bootstrap amd make check Ok for both with and witout -mtune-atom.
OK for trunk?

2011-09-30  Yakovlev Vladimir  vladimir.b.yakovlev@intel.com

      * gcc/config/i386/i386.c (atom_cost): Changed cost for loading
       QImode using movzbl.

                                           Relative to reg-reg move (2).  */
Vladimir Yakovlev - Oct. 14, 2011, 11:34 a.m.
This is a ping. Change affects Atom only and was made because it
really gives better performance on this architecture. This fact
actually leads to the thought that old value is just a simple
misprint.
  Please look.

Vladimir

2011/9/30 Vladimir Yakovlev <vbyakovl23@gmail.com>:
> This patch fixes performance regression with -mtune=atom. Changing
> atom cost removes regression in several tests of EEMBC and spec2000.
> Bootstrap amd make check Ok for both with and witout -mtune-atom.
> OK for trunk?
>
> 2011-09-30  Yakovlev Vladimir  vladimir.b.yakovlev@intel.com
>
>      * gcc/config/i386/i386.c (atom_cost): Changed cost for loading
>       QImode using movzbl.
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index 7e89dbd..8a512a7 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -1672,7 +1672,7 @@ struct processor_costs atom_cost = {
>   COSTS_N_INSNS (1),                   /* cost of movzx */
>   8,                                   /* "large" insn */
>   17,                                  /* MOVE_RATIO */
> -  2,                                /* cost for loading QImode using movzbl */
> +  4,                                   /* cost for loading QImode
> using movzbl */
>   {4, 4, 4},                           /* cost of loading integer registers
>                                           in QImode, HImode and SImode.
>                                           Relative to reg-reg move (2).  */
>

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7e89dbd..8a512a7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1672,7 +1672,7 @@  struct processor_costs atom_cost = {
   COSTS_N_INSNS (1),                   /* cost of movzx */
   8,                                   /* "large" insn */
   17,                                  /* MOVE_RATIO */
-  2,                                /* cost for loading QImode using movzbl */
+  4,                                   /* cost for loading QImode
using movzbl */
   {4, 4, 4},                           /* cost of loading integer registers
                                           in QImode, HImode and SImode.