[PATCH] [ubsan] Emit single check for Shl

Richard Smith richard at metafoo.co.uk
Mon Feb 25 13:51:36 PST 2013


On Mon, Feb 25, 2013 at 1:02 PM, Will Dietz <wdietz2 at illinois.edu> wrote:

> See attached.
>
> This is important to avoid warning twice on shifts that fail both
> checks, like "1 << -1".
>
> The branching is done to avoid executing the second check's shift with
> invalid operands (poisoning the result), especially since we already
> know the shift is invalid.


Thanks, this generally looks good, except that you shouldn't test for
labels in the IR, since we don't emit them in -Asserts builds.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130225/6566f594/attachment.html>


More information about the cfe-commits mailing list