https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93582
--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #16) > I'll play with it next week. What can be handled specially is certainly size2i == maxsizei for the known_subrange_p case. Then we can pun the RHS directly without going through native encode/interpret. But I always thought we have too much special-casing there anyways - more generalized bit-precision and offset aware native encode/interpret handling would be appreciated. As for the more complex case of handling non-constants mixed with constants I do have some patches in the queue for stage1 for the partial overlap case but only for byte offsets/sizes again. Note there's always the question as to what replacements we want VN to make since an extra load can be quite cheap sometimes compared to having a live register that needs to be combined. VN doesn't know whether the memory can be elided later to offset such cost :/ For bitfields there's also the ever present bitfield-lowering idea... And the fact that optimize_bit_field_compare is done way too early.