[Bug middle-end/68595] [6 regression] ice in const_vector_mask_from_tree at expr.c:11455
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 30 15:25:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68595
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> So, either we should keep what used to be in _Bool/bool type in scalar code
> as 0/-1 at all spots, or as 0/1 at all spots, or as non-zero vs. zero, but
> choose consistently one of those and adjust all the ops accordingly. Say in
> the last case original bool ~x needs to be vectorized as x == 0.
> So, is 0/-1 the best choice for all targets?
It was chosen for compatibility with vector extensions which are based off
openCL. And yes, all targets generate truth values that way IIRC as the
result can be used in AND/OR masking operations directly.
More information about the Gcc-bugs
mailing list