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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, IMHO we want to do it not just when you have a >= 0 & a < x
where x is known to have the MSB (from range info) in the comparison type
clear, but also if there is && or the conditions are possibly appart, say
if (a >= 0 && d && e != 21 && f && a < b) etc.
So, I'd think that tree-ssa-reassoc.c would be a better place to optimize this.

So, init_range_entry would need to be taught to handle
GT_EXPR/GE_EXPR/LT_EXPR/LE_EXPR with non-INTEGER_CST second argument by
creating an entry with "symbolic" high and constant low, range_entry_cmp to
sort those last and then deal with it when merging ranges.

Reply via email to