diff options
author | Justin Lebar <jlebar@google.com> | 2017-09-27 23:16:56 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2017-09-27 23:16:56 +0000 |
commit | 8ea84426c9ecd55a77337f6d416bdaad192984d6 (patch) | |
tree | 5063dd9d7a465d95cf5603d94a26b5afd4128e2a /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 1c6f0bb63e6d510513127e16775aec6a79ffdbf4 (diff) | |
download | bcm5719-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