This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] UBSan unsafely uses VRP
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, Marat Zakirov <m dot zakirov at samsung dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Wed, 12 Nov 2014 16:56:45 +0300
- Subject: Re: [RFC] UBSan unsafely uses VRP
- Authentication-results: sourceware.org; auth=none
- References: <5462170F dot 5040102 at samsung dot com> <20141111141521 dot GE5026 at tucnak dot redhat dot com> <54631D7F dot 80301 at samsung dot com> <20141112084550 dot GF29791 at redhat dot com> <54632F4D dot 2040407 at samsung dot com> <20141112132656 dot GA5026 at tucnak dot redhat dot com>
On 11/12/2014 04:26 PM, Jakub Jelinek wrote:
But, if -O0 isn't too slow for them, having unnecessary bloat even at -O2
is bad the same. But not using VRP at all, you are giving up all the cases
where you know something won't overflow because you e.g. sign extend
or zero extend from some smaller type, sum op such values, and something
with constant, or you can use a cheaper code to multiply etc.
Sure, I was not suggesting anything like that - just pointing out that
we must be careful about potential loss of precision and do all we can
to avoid it. Faster code should not justify lower quality (as used to
be in 1960-s).
Turning off -faggressive-loop-optimizations is certainly the right thing for
-fsanitize=undefined (any undefined I'd say), so are perhaps selected other