[PATCH] D30729: [ubsan] Skip range checks for width-limited values
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 7 17:36:37 PST 2017
vsk created this revision.
UBSan can check that scalar loads provide in-range values. When we load
a value from a bitfield, we know that the range of the value is
constrained by the bitfield's width. This patch teaches UBSan how to use
that information to skip emitting some range checks.
This depends on / is a follow-up to: https://reviews.llvm.org/D30423
https://reviews.llvm.org/D30729
Files:
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/ubsan-bitfields.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30729.90974.patch
Type: text/x-patch
Size: 5717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170308/94b5f899/attachment.bin>
More information about the cfe-commits
mailing list