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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |85316

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Basically there is a missing VRP happening here:
> l.0_1 [irange] int [-INF, -65536][0, 0][65536, +INF]
> Partial equiv (b_6 pe8 l.0_1)
>     <bb 3> :
>     b_6 = (char) l.0_1;
> ...
> Obvious that b_6 will have the range [0,0] as the other parts of l.0_1 is
> outside of that range. But for some reason VRP didn't figure that out here
> ...

Oh it looks like we don't prop NONZERO back and I missed that when I first
looked at this.

In this case we have:
l&(short)(-1) == 0

But we don't record that in the above, only a range ...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases

Reply via email to