This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>, Jeff Law <law at redhat dot com>
- Date: Wed, 01 Feb 2017 09:32:46 +0100
- Subject: Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)
- Authentication-results: sourceware.org; auth=none
- References: <20170131182637.GI14051@tucnak> <20170201080157.GQ14051@tucnak> <alpine.LSU.2.20.1702010910230.12993@r111.fhfr.qr>
> all BOOLEAN_TYPEs but Adas have precision one and are unsigned
> (their TYPE_SIZE may vary though).
/* Builds a boolean type of precision PRECISION.
Used for boolean vectors to choose proper vector element size. */
tree
build_nonstandard_boolean_type (unsigned HOST_WIDE_INT precision)
{
tree type;
if (precision <= MAX_BOOL_CACHED_PREC)
{
type = nonstandard_boolean_type_cache[precision];
if (type)
return type;
}
type = make_node (BOOLEAN_TYPE);
TYPE_PRECISION (type) = precision;
fixup_signed_type (type);
if (precision <= MAX_INT_CACHED_PREC)
nonstandard_boolean_type_cache[precision] = type;
return type;
}
--
Eric Botcazou