[KnownBits][ValueTracking] Move the math for calculating known bits for add/sub into...
authorCraig Topper <craig.topper@intel.com>
Tue, 8 Aug 2017 16:29:35 +0000 (16:29 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 8 Aug 2017 16:29:35 +0000 (16:29 +0000)
commitb498a23f0e757e50e504b5b9591e69e605f4fc12
tree017d7f34206b5d285afc56086f9a38f0f64aadfe
parent5a497136be8397ae18c5a83da064fb6b4f682aa3
[KnownBits][ValueTracking] Move the math for calculating known bits for add/sub into a static method in KnownBits object

I want to reuse this code in SimplifyDemandedBits handling of Add/Sub. This will make that easier.

Wonder if we should use it in SelectionDAG's computeKnownBits too.

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

llvm-svn: 310378
llvm/include/llvm/Support/KnownBits.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/KnownBits.cpp [new file with mode: 0644]