https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114331

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah.  So the cases where we should do it is when we are reversing a narrowing
cast, or also something for the other PRs Andrew mentioned, like when reversing
BIT_AND_EXPR (but maybe also BIT_IOR_EXPR/BIT_XOR_EXPR, haven't thought that
out; maybe only if BIT_AND_EXPR has constant second argument?).
For that
  if ((i & 7) == 6)
in there aka
  _1 = i_2(D) & 7;
  if (_1 == 6)
    ...
we get [6, 6] range on that edge (with irange_bitmask again implicit), but if
we want to ask what the range of i_2(D) is we can ask for irange_bitmask to be
computed (MASK 0x0 VALUE 0x6) and for i_2(D) reverse the mask, i.e. MASK
0xfffffff8 VALUE 0x6;

Reply via email to