https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107465
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I bet the warning also doesn't make really sense for the case where we'd have unfolded BIT_NOT_EXPR of a constant compared to non-constant, so which of the operands is BIT_NOT_EXPR should determine which operand to check tree_fits_shwi_p on (the other one).