> >>> +   || (only_for_nonzero && !src_lats->bits_lattice.known_nonzero_p ()))
> >>> + {
> >>> +   if (jfunc->bits)
> >>> +     return dest_lattice->meet_with (jfunc->bits->value,
> >>> +                                     jfunc->bits->mask, precision);
> >>> +   else
> >>> +     return dest_lattice->set_to_bottom ();
> >>> + }
> >> I do not think you need to set to bottom here. For pointers, we
> >> primarily track alignment and NULL is aligned - all you need to do is to
> >> make sure that we do not believe that some bits are 1.
> >
> > I am not sure I understand, the testcase you wrote has all bits as zeros
> > and still miscompiles?  It is primarily used for alignment but not only
> > for that.

Maybe I misunderstand the code.  But if you have only_for_nonzero and
you do not know htat src lattice is non-zero you will get
 - if src is 0, then dest is 0
 - if src is non-zero then dest is src+offset

So all trialing bits that are known to be 0 in src and offset are known
to be 0 in the result.  But I do not see where th eoffset is mixed in?

Honza

Reply via email to