From 98937c6816d7fae32832901e05582b8730c0aaf5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 17 Nov 2015 18:56:21 +0000 Subject: [PATCH] Simplify ix86_builtin_vectorized_function 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. Tested on x86_64-linux-gnu. gcc/ * config/i386/i386.c (ix86_builtin_vectorized_function): Remove entries that map directly to optabs. From-SVN: r230493 --- gcc/ChangeLog | 5 ++++ gcc/config/i386/i386.c | 63 ------------------------------------------ 2 files changed, 5 insertions(+), 63 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cdf4e6ed4eb..05cb9db62d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-11-17 Richard Sandiford + + * config/i386/i386.c (ix86_builtin_vectorized_function): Remove + entries that map directly to optabs. + 2015-11-17 Richard Sandiford * internal-fn.h (direct_internal_fn_info): Add vectorizable flag. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 763230a7a38..e752e621726 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42012,27 +42012,6 @@ ix86_builtin_vectorized_function (unsigned int fn, tree type_out, switch (fn) { - CASE_CFN_SQRT: - if (out_mode == DFmode && in_mode == DFmode) - { - if (out_n == 2 && in_n == 2) - return ix86_get_builtin (IX86_BUILTIN_SQRTPD); - else if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_SQRTPD256); - else if (out_n == 8 && in_n == 8) - return ix86_get_builtin (IX86_BUILTIN_SQRTPD512); - } - if (out_mode == SFmode && in_mode == SFmode) - { - if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_SQRTPS_NR); - else if (out_n == 8 && in_n == 8) - return ix86_get_builtin (IX86_BUILTIN_SQRTPS_NR256); - else if (out_n == 16 && in_n == 16) - return ix86_get_builtin (IX86_BUILTIN_SQRTPS_NR512); - } - break; - CASE_CFN_EXP2: if (out_mode == SFmode && in_mode == SFmode) { @@ -42135,27 +42114,6 @@ ix86_builtin_vectorized_function (unsigned int fn, tree type_out, } break; - CASE_CFN_COPYSIGN: - if (out_mode == DFmode && in_mode == DFmode) - { - if (out_n == 2 && in_n == 2) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPD); - else if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPD256); - else if (out_n == 8 && in_n == 8) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPD512); - } - if (out_mode == SFmode && in_mode == SFmode) - { - if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPS); - else if (out_n == 8 && in_n == 8) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPS256); - else if (out_n == 16 && in_n == 16) - return ix86_get_builtin (IX86_BUILTIN_CPYSGNPS512); - } - break; - CASE_CFN_FLOOR: /* The round insn does not trap on denormals. */ if (flag_trapping_math || !TARGET_ROUND) @@ -42240,27 +42198,6 @@ ix86_builtin_vectorized_function (unsigned int fn, tree type_out, } break; - CASE_CFN_ROUND: - /* The round insn does not trap on denormals. */ - if (flag_trapping_math || !TARGET_ROUND) - break; - - if (out_mode == DFmode && in_mode == DFmode) - { - if (out_n == 2 && in_n == 2) - return ix86_get_builtin (IX86_BUILTIN_ROUNDPD_AZ); - else if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_ROUNDPD_AZ256); - } - if (out_mode == SFmode && in_mode == SFmode) - { - if (out_n == 4 && in_n == 4) - return ix86_get_builtin (IX86_BUILTIN_ROUNDPS_AZ); - else if (out_n == 8 && in_n == 8) - return ix86_get_builtin (IX86_BUILTIN_ROUNDPS_AZ256); - } - break; - CASE_CFN_FMA: if (out_mode == DFmode && in_mode == DFmode) { -- 2.30.2