This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: poly_uint64 / TYPE_VECTOR_SUBPARTS question
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Richard Sandiford <richard dot sandiford at linaro dot org>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Fri, 09 Feb 2018 10:05:16 -0800
- Subject: Re: poly_uint64 / TYPE_VECTOR_SUBPARTS question
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <1518127722.14236.3.camel@cavium.com> <87h8qqw0cp.fsf@linaro.org> <1518198050.14236.10.camel@cavium.com> <87d11evycw.fsf@linaro.org>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, 2018-02-09 at 17:58 +0000, Richard Sandiford wrote:
>
> OK, so is this in aarch64_builtin_vectorized_function? to_constant
> isn't valid there because the code isn't specific to Advanced SIMD.
> The way to check for V2xx is:
>
> known_eq (TYPE_VECTOR_SUBPARTS (...), 2U)
>
> Thanks,
> Richard
It is in aarch64_builtin_vectorized (actually in a new function called
from there). What I am using right now to limit myself to V2DF is:
/* We only handle single argument V2DF functions for now. */
el_mode = TYPE_MODE (TREE_TYPE (type_out));
in_mode = TYPE_MODE (TREE_TYPE (type_in));
if (el_mode != in_mode || el_mode != DFmode)
return NULL_TREE;
if (!TYPE_VECTOR_SUBPARTS (type_out).is_constant (&n)
|| !TYPE_VECTOR_SUBPARTS (type_in).is_constant (&in_n))
return NULL_TREE;
if (n != in_n || n != 2)
return NULL_TREE;
Steve Ellcey
sellcey@cavium.com