Commit a4ef7f3e by Evgeny Stupachenko Committed by Kirill Yukhin

x86-tune.def (TARGET_SLOW_PSHUFB): New tune definition.

gcc/
        * config/i386/x86-tune.def (TARGET_SLOW_PSHUFB): New tune definition.
        * config/i386/i386.h (TARGET_SLOW_PSHUFB): New tune flag.
        * config/i386/i386.c (expand_vec_perm_even_odd_1): Avoid byte shuffles
        for TARGET_SLOW_PSHUFB

From-SVN: r209465
parent cf055f6e
2014-04-17 Evgeny Stupachenko <evstupac@gmail.com> 2014-04-17 Evgeny Stupachenko <evstupac@gmail.com>
* config/i386/x86-tune.def (TARGET_SLOW_PSHUFB): New tune definition.
* config/i386/i386.h (TARGET_SLOW_PSHUFB): New tune flag.
* config/i386/i386.c (expand_vec_perm_even_odd_1): Avoid byte shuffles
for TARGET_SLOW_PSHUFB
2014-04-17 Evgeny Stupachenko <evstupac@gmail.com>
* config/i386/i386.c (slm_cost): Adjust vec_to_scalar_cost. * config/i386/i386.c (slm_cost): Adjust vec_to_scalar_cost.
* config/i386/i386.c (intel_cost): Ditto. * config/i386/i386.c (intel_cost): Ditto.
......
...@@ -44026,7 +44026,7 @@ expand_vec_perm_even_odd_1 (struct expand_vec_perm_d *d, unsigned odd) ...@@ -44026,7 +44026,7 @@ expand_vec_perm_even_odd_1 (struct expand_vec_perm_d *d, unsigned odd)
gcc_unreachable (); gcc_unreachable ();
case V8HImode: case V8HImode:
if (TARGET_SSSE3) if (TARGET_SSSE3 && !TARGET_SLOW_PSHUFB)
return expand_vec_perm_pshufb2 (d); return expand_vec_perm_pshufb2 (d);
else else
{ {
...@@ -44049,7 +44049,7 @@ expand_vec_perm_even_odd_1 (struct expand_vec_perm_d *d, unsigned odd) ...@@ -44049,7 +44049,7 @@ expand_vec_perm_even_odd_1 (struct expand_vec_perm_d *d, unsigned odd)
break; break;
case V16QImode: case V16QImode:
if (TARGET_SSSE3) if (TARGET_SSSE3 && !TARGET_SLOW_PSHUFB)
return expand_vec_perm_pshufb2 (d); return expand_vec_perm_pshufb2 (d);
else else
{ {
...@@ -46318,6 +46318,7 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, ...@@ -46318,6 +46318,7 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
{ {
unsigned *cost = (unsigned *) data; unsigned *cost = (unsigned *) data;
unsigned retval = 0; unsigned retval = 0;
tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE; tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
int stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); int stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign);
...@@ -425,6 +425,8 @@ extern unsigned char ix86_tune_features[X86_TUNE_LAST]; ...@@ -425,6 +425,8 @@ extern unsigned char ix86_tune_features[X86_TUNE_LAST];
ix86_tune_features[X86_TUNE_USE_VECTOR_FP_CONVERTS] ix86_tune_features[X86_TUNE_USE_VECTOR_FP_CONVERTS]
#define TARGET_USE_VECTOR_CONVERTS \ #define TARGET_USE_VECTOR_CONVERTS \
ix86_tune_features[X86_TUNE_USE_VECTOR_CONVERTS] ix86_tune_features[X86_TUNE_USE_VECTOR_CONVERTS]
#define TARGET_SLOW_PSHUFB \
ix86_tune_features[X86_TUNE_SLOW_PSHUFB]
#define TARGET_FUSE_CMP_AND_BRANCH_32 \ #define TARGET_FUSE_CMP_AND_BRANCH_32 \
ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_32] ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_32]
#define TARGET_FUSE_CMP_AND_BRANCH_64 \ #define TARGET_FUSE_CMP_AND_BRANCH_64 \
......
...@@ -386,6 +386,10 @@ DEF_TUNE (X86_TUNE_USE_VECTOR_FP_CONVERTS, "use_vector_fp_converts", ...@@ -386,6 +386,10 @@ DEF_TUNE (X86_TUNE_USE_VECTOR_FP_CONVERTS, "use_vector_fp_converts",
from integer to FP. */ from integer to FP. */
DEF_TUNE (X86_TUNE_USE_VECTOR_CONVERTS, "use_vector_converts", m_AMDFAM10) DEF_TUNE (X86_TUNE_USE_VECTOR_CONVERTS, "use_vector_converts", m_AMDFAM10)
/* X86_TUNE_SLOW_SHUFB: Indicates tunings with slow pshufb instruction. */
DEF_TUNE (X86_TUNE_SLOW_PSHUFB, "slow_pshufb",
m_BONNELL | m_SILVERMONT | m_INTEL)
/*****************************************************************************/ /*****************************************************************************/
/* AVX instruction selection tuning (some of SSE flags affects AVX, too) */ /* AVX instruction selection tuning (some of SSE flags affects AVX, too) */
/*****************************************************************************/ /*****************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment