From: rguenth Date: Tue, 23 Oct 2018 08:58:39 +0000 (+0000) Subject: 2018-10-23 Richard Biener X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=302a30737136e0d42f43296255f999b6bc9cf05b;p=thirdparty%2Fgcc.git 2018-10-23 Richard Biener PR tree-optimization/86144 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi over simd attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265414 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f50070d01ca8..68b1f93daae3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-23 Richard Biener + + PR tree-optimization/86144 + * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi + over simd attribute. + 2018-10-23 Richard Biener PR tree-optimization/87693 diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 8995da80b1e6..7e05cbb79036 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9533,14 +9533,18 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, if (!bb_vinfo && (STMT_VINFO_RELEVANT_P (stmt_info) || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)) - ok = (vectorizable_simd_clone_call (stmt_info, NULL, NULL, node, cost_vec) + /* Prefer vectorizable_call over vectorizable_simd_clone_call so + -mveclibabi= takes preference over ibrary functions with + the simd attribute. */ + ok = (vectorizable_call (stmt_info, NULL, NULL, node, cost_vec) + || vectorizable_simd_clone_call (stmt_info, NULL, NULL, node, + cost_vec) || vectorizable_conversion (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_shift (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_operation (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_assignment (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_load (stmt_info, NULL, NULL, node, node_instance, cost_vec) - || vectorizable_call (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_store (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_reduction (stmt_info, NULL, NULL, node, node_instance, cost_vec) @@ -9552,8 +9556,9 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, else { if (bb_vinfo) - ok = (vectorizable_simd_clone_call (stmt_info, NULL, NULL, node, - cost_vec) + ok = (vectorizable_call (stmt_info, NULL, NULL, node, cost_vec) + || vectorizable_simd_clone_call (stmt_info, NULL, NULL, node, + cost_vec) || vectorizable_conversion (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_shift (stmt_info, NULL, NULL, node, cost_vec) @@ -9562,7 +9567,6 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, cost_vec) || vectorizable_load (stmt_info, NULL, NULL, node, node_instance, cost_vec) - || vectorizable_call (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_store (stmt_info, NULL, NULL, node, cost_vec) || vectorizable_condition (stmt_info, NULL, NULL, NULL, 0, node, cost_vec)