PR tree-optimization/50969
* tree-vect-stmts.c (vect_model_store_cost): Correct statement cost to
use vec_perm rather than vector_stmt.
(vect_model_load_cost): Likewise.
* config/i386/i386.c (ix86_builtin_vectorization_cost): Change cost of
vec_perm to be the same as other vector statements.
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Revise
cost of vec_perm for TARGET_VSX.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183944
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/50969
+ * tree-vect-stmts.c (vect_model_store_cost): Correct statement cost to
+ use vec_perm rather than vector_stmt.
+ (vect_model_load_cost): Likewise.
+ * config/i386/i386.c (ix86_builtin_vectorization_cost): Change cost of
+ vec_perm to be the same as other vector statements.
+ * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Revise
+ cost of vec_perm for TARGET_VSX.
+
2012-02-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52115
2012-02-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52115
return ix86_cost->cond_not_taken_branch_cost;
case vec_perm:
return ix86_cost->cond_not_taken_branch_cost;
case vec_perm:
+ return ix86_cost->vec_stmt_cost;
default:
gcc_unreachable ();
default:
gcc_unreachable ();
case vec_to_scalar:
case scalar_to_vec:
case cond_branch_not_taken:
case vec_to_scalar:
case scalar_to_vec:
case cond_branch_not_taken:
+ case vec_perm:
+ if (!TARGET_VSX)
+ return 1;
+ return 2;
+
case cond_branch_taken:
return 3;
case cond_branch_taken:
return 3;
{
/* Uses a high and low interleave operation for each needed permute. */
inside_cost = ncopies * exact_log2(group_size) * group_size
{
/* Uses a high and low interleave operation for each needed permute. */
inside_cost = ncopies * exact_log2(group_size) * group_size
- * vect_get_stmt_cost (vector_stmt);
+ * vect_get_stmt_cost (vec_perm);
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
{
/* Uses an even and odd extract operations for each needed permute. */
inside_cost = ncopies * exact_log2(group_size) * group_size
{
/* Uses an even and odd extract operations for each needed permute. */
inside_cost = ncopies * exact_log2(group_size) * group_size
- * vect_get_stmt_cost (vector_stmt);
+ * vect_get_stmt_cost (vec_perm);
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",