]> granicus.if.org Git - llvm/commit
[SCCP] Update condition to avoid overflow.
authorAlina Sbirlea <asbirlea@google.com>
Wed, 31 Jul 2019 18:22:22 +0000 (18:22 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Wed, 31 Jul 2019 18:22:22 +0000 (18:22 +0000)
commit716169bea3707991cd449a95c4a995494c2ddd7a
tree84e31aaf43bf389b641fdf6495b37d210c58301f
parent048670229e8040a6ea9e6cb87cf9a107c8d858cc
[SCCP] Update condition to avoid overflow.

Summary:
Update condition to remove addition that may cause an overflow.
Resolves PR42814.

Reviewers: sanjoy, RKSimon

Subscribers: jlebar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65417

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367461 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ConstantFolding.cpp
test/Transforms/SCCP/ubsan_overflow.ll [new file with mode: 0644]