https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115392
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> --- I should note LLVM does not optimize the signed case but that case can be done still for signed as long as the RHS of the comparison is positive (for the CST non boolean case, as long as the shifted mask does not touch the sign bit). The reasoning is following: a|MASK <= 0 is true for all negative values (as long as the mask does not include the sign bit) as (a|MASK) stays negative. `>` has the same property but being false always. For the boolean case, it is basically the same for the same reason.
