diff options
author | Richard Biener <rguenther@suse.de> | 2018-10-23 08:58:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-10-23 08:58:39 +0000 |
commit | bc37759a51631f667d1728336c3662751f69b5ba (patch) | |
tree | e08d310e91bf123debb0d79e3069dbac046b473b | |
parent | a26eaf981dd83a9dc3ec7caa8d0350e1c760ee27 (diff) | |
download | gcc-bc37759a51631f667d1728336c3662751f69b5ba.zip gcc-bc37759a51631f667d1728336c3662751f69b5ba.tar.gz gcc-bc37759a51631f667d1728336c3662751f69b5ba.tar.bz2 |
re PR tree-optimization/86144 (GCC is not generating vector math calls to svml/acml functions)
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/86144
* tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
over simd attribute.
From-SVN: r265414
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f50070d..68b1f93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2018-10-23 Richard Biener <rguenther@suse.de> + PR tree-optimization/86144 + * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi + over simd attribute. + +2018-10-23 Richard Biener <rguenther@suse.de> + PR tree-optimization/87693 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle the case we do not find the taken edge. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 8995da80..7e05cbb 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) |