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: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Feb 2017 00:22:49 +0100
- Subject: Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)
- Authentication-results: sourceware.org; auth=none
- References: <20170131182637.GI14051@tucnak> <94cb0830-9f4c-9ff8-c9e7-f0ddd4028f20@redhat.com> <20170131224617.GO14051@tucnak> <dee6069f-e5e0-e5a5-e2cb-0b2c21c255c2@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 31, 2017 at 03:52:10PM -0700, Jeff Law wrote:
> Which makes your patch safe -- but introduces a non-obvious dependency
> between useless_type_conversion_p and your definition of
> INTEGRAL_BOOLEAN_TYPE and how it's used in the vectorizer.
The predicate is simply true for all BOOLEAN_TYPEs and all types that are
compatible with it in the middle-end. BOOLEAN_TYPEs with different
precisions are not considered compatible types, therefore they won't appear
together without explicit casts in between.
> I think if you checked for a TYPE_PRECISION of 1 in INTEGRAL_BOOLEAN_TYPE,
> that would help -- but leaves INTEGRAL_BOOLEAN_TYPE poorly named.
I used BOOLEAN_TYPE_P initially, INTEGRAL_BOOLEAN_TYPE_P has been Richard's
suggestion on IRC. I'm fine with other names as long as it is not too long.
Jakub