summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-09-27 23:16:56 +0000
committerJustin Lebar <jlebar@google.com>2017-09-27 23:16:56 +0000
commit8ea84426c9ecd55a77337f6d416bdaad192984d6 (patch)
tree5063dd9d7a465d95cf5603d94a26b5afd4128e2a /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent1c6f0bb63e6d510513127e16775aec6a79ffdbf4 (diff)
downloadbcm5719-llvm-8ea84426c9ecd55a77337f6d416bdaad192984d6.tar.gz
bcm5719-llvm-8ea84426c9ecd55a77337f6d416bdaad192984d6.zip
Check for overflows when calculating the offset in GetGEPCost.
Summary: This avoids C++ UB if the GEP is weird and the calculation overflows int64_t, and it's also observable in the cost model's results. Such GEPs are almost surely not valid pointers, but LLVM nonetheless generates them sometimes. Reviewers: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38337 llvm-svn: 314362
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud