On Tue, Jun 23, 2015 at 09:56:33AM +0200, Richard Biener wrote:
> > I think you're right about TYPE_SATURATING so I've dropped that and instead
> > replaced it with TYPE_OVERFLOW_TRAPS.  That should do the right thing
> > together with TYPE_OVERFLOW_SANITIZED.
> 
> Are you sure?  The point is that if the minus or the plus in the original
> expression saturate the result isn't correct, no?
 
Yes, but I thought that TYPE_SATURATING is only true for fixed-point, i.e.
those _Accum/_Sat/_Fract (?), and you can't do bitwise & or | on them, which
means that the TYPE_SATURATING check wouldn't be necessary.

> As said, removing TYPE_SATURATING doesn't sound correct.  I'm not sure
> about TYPE_OVERFLOW_TRAPS - we're certainly removing traps elsewhere
> (look for the scarce use of this flag in fold-const.c and match.pd
> where I only preserved those that were originally in fold-const.c).
> 
> So, TYPE_OVERFLOW_TRAPS is your choice but TYPE_SATURATING is
> required IMHO.

Ok, I guess I'll add TYPE_SATURATING back, even though I'm not clear
on that one, and commit.

Thanks,

        Marek

Reply via email to