Patchwork [i386] : Set avx128 preferred vector mode for btver2

login
register
mail settings
Submitter venkataramanan.kumar@amd.com
Date Jan. 9, 2013, 5:05 a.m.
Message ID <7794A52CE4D579448B959EED7DD0A47214F6B504@sausexdag05.amd.com>
Download mbox | patch
Permalink /patch/210614/
State New
Headers show

Comments

venkataramanan.kumar@amd.com - Jan. 9, 2013, 5:05 a.m.
Hi Maintainers,

Please fine below patch that sets preferred vectorization mode for btver2  as avx128. 

We tested some benchmarks and found that enabling 128-bit AVX instruction generation by the  auto vectorizer performs better than 
default 256-bit AVX.

Completed bootstrap and make -k check passes.

Ok for trunk?

Gcc/ChangeLog
-------------------

2013-01-09  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

       * config/i386/i386.c (initial_ix86_tune_features): Set up
       X86_TUNE_AVX128_OPTIMAL for m_BTVER2.


Regards,
Venkat.
Uros Bizjak - Jan. 9, 2013, 6:53 a.m.
On Wed, Jan 9, 2013 at 6:05 AM, Kumar, Venkataramanan
<Venkataramanan.Kumar@amd.com> wrote:

> Please fine below patch that sets preferred vectorization mode for btver2  as avx128.
>
> We tested some benchmarks and found that enabling 128-bit AVX instruction generation by the  auto vectorizer performs better than
> default 256-bit AVX.
>
> Completed bootstrap and make -k check passes.
>
> Ok for trunk?
>
> Gcc/ChangeLog
> -------------------
>
> 2013-01-09  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
>
>        * config/i386/i386.c (initial_ix86_tune_features): Set up
>        X86_TUNE_AVX128_OPTIMAL for m_BTVER2.

OK.

Thanks,
Uros.

Patch

Index: i386.c
===================================================================
--- i386.c      (revision 194833)
+++ i386.c      (working copy)
@@ -2014,7 +2014,7 @@ 

   /* X86_TUNE_AVX128_OPTIMAL: Enable 128-bit AVX instruction generation for
      the auto-vectorizer.  */
-  m_BDVER,
+  m_BDVER | m_BTVER2,

   /* X86_TUNE_REASSOC_INT_TO_PARALLEL: Try to produce parallel computations
      during reassociation of integer computation.  */