[RFC] UBSan unsafely uses VRP
Yury Gribov
y.gribov@samsung.com
Wed Nov 12 13:56:00 GMT 2014
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
> optimizations.
Totally agree.
-Y
More information about the Gcc
mailing list