https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110487
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- BOOLEAN_TYPE means it has two values (else undefined), when the values are 0 and 1 the precision can always be 1 and just TYPE_SIZE can be larger when required (fortran bools). With values -1 and 0 and vector ISAs who tend to look at the MSB we need sign-extension to the size of the type which means we need TYPE_PRECISION != 1. We have multiple places that check for two-valuedness with TYPE_PRECISION == 1 || BOOLEAN_TYPE and that's OK. Some also check for TYPE_UNSIGNED if they require [0, 1]. The spirit of transforming this COND_EXPR to a negation is "OK", but I think you need to go via an integer type here: _16 = a.1_1 != 0B; _38 = (int32_t) _16; _39 = -_38; _66 = (<signed_boolean:32) _39;