This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30318] VRP does not create ANTI_RANGEs on overflow
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 May 2012 08:21:57 +0000
- Subject: [Bug tree-optimization/30318] VRP does not create ANTI_RANGEs on overflow
- Auto-submitted: auto-generated
- References: <bug-30318-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30318
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2012-05-02 08:21:57 UTC ---
On Sat, 28 Apr 2012, marc.glisse at normalesup dot org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30318
>
> --- Comment #5 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-28 13:18:25 UTC ---
> Created attachment 27260
> --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27260
> Wrap using gmp
>
> I find it easier to use bignum and wrap at the end, instead of checking for
> each operation if it overflows.
I think using GMP is way too expensive for this (simple) task.
> There is something wrong about having better range propagation for the wrapping
> case than for the case where overflow is undefined behavior. There are cases
> where a range is set to varying whereas it could be set to empty, and the
> branch marked as unreachable (haven't seen how that's done). But that's not the
> subject of this bug.
Well, my original idea was to simultanely do range propagation for
wrapping and undefined overflow, and in the case that both results
result in different final transforms warn (to avoid the fact that
we do not fully take advantage of undefined overflow during propagation
and to avoid false positives on the warnings for undefined overflow).
So at least both propagations should be powerful enough to handle
all basic arithmetic "completely".
Richard.