On Mon, Feb 06, 2017 at 09:14:24AM +0100, Richard Biener wrote: > > > +/* Nonzero if TYPE represents a (scalar) boolean type or type > > > + in the middle-end compatible with it. */ > > > + > > > +#define INTEGRAL_BOOLEAN_TYPE_P(TYPE) \ > > > + (TREE_CODE (TYPE) == BOOLEAN_TYPE \ > > > + || ((TREE_CODE (TYPE) == INTEGER_TYPE \ > > > + || TREE_CODE (TYPE) == ENUMERAL_TYPE) \ > > > + && TYPE_PRECISION (TYPE) == 1 \ > > > + && TYPE_UNSIGNED (TYPE))) > > > > > > (just to quote what you proposed).
> > I could agree to that. Alternately, we could restore the TYPE_PRECISION > > checks that Jakub removed in the vectorizer. I haven't removed any, there were just 3 changes of the kind: - if ((TYPE_PRECISION (TREE_TYPE (var)) != 1 - || !TYPE_UNSIGNED (TREE_TYPE (var))) - && TREE_CODE (TREE_TYPE (var)) != BOOLEAN_TYPE) + if (!INTEGRAL_BOOLEAN_TYPE_P (TREE_TYPE (var))) which are almost equivalent, except that the old code could let non-INTEGRAL_TYPE_P with TYPE_PRECISION (whatever it means for the various kinds of types (e.g. log2 of number of vector elements etc.). > > Yeah, I guess at this point I prefer a vectorizer-local fix. So shall I move the INTEGRAL_BOOLEAN_TYPE_P macro (or change it to another name, e.g. including VECT in it?) to tree-vectorizer.h? Jakub