This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/86144] GCC is not generating vector math calls to svml/acml functions


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86144

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-06-14
                 CC|                            |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note a workaround would be to re-arrange the vectorizer calls to
vectorizable_simd_clone_call and vectorizable_call.  Can you check if
the following works?  It gives precedence to what the target hook
(and thus -mveclibabi) provides.

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 9f365e31e49..bdef56bf65e 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9543,13 +9543,13 @@ vect_analyze_stmt (gimple *stmt, bool
*need_to_vectorize, slp_tree node,
   if (!bb_vinfo
       && (STMT_VINFO_RELEVANT_P (stmt_info)
          || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def))
-    ok = (vectorizable_simd_clone_call (stmt, NULL, NULL, node, cost_vec)
+    ok = (vectorizable_call (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_conversion (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_shift (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_operation (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_assignment (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_load (stmt, NULL, NULL, node, node_instance,
cost_vec)
-         || vectorizable_call (stmt, NULL, NULL, node, cost_vec)
+         || vectorizable_simd_clone_call (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_store (stmt, NULL, NULL, node, cost_vec)
          || vectorizable_reduction (stmt, NULL, NULL, node, node_instance,
                                     cost_vec)
@@ -9559,14 +9559,14 @@ vect_analyze_stmt (gimple *stmt, bool
*need_to_vectorize, slp_tree node,
   else
     {
       if (bb_vinfo)
-       ok = (vectorizable_simd_clone_call (stmt, NULL, NULL, node, cost_vec)
+       ok = (vectorizable_call (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_conversion (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_shift (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_operation (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_assignment (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_load (stmt, NULL, NULL, node, node_instance,
                                    cost_vec)
-             || vectorizable_call (stmt, NULL, NULL, node, cost_vec)
+             || vectorizable_simd_clone_call (stmt, NULL, NULL, node,
cost_vec)
              || vectorizable_store (stmt, NULL, NULL, node, cost_vec)
              || vectorizable_condition (stmt, NULL, NULL, NULL, 0, node,
                                         cost_vec)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]