diff mbox series

Fix PR86144

Message ID alpine.LSU.2.20.1810231056360.4374@zhemvz.fhfr.qr
State New
Headers show
Series Fix PR86144 | expand

Commit Message

Richard Biener Oct. 23, 2018, 8:57 a.m. UTC
In this PR it was requested that -mveclibabi=svml takes precedence
over simd annotations of <math.h> which is a reasonable expectation.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2018-10-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86144
	* tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
	over simd attribute.

Comments

Jakub Jelinek Oct. 23, 2018, 9:11 a.m. UTC | #1
On Tue, Oct 23, 2018 at 10:57:34AM +0200, Richard Biener wrote:
> +    /* Prefer vectorizable_call over vectorizable_simd_clone_call so
> +       -mveclibabi= takes preference over ibrary functions with

s/ibrary/l&/

	Jakub
Richard Biener Oct. 23, 2018, 9:17 a.m. UTC | #2
On Tue, 23 Oct 2018, Jakub Jelinek wrote:

> On Tue, Oct 23, 2018 at 10:57:34AM +0200, Richard Biener wrote:
> > +    /* Prefer vectorizable_call over vectorizable_simd_clone_call so
> > +       -mveclibabi= takes preference over ibrary functions with
> 
> s/ibrary/l&/

Fixed.

Richard.

2018-10-23  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	(revision 265414)
+++ gcc/tree-vect-stmts.c	(working copy)
@@ -9534,7 +9534,7 @@ vect_analyze_stmt (stmt_vec_info stmt_in
       && (STMT_VINFO_RELEVANT_P (stmt_info)
 	  || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def))
     /* Prefer vectorizable_call over vectorizable_simd_clone_call so
-       -mveclibabi= takes preference over ibrary functions with
+       -mveclibabi= takes preference over library functions with
        the simd attribute.  */
     ok = (vectorizable_call (stmt_info, NULL, NULL, node, cost_vec)
 	  || vectorizable_simd_clone_call (stmt_info, NULL, NULL, node,
diff mbox series

Patch

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	(revision 265411)
+++ gcc/tree-vect-stmts.c	(working copy)
@@ -9533,14 +9533,18 @@  vect_analyze_stmt (stmt_vec_info stmt_in
   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_in
   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_in
 					  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)