diff mbox

[5/6] Simplify rs6000_builtin_vectorized_function

Message ID 87wptrm8z9.fsf@e105548-lin.cambridge.arm.com
State New
Headers show

Commit Message

Richard Sandiford Nov. 9, 2015, 4:30 p.m. UTC
After the previous patches it's no longer necessary for
TARGET_BUILTIN_VECTORIZED_FUNCTION to return functions that
map to the vector optab of the original operation.  We'll use
a vector form of the internal function instead.


gcc/
	* config/rs6000/rs6000.c (rs6000_builtin_vectorized_function): Remove
	entries that map directly to optabs.

Comments

David Edelsohn Nov. 9, 2015, 5:47 p.m. UTC | #1
On Mon, Nov 9, 2015 at 8:30 AM, Richard Sandiford
<richard.sandiford@arm.com> wrote:
> After the previous patches it's no longer necessary for
> TARGET_BUILTIN_VECTORIZED_FUNCTION to return functions that
> map to the vector optab of the original operation.  We'll use
> a vector form of the internal function instead.
>
>
> gcc/
>         * config/rs6000/rs6000.c (rs6000_builtin_vectorized_function): Remove
>         entries that map directly to optabs.

Okay.

Thanks, David
diff mbox

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 26a0410..aa55b8e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4913,19 +4913,6 @@  rs6000_builtin_vectorized_function (unsigned int fn, tree type_out,
 
   switch (fn)
     {
-    CASE_CFN_CLZ:
-      if (TARGET_P8_VECTOR && in_mode == out_mode && out_n == in_n)
-	{
-	  if (out_mode == QImode && out_n == 16)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VCLZB];
-	  else if (out_mode == HImode && out_n == 8)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VCLZH];
-	  else if (out_mode == SImode && out_n == 4)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VCLZW];
-	  else if (out_mode == DImode && out_n == 2)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VCLZD];
-	}
-      break;
     CASE_CFN_COPYSIGN:
       if (VECTOR_UNIT_VSX_P (V2DFmode)
 	  && out_mode == DFmode && out_n == 2
@@ -4940,29 +4927,6 @@  rs6000_builtin_vectorized_function (unsigned int fn, tree type_out,
 	  && in_mode == SFmode && in_n == 4)
 	return rs6000_builtin_decls[ALTIVEC_BUILTIN_COPYSIGN_V4SF];
       break;
-    CASE_CFN_POPCOUNT:
-      if (TARGET_P8_VECTOR && in_mode == out_mode && out_n == in_n)
-	{
-	  if (out_mode == QImode && out_n == 16)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VPOPCNTB];
-	  else if (out_mode == HImode && out_n == 8)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VPOPCNTH];
-	  else if (out_mode == SImode && out_n == 4)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VPOPCNTW];
-	  else if (out_mode == DImode && out_n == 2)
-	    return rs6000_builtin_decls[P8V_BUILTIN_VPOPCNTD];
-	}
-      break;
-    CASE_CFN_SQRT:
-      if (VECTOR_UNIT_VSX_P (V2DFmode)
-	  && out_mode == DFmode && out_n == 2
-	  && in_mode == DFmode && in_n == 2)
-	return rs6000_builtin_decls[VSX_BUILTIN_XVSQRTDP];
-      if (VECTOR_UNIT_VSX_P (V4SFmode)
-	  && out_mode == SFmode && out_n == 4
-	  && in_mode == SFmode && in_n == 4)
-	return rs6000_builtin_decls[VSX_BUILTIN_XVSQRTSP];
-      break;
     CASE_CFN_CEIL:
       if (VECTOR_UNIT_VSX_P (V2DFmode)
 	  && out_mode == DFmode && out_n == 2