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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
When solving 0 = _15 & 1, we calculate _15 as:

        [irange] int [-INF, -2][0, +INF] NONZERO 0xfffffffe

The known value of _15 is [0, 1] NONZERO 0x1 which is intersected with
the above, yielding:

        [0, 1] NONZERO 0x0

The final nonzero bits tells us the range is 0, but the range is still
[0, 1], which causes logical_combine to assume the range is not-zero,
as irange::zero_p() ignores the nonzero bits.

I think we should just normalize a nonzero mask of 0 to [0, 0] at
creation, thus avoiding all this.

Reply via email to