https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82089
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- I do wonder though about val_signbit_known_clear_p (and friends): ... /* Test whether the most significant bit of mode MODE is clear in VAL. Returns false if the precision of MODE is too large to handle. */ bool val_signbit_known_clear_p (machine_mode mode, unsigned HOST_WIDE_INT val) ... Returning false for mode == BImode and val == 1 corresponds to the comment: the msb is set, so it's not known to be clear. It's just confusing that the msb is also the lsb. But the fact that we're using 'signbit' in the name suggests that we're interpreting the value as 1-bit signed, which is rather exceptional. We could handle BImode conservatively in these functions, by always returning false. Note that this does not fix the original problem. Likewise, it might silently introduce wrong-code bugs. So we might wanna assert in these functions that mode != BImode, and handle the triggers.