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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Aldy Hernandez from comment #13)
> And yes Jakub, as you have noticed, BIT_IOR_EXPR, BIT_XOR_EXPR, and likely
> other operators may need to be tweaked to take bitmasks into account.  I
> wouldn't be surprised if there's a lot of low hanging fruit in this space.

I think next to BIT_AND_EXPR with const second operand in the reverse direction
it certainly is BIT_IOR_EXPR with const second operand in the forward
direction, that is another thing where some bits become unknown compared to the
source bitmask.
Whether it is also BIT_XOR_EXPR/BIT_NOT_EXPR, dunno right now, we'd need to
play with testcases.  Maybe it is also BIT_AND_EXPR with const second operand
in the forward direction (and then BIT_IOR_EXPR with const second operand in
the reverse direction and BIT_XOR_EXPR with const second operand and
BIT_NOT_EXPR in both directions) which instead of making some bits unknown
(i.e. oring some bits into mask) makes some bits known (i.e. removes them from
the mask; for xor/not keeps mask as is but modifies value).

Reply via email to