i386.c (x86_add_stmt_cost): Fix vector cost model for Silvermont.
gcc/ * config/i386/i386.c (x86_add_stmt_cost): Fix vector cost model for Silvermont. From-SVN: r209466
This commit is contained in:
parent
a4ef7f3e57
commit
170c1776c4
@ -1,3 +1,8 @@
|
||||
2014-04-17 Evgeny Stupachenko <evstupac@gmail.com>
|
||||
|
||||
* config/i386/i386.c (x86_add_stmt_cost): Fix vector cost model for
|
||||
Silvermont.
|
||||
|
||||
2014-04-17 Evgeny Stupachenko <evstupac@gmail.com>
|
||||
|
||||
* config/i386/x86-tune.def (TARGET_SLOW_PSHUFB): New tune definition.
|
||||
|
@ -81,6 +81,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "context.h"
|
||||
#include "pass_manager.h"
|
||||
#include "target-globals.h"
|
||||
#include "tree-vectorizer.h"
|
||||
|
||||
static rtx legitimize_dllimport_symbol (rtx, bool);
|
||||
static rtx legitimize_pe_coff_extern_decl (rtx, bool);
|
||||
@ -46329,6 +46330,18 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
|
||||
count *= 50; /* FIXME. */
|
||||
|
||||
retval = (unsigned) (count * stmt_cost);
|
||||
|
||||
/* We need to multiply all vector stmt cost by 1.7 (estimated cost)
|
||||
for Silvermont as it has out of order integer pipeline and can execute
|
||||
2 scalar instruction per tick, but has in order SIMD pipeline. */
|
||||
if (TARGET_SILVERMONT || TARGET_INTEL)
|
||||
if (stmt_info && stmt_info->stmt)
|
||||
{
|
||||
tree lhs_op = gimple_get_lhs (stmt_info->stmt);
|
||||
if (lhs_op && TREE_CODE (TREE_TYPE (lhs_op)) == INTEGER_TYPE)
|
||||
retval = (retval * 17) / 10;
|
||||
}
|
||||
|
||||
cost[where] += retval;
|
||||
|
||||
return retval;
|
||||
|
Loading…
Reference in New Issue
Block a user