diff mbox

[i386] : Remove TARGET_VECTORIZE_DOUBLE

Message ID CAFULd4b3rtdgFFX1=MiDyhMw1bJVQzjrrrTvvzzh8bahbwp-Dg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Oct. 4, 2016, 2:56 p.m. UTC
... and use TARGET_BONNELL in ix86_add_stmt_cost.

Now that TARGET_VECTORIZE_DOUBLE is used only as a cost option in
ix86_add_stmt_cost, there is no point to have a tuning option that
covers a single target in a single place.

2016-10-04  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove.
    * config/i386/i386.h (TARGET_VECTORIZE_DOUBLE): Remove.
    * config/i386/i386.c (ix86_add_stmt_cost): Use TARGET_BONNEL instead
    of !TARGET_VECTORIZE_DOUBLE when penalizing DFmode vector ops.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32},
committed to mainline SVN.

Uros.
diff mbox

Patch

Index: i386.c
===================================================================
--- i386.c	(revision 240637)
+++ i386.c	(working copy)
@@ -49667,8 +49667,8 @@  ix86_add_stmt_cost (void *data, int count, enum ve
   tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
   int stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign);
 
-  /* Penalize DFmode vector operations for !TARGET_VECTORIZE_DOUBLE.  */
-  if (kind == vector_stmt && !TARGET_VECTORIZE_DOUBLE
+  /* Penalize DFmode vector operations for Bonnell.  */
+  if (TARGET_BONNELL && kind == vector_stmt
       && vectype && GET_MODE_INNER (TYPE_MODE (vectype)) == DFmode)
     stmt_cost *= 5;  /* FIXME: The value here is arbitrary.  */
 
Index: i386.h
===================================================================
--- i386.h	(revision 240637)
+++ i386.h	(working copy)
@@ -481,8 +481,6 @@  extern unsigned char ix86_tune_features[X86_TUNE_L
 #define TARGET_OPT_AGU ix86_tune_features[X86_TUNE_OPT_AGU]
 #define TARGET_AVOID_LEA_FOR_ADDR \
 	ix86_tune_features[X86_TUNE_AVOID_LEA_FOR_ADDR]
-#define TARGET_VECTORIZE_DOUBLE \
-	ix86_tune_features[X86_TUNE_VECTORIZE_DOUBLE]
 #define TARGET_SOFTWARE_PREFETCHING_BENEFICIAL \
 	ix86_tune_features[X86_TUNE_SOFTWARE_PREFETCHING_BENEFICIAL]
 #define TARGET_AVX128_OPTIMAL \
Index: x86-tune.def
===================================================================
--- x86-tune.def	(revision 240637)
+++ x86-tune.def	(working copy)
@@ -322,10 +322,6 @@  DEF_TUNE (X86_TUNE_EXT_80387_CONSTANTS, "ext_80387
 /* SSE instruction selection tuning                                          */
 /*****************************************************************************/
 
-/* X86_TUNE_VECTORIZE_DOUBLE: Enable double precision vector
-   instructions.  */
-DEF_TUNE (X86_TUNE_VECTORIZE_DOUBLE, "vectorize_double", ~m_BONNELL)
-
 /* X86_TUNE_GENERAL_REGS_SSE_SPILL: Try to spill general regs to SSE
    regs instead of memory.  */
 DEF_TUNE (X86_TUNE_GENERAL_REGS_SSE_SPILL, "general_regs_sse_spill",